:root{color-scheme:dark;--bg:#080f1b;--bar:#0d1727;--panel:#101c2d;--panel-alt:#132135;--surface:#15243a;--border:#22334a;--line:#1b2b40;--text:#e5eefb;--muted:#8498b4;--soft:#a8bdd5;--blue:#248fff;--cyan:#72c6ff;--green:#29c89a;--red:#ef5a70;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-synthesis:none}
*{box-sizing:border-box}html,body{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-size:12px}button,input,select{font:inherit}button{color:inherit;cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #50b3ff;outline-offset:2px}button:disabled{cursor:default;opacity:.5}.ico{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}.grow{flex:1;min-width:0}.muted{color:var(--muted)}[hidden]{display:none!important}
#shell{height:100vh;min-height:380px;display:flex;flex-direction:column;overflow:hidden}.appbar{height:49px;min-height:49px;background:#0b1523;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:13px;padding:0 12px 0 15px}.brand{display:flex;align-items:center;gap:11px;color:inherit;text-decoration:none;white-space:nowrap}.brand-name{font-weight:850;letter-spacing:.55px;font-size:15px;line-height:1.05}.brand-name strong{font-weight:850;color:var(--cyan)}.brand-name small{font-size:8px;letter-spacing:1.7px;color:#7b9fc2;display:block;margin-top:5px;font-weight:700}.saturn{display:block;position:relative;width:31px;height:31px;flex-shrink:0}.saturn:before{content:"";position:absolute;left:3px;top:2px;width:25px;height:25px;border-radius:50%;background:radial-gradient(circle at 28% 23%,#d8f2ff 0,#60b5fd 30%,#2673ce 65%,#143f83 100%);box-shadow:0 0 16px #3c9cff33;z-index:1}.saturn:after{content:"";position:absolute;left:-6px;top:10px;width:42px;height:12px;border:2.5px solid #83d5ff;border-radius:50%;transform:rotate(-26deg);box-shadow:0 0 6px #328cf055}.saturn-core{display:none}.appbar-divider{height:24px;width:1px;background:var(--border);margin:0 2px 0 4px}.workspace-id{display:flex;align-items:center;gap:8px;font-size:12px;color:#bdcde1;white-space:nowrap}.workspace-dot{width:7px;height:7px;background:var(--cyan);border-radius:50%;box-shadow:0 0 10px #3fa2e950}.workspace-caption{font-size:11px;color:#607b98}.feed-pill{display:flex;align-items:center;gap:8px;color:#829ab8;font-size:11px;max-width:300px;overflow:hidden;white-space:nowrap}.feed-pill span{overflow:hidden;text-overflow:ellipsis}.connection-dot,.market-led{width:7px;height:7px;border-radius:50%;background:var(--green);flex-shrink:0;box-shadow:0 0 7px #29c89a44}.feed-pill.is-error .connection-dot{background:var(--red);box-shadow:0 0 7px #ef5a7044}.icon-button{border:0;background:transparent;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;color:#8fa7c3}.icon-button:hover,.rail-item:hover,.plain-tool:hover{background:#182d47;color:#d9efff}.top-avatar{width:29px;height:29px;border-radius:9px;background:linear-gradient(140deg,#216cbb,#15375f);border:1px solid #3785c8;color:#e3f6ff;font-weight:900;box-shadow:0 0 11px #358fff17}
.marketbar{height:43px;min-height:43px;background:var(--bar);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:6px;padding:0 10px 0 13px}.symbol-trigger{border:1px solid transparent;border-radius:5px;background:transparent;display:flex;align-items:center;gap:8px;padding:7px 8px;color:#f4f8ff;font-weight:750;min-width:0}.symbol-trigger:hover{border-color:#315b86;background:#132338}.symbol-trigger .ico{color:var(--cyan)}.kbd-hint{font-size:9px;color:#657f9e;border:1px solid #304157;border-radius:3px;padding:2px 4px;font-weight:550;margin-left:5px}.symbol-caption{font-size:10px;letter-spacing:.4px;color:#6f90b3;white-space:nowrap;padding-right:6px}.toolbar-separator{height:20px;width:1px;background:#2a3b51;margin:0 7px;flex-shrink:0}.timeframes{display:flex;align-items:center;gap:1px}.timeframes button{background:transparent;border:0;padding:7px 9px;color:#8fa2ba;border-radius:4px;font-weight:600}.timeframes button:hover{background:#192b43;color:#d6edff}.timeframes button.active{color:#8ed0ff;background:#172e4b}.plain-tool{border:0;background:none;display:inline-flex;align-items:center;gap:7px;color:#b0c5db;border-radius:5px;padding:8px 9px;white-space:nowrap}.plain-tool .ico{width:16px}.save-button{border:1px solid #28547d;background:linear-gradient(115deg,#163559,#122844);color:#8fceff;display:flex;align-items:center;gap:8px;border-radius:5px;font-size:11px;padding:7px 11px;white-space:nowrap}.save-button:hover{border-color:#3975ad}.save-button .ico{width:15px;height:15px}
.workspace{display:flex;flex:1;min-height:0;min-width:0}.chart-area{display:flex;flex-direction:column;flex:1;min-width:0;background:#0b1423}.tabsbar{height:34px;min-height:34px;display:flex;align-items:center;gap:2px;background:#0c1726;border-bottom:1px solid var(--border);padding-right:13px}.tabs{display:flex;align-items:stretch;overflow:hidden;min-width:0}.chart-tab{border:0;border-right:1px solid #24374d;border-bottom:2px solid transparent;background:transparent;padding:0 11px;min-width:0;max-width:180px;display:flex;align-items:center;gap:7px;color:#889cb5}.chart-tab:hover{background:#16263b}.chart-tab.active{background:#13243a;color:#eaf4ff;border-bottom-color:#339bff}.chart-tab .tab-dot{width:6px;height:6px;flex-shrink:0;background:#3f91f9;border-radius:50%}.chart-tab .tab-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:650}.chart-tab .tab-close{font-size:15px;color:#7289a4;margin-left:6px;line-height:1;padding:1px}.chart-tab .tab-close:hover{color:white}.add-tab{width:29px;height:29px;border:0;border-radius:5px;background:none;color:#7195b8;display:flex;align-items:center;justify-content:center}.add-tab:hover{background:#182c42;color:#e7f7ff}.add-tab .ico{width:15px;height:15px}.tabs-right{letter-spacing:1.5px;font-weight:800;color:#6c86a5;font-size:10px;white-space:nowrap}.tabs-right span{color:#65aeec}.version{color:#5a7593;font-size:9px;font-weight:500;margin-left:8px;letter-spacing:.1px;font-style:normal}.chart-host{flex:1;min-height:100px;position:relative;background:#0b1421}#terminal{height:100%;width:100%}#fatal{position:absolute;inset:0;z-index:2;background:#0b1425f2;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:25px}#fatal>.ico{color:#db8c89;width:30px;height:30px}#fatal h3{font-size:17px;font-weight:700;margin:14px 0 3px}#fatal p{font-size:12px;max-width:550px;line-height:1.6;color:#9eb6cf}.primary-button{border:1px solid #3a9af0;background:#277fd3;color:white;border-radius:6px;padding:10px 14px;font-weight:700}.primary-button:hover{background:#3799f5}.chart-statusbar{height:27px;min-height:27px;display:flex;align-items:center;justify-content:space-between;background:#0e1a2b;border-top:1px solid var(--border);font-size:10px;color:#8199b4;padding:0 13px}.status-cluster{display:flex;align-items:center;gap:8px;min-width:0;white-space:nowrap}.status-cluster:not(.end){overflow:hidden}.status-cluster #status-detail{overflow:hidden;text-overflow:ellipsis}.status-blue{color:var(--cyan)}.status-divider{color:#39536c}
.sidebar{width:287px;min-width:287px;display:flex;flex-direction:column;background:#0f1b2c;border-left:1px solid var(--border);transition:width .17s,min-width .17s;min-height:0}.workspace.sidebar-collapsed .sidebar{display:none}.sidebar-top{height:61px;min-height:61px;padding:0 9px 0 15px;display:flex;align-items:center;gap:3px;border-bottom:1px solid #1d2c40}.sidebar-title{flex:1;min-width:0}.sidebar-title strong{font-size:13px;display:block;font-weight:700}.sidebar-title small{display:block;font-size:10px;color:#6e88a6;margin-top:4px}.list-table-head{height:31px;min-height:31px;display:flex;align-items:center;justify-content:space-between;padding:0 13px;color:#607b98;font-size:10px;letter-spacing:.2px;border-bottom:1px solid #1b2b40}.watchlist{flex:1;min-height:100px;overflow:auto;scrollbar-color:#294766 #101c2d;scrollbar-width:thin}.watch-row{width:100%;min-height:47px;background:transparent;border:0;border-left:2px solid transparent;padding:7px 13px;display:flex;align-items:center;gap:8px;text-align:left;color:var(--text)}.watch-row:hover{background:#172a41}.watch-row.active{background:#182f4b;border-left-color:#319fff}.watch-coin{width:24px;height:24px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:1px solid #265177;border-radius:50%;background:#183655;color:#8ad2ff;font-size:9px;font-weight:850}.watch-info{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.watch-name{font-weight:750;font-size:11px;max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.watch-meta{color:#66829f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px}.watch-exchange{font-size:10px;font-weight:650;color:#7d9bb9;max-width:80px;text-align:right;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sidebar-info{border-top:1px solid var(--border);padding:15px 14px 17px;background:#111f31}.sidebar-info-title{font-size:9px;letter-spacing:1.3px;color:#7089a8;display:flex;justify-content:space-between}.sidebar-info strong{font-size:17px;display:block;margin-top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-info>small{display:block;margin-top:5px;color:#7593b0;line-height:1.5}.detail-actions{display:flex;gap:6px;margin-top:13px}.detail-actions button{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 5px;background:#152b45;border:1px solid #254560;border-radius:5px;color:#a6ccec;font-size:10px}.detail-actions button:hover{border-color:#3d83b4}.detail-actions .ico{width:14px;height:14px}.sidebar-footer{padding:10px 14px;display:flex;flex-direction:column;gap:4px;background:#0d1828;border-top:1px solid var(--border);font-size:9px;letter-spacing:1.2px;font-weight:750;color:#70bdf5}.sidebar-footer .muted{font-size:9px;letter-spacing:.4px;font-weight:450}
.side-rail{width:43px;min-width:43px;display:flex;flex-direction:column;align-items:center;padding:8px 0;gap:4px;background:#0c1727;border-left:1px solid var(--border)}.rail-item{width:34px;height:34px;border:0;border-radius:5px;display:flex;align-items:center;justify-content:center;background:transparent;color:#708ca9}.rail-item.selected{background:#173557;color:#79c7ff}.rail-item .ico{width:18px;height:18px}.bottomdock{height:36px;min-height:36px;border-top:1px solid var(--border);display:flex;align-items:center;gap:10px;background:#0b1524;padding:0 14px}.bottom-main{display:flex;align-items:center;gap:12px}.dock-tab{background:none;border:0;color:#aad0f3;display:flex;align-items:center;gap:7px;height:35px;font-size:11px;font-weight:700;border-bottom:2px solid #238fff;padding:0 6px}.dock-tab .ico{width:15px;height:15px}.dock-separator{height:15px;width:1px;background:#2a4159}.dock-coming{color:#617b98;font-size:10px;white-space:nowrap}.dock-coming small{margin-left:2px;color:#496682;font-size:9px}.bottom-caption{font-size:10px;color:#4e6a86;white-space:nowrap}
.modal-backdrop{position:fixed;inset:0;background:#030814bc;z-index:500;display:flex;align-items:flex-start;justify-content:center;padding:12vh 14px 24px;backdrop-filter:blur(4px)}.modal{width:min(560px,100%);max-height:calc(100vh - 15vh);overflow:auto;background:#101d2f;border:1px solid #355273;box-shadow:0 25px 90px #0009;border-radius:11px;padding:21px}.modal-small{width:min(465px,100%)}.modal-heading{display:flex;align-items:start;justify-content:space-between;gap:15px;margin-bottom:18px}.modal-heading h2{font-size:19px;font-weight:750;margin:7px 0 0}.modal-eyebrow{font-size:10px;color:#64b9ff;letter-spacing:1.7px;font-weight:800}.modal-close{margin-top:-3px}.search-control{height:45px;display:flex;align-items:center;gap:12px;background:#0b1628;border:1px solid #35608a;border-radius:7px;padding:0 12px}.search-control .ico{color:#56adf4}.search-control input{background:transparent;border:0;outline:0!important;color:#eef7ff;width:100%;min-width:0;font-size:13px}.search-control input::placeholder{color:#5a7796}.esc-hint{color:#627e9b;font-size:10px;border:1px solid #35506a;border-radius:3px;padding:2px 5px}.sourcebar{display:flex;align-items:center;gap:10px;padding:14px 0;border-bottom:1px solid #26394f}.sourcebar span{color:#8ca6c0;font-size:11px}.sourcebar select{flex:1;min-width:0;background:#172a40;color:#dceeff;border:1px solid #35526f;border-radius:5px;padding:7px 9px;height:34px}.sourcebar .primary-button{padding:8px 13px;height:34px}.search-results-label{margin:16px 0 10px;color:#829bb7;font-size:10px;letter-spacing:.7px;font-weight:700;text-transform:uppercase}.search-results{max-height:270px;overflow:auto;scrollbar-color:#355a7d transparent}.search-result{width:100%;display:flex;align-items:center;gap:10px;padding:10px;border:0;background:transparent;text-align:left;color:#deedfc;border-radius:5px}.search-result:hover{background:#193554}.search-result-bubble{border:1px solid #2b547a;background:#183754;width:30px;height:30px;border-radius:50%;display:flex;justify-content:center;align-items:center;color:#8dcaff;font-weight:850;font-size:10px;flex-shrink:0}.search-result-main{display:flex;flex-direction:column;min-width:0;flex:1;gap:3px}.search-result-main strong{font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.search-result-main small{font-size:10px;color:#7594b2;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.search-result-ex{font-size:10px;color:#84abc7}.search-empty{color:#7d99b3;padding:16px 9px;line-height:1.5}.modal-footnote{color:#6686a4;font-size:10px;line-height:1.6;margin:17px 0 0}.about-lead{color:#aec8e1;line-height:1.6}.shortcuts{margin-top:18px;border-top:1px solid var(--border)}.shortcuts>div{display:flex;justify-content:space-between;gap:15px;padding:13px 0;border-bottom:1px solid var(--border);color:#a8bed5}.shortcuts kbd{font-size:10px;border-radius:4px;background:#1e3550;border:1px solid #305276;padding:3px 7px;color:#a4d3ff}.toast{position:fixed;bottom:51px;left:50%;transform:translateX(-50%) translateY(8px);border-radius:7px;background:#1c3755;border:1px solid #3e80b3;color:#eaf7ff;z-index:700;padding:12px 16px;box-shadow:0 8px 22px #0008;opacity:0;visibility:hidden;transition:opacity .15s,transform .15s,visibility .15s;pointer-events:none;max-width:min(540px,90vw);text-align:center}.toast.open{opacity:1;visibility:visible;transform:translateX(-50%) translateY(0)}
#terminal .oac-widget{font-family:Inter,-apple-system,system-ui,"Segoe UI",sans-serif}
@media(max-width:1120px){.workspace-caption,.bottom-caption{display:none}.sidebar{width:245px;min-width:245px}.plain-tool{padding:8px 5px}.timeframes button{padding:7px 7px}.symbol-caption{display:none}}
@media(max-width:870px){.appbar{padding-left:9px;gap:8px}.workspace-id{display:none}.marketbar{gap:3px;padding:0 6px}.plain-tool span,.save-button span,.optional-tool{display:none}.plain-tool{padding:8px}.sidebar{width:218px;min-width:218px}.tabs-right{display:none}.bottomdock{padding:0 7px}.dock-coming{font-size:9px}.dock-coming small{display:none}}
@media(max-width:700px){.feed-pill{display:none}.brand-name small{display:none}.brand-name{font-size:13px}.marketbar{overflow:auto;scrollbar-width:none}.marketbar::-webkit-scrollbar{display:none}.symbol-trigger{min-width:110px}.timeframes{gap:0}.timeframes button{font-size:10px;padding:7px 6px}.kbd-hint{display:none}.toolbar-separator{margin:0 3px}.sidebar{display:none}.side-rail{width:37px;min-width:37px}.workspace.sidebar-collapsed .sidebar{display:none}.bottom-main{gap:5px}.dock-coming:nth-last-child(-n+2){display:none}.modal-backdrop{padding-top:9vh}.sidebar-info{display:none}}
@media(max-height:590px){.appbar{height:42px;min-height:42px}.marketbar{height:39px;min-height:39px}.tabsbar{height:30px;min-height:30px}.chart-tab{max-height:30px}.bottomdock{height:30px;min-height:30px}.modal-backdrop{padding-top:3vh}.modal{max-height:94vh}}

/* v0.3 — compact Russian tool controls and selected drawing properties */
.chart-host{position:relative}
.chart-quick-actions{position:absolute;left:54px;top:10px;z-index:19;display:flex;align-items:center;gap:5px;pointer-events:auto;padding:5px;background:#0d1c2ef2;border:1px solid #2c4562;border-radius:9px;box-shadow:0 8px 32px #04091288}
.chart-quick-actions button{height:28px;min-width:30px;border:0;border-radius:5px;background:transparent;color:#a1c3e9;font-weight:800;font-size:16px}
.chart-quick-actions button:hover{background:#1d456a;color:#fff}
.chart-quick-actions #open-editor{border-left:1px solid #2e4560;border-radius:0;color:#64baf9;margin-left:2px}
.cosmo-editor{position:absolute;right:13px;top:12px;z-index:26;background:#101e30f7;border:1px solid #2f4b6a;border-radius:12px;width:min(352px,calc(100vw - 90px));max-height:calc(100% - 25px);display:flex;flex-direction:column;box-shadow:0 22px 60px #000b;backdrop-filter:blur(12px)}
.editor-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #273e57;gap:12px}
.editor-head>div{display:flex;flex-direction:column;gap:5px}.editor-head small{color:#569fd5;font-size:9px;font-weight:800;letter-spacing:1px}.editor-head strong{color:#e7f5ff;font-size:15px}.editor-head button,.quick-menu-head button{border:0;border-radius:6px;background:#19324b;color:#abc4db;font-size:17px;width:28px;height:28px}
.editor-help{margin:0;padding:11px 15px;color:#809fb9;line-height:1.5;font-size:11px}.editor-tabs{display:flex;border-bottom:1px solid #294057;padding:0 10px;gap:4px}.editor-tabs button{background:transparent;border:0;border-bottom:2px solid transparent;padding:10px 13px;color:#8ba9c7;font-weight:650}.editor-tabs button.active{border-color:#2c9ef7;color:#dcefff}
.editor-content{overflow:auto;padding:12px 15px;min-height:100px;scrollbar-width:thin}.editor-content h4{margin:9px 0 13px;color:#cee6ff;font-size:11px;font-weight:800}.editor-note{color:#8eacc7;line-height:1.5}
.editor-row{display:grid;grid-template-columns:minmax(0,1fr) 118px;gap:9px;align-items:center;min-height:37px;margin:0 0 8px;color:#bdd1e4;font-size:11px}.editor-row>small{grid-column:1/-1;color:#6f8fae;line-height:1.45;margin-top:-5px}.editor-row input:not([type=checkbox]),.editor-row select{background:#172c43;color:#e5f4ff;border:1px solid #365473;border-radius:6px;height:31px;padding:4px 8px;min-width:0;width:100%}.editor-row input[type=color]{padding:3px 5px}.editor-row input[type=range]{accent-color:#248fff;padding:0;border:0}.editor-row input[type=checkbox]{height:17px;width:17px;margin-left:auto;accent-color:#2c9df2}
.editor-buttonrow{display:flex;gap:7px;margin:0 0 12px}.editor-buttonrow button,.editor-wide-button{background:#19314b;border:1px solid #355372;border-radius:7px;padding:8px 10px;color:#aad3f5}.editor-buttonrow button:hover,.editor-wide-button:hover{background:#22517c}.editor-wide-button{display:block;width:100%;text-align:left;margin:10px 0}
.editor-foot{border-top:1px solid #2c425c;display:flex;flex-wrap:wrap;gap:5px;padding:10px}.editor-foot button{background:#1d354f;border:1px solid #365471;border-radius:6px;padding:7px 9px;color:#bad7ef;font-size:11px;flex:1}.editor-foot button.danger{background:#442431;border-color:#793549;color:#ffb3c0}.editor-foot button:disabled{opacity:.35}
.fib-level-list{display:flex;flex-direction:column;gap:7px;max-height:220px;overflow:auto;margin-bottom:11px}.fib-level-row{display:grid;grid-template-columns:20px 1fr 39px 25px;align-items:center;gap:8px;background:#152b43;border:1px solid #2b425a;border-radius:6px;padding:5px}.fib-level-row input[type=checkbox]{accent-color:#3099ec}.fib-level-row input[type=number]{min-width:0;width:100%;height:27px;background:#091a2b;border:1px solid #324e6b;border-radius:4px;color:#e9f5ff;padding:3px 7px}.fib-level-row input[type=color]{width:37px;height:27px;padding:1px;border:0;background:transparent}.fib-level-row button{background:transparent;color:#cf7892;border:0;font-size:20px}
.quick-menu{position:fixed;top:94px;left:min(320px,calc(100vw - 385px));z-index:95;width:min(366px,calc(100vw - 30px));max-height:calc(100vh - 135px);overflow:auto;padding:13px 14px;background:#101d30f9;border:1px solid #33506d;border-radius:12px;box-shadow:0 22px 60px #000b;backdrop-filter:blur(14px)}
.quick-menu-head{display:flex;justify-content:space-between;align-items:center;color:#e7f5ff;font-size:14px}.quick-menu p{color:#7ca3c4;text-transform:uppercase;letter-spacing:.7px;font-weight:750;font-size:10px;margin:16px 0 9px}
.quick-indicator-grid,.draw-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.quick-indicator-grid button,.draw-grid button{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;background:#172a41;border:1px solid #2e4965;border-radius:7px;min-height:48px;padding:9px;color:#cde9ff;text-align:left}.quick-indicator-grid button:hover,.draw-grid button:hover{background:#1e4264;border-color:#438bc1}.quick-indicator-grid button>span{font-weight:750}.quick-indicator-grid button small{color:#7c9fbd;font-size:10px}.quick-indicator-grid.compact{grid-template-columns:repeat(4,1fr)}.quick-indicator-grid.compact button{align-items:center;min-height:35px;padding:6px}.quick-all{width:100%;margin-top:12px;background:#173d5d;border:1px solid #33638f;color:#8dccff;padding:9px;border-radius:6px}
.draw-grid button{flex-direction:row;align-items:center;font-size:17px;gap:10px}.draw-grid button span{font-size:11px;line-height:1.2}.quick-menu-foot{margin-top:14px;color:#799ab7;line-height:1.5;font-size:10px;border-top:1px solid #2b4158;padding-top:11px}
.clear-choices{display:flex;flex-direction:column;gap:8px;margin:17px 0}.clear-choices label{display:flex;gap:10px;align-items:center;border:1px solid #304a65;background:#15283f;border-radius:7px;padding:13px;color:#c9deef;cursor:pointer}.clear-choices label:has(input:checked){background:#183d5f;border-color:#499ada}.clear-choices input{accent-color:#2797ec}.clear-footer{display:flex;justify-content:flex-end;gap:8px}.clear-footer button{border-radius:6px;padding:10px 14px}.plain-button{background:#1c324c;color:#c4dbee;border:1px solid #335474}.danger-button{background:#a53a54;color:#fff;border:1px solid #d4526e;font-weight:750}
.asset-badge{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;color:#f5f9ff;font-size:11px;font-weight:850;letter-spacing:-.4px;background:var(--asset-bg,#2379c9);border:1px solid #ffffff28;border-radius:50%;flex-shrink:0;text-shadow:0 1px 2px #0006}.asset-badge img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#12253b;border-radius:50%}
.clear-action{color:#e4a9bc}.clear-action:hover{background:#47243a;color:#ffbdcf}
@media(max-width:1100px){.cosmo-editor{width:315px}.quick-menu{left:160px}}
@media(max-width:700px){.chart-quick-actions{left:7px;top:8px}.cosmo-editor{right:5px;top:45px;width:min(350px,calc(100vw - 58px));max-height:calc(100% - 50px)}.quick-menu{top:89px;left:10px}.marketbar .clear-action{display:flex}.marketbar .clear-action span{display:none}}
/* Cosmo Chart 0.3 — 2026 visual refinement. No extra font requests or assets. */
:root{
  --bg:#09111e;--bar:#0e1a2b;--panel:#101d2e;--panel-alt:#142239;
  --surface:#192c43;--border:#263a54;--line:#20344b;
  --text:#edf5ff;--muted:#91a8c1;--soft:#bfd2e6;
  --blue:#399bff;--cyan:#76caff;
}
body{font-size:12.5px;letter-spacing:.005em;-webkit-font-smoothing:antialiased}
#shell{background:var(--bg)}
.appbar{height:56px;min-height:56px;padding:0 18px;background:linear-gradient(120deg,#0e1a2b,#0b1829 58%,#0d1e34);gap:15px}
.brand-name{font-size:15px;letter-spacing:.45px}
.brand-name small{margin-top:6px;color:#7699b9;letter-spacing:1.45px}
.saturn{transform:scale(1.04);margin-right:2px}
.workspace-id{font-weight:600;font-size:12px}
.workspace-caption{font-weight:400}
.feed-pill{background:#13273b;border:1px solid #2a435d;border-radius:999px;padding:7px 12px;font-weight:550;max-width:250px}
.top-avatar{width:33px;height:33px;border-radius:11px;font-size:13px}
.marketbar{height:50px;min-height:50px;gap:6px;padding:0 15px;background:#0e192a}
.symbol-trigger{border:1px solid #314861;background:#14263b;padding:8px 10px;border-radius:9px;min-height:34px;box-shadow:inset 0 1px 0 #ffffff06}
.symbol-trigger:hover{background:#1b3653;border-color:#4480ba}
.symbol-trigger #current-short{font-size:12px;letter-spacing:.05px}
.kbd-hint{border-radius:5px;background:#0b1c2f;padding:2px 5px}
.symbol-caption{color:#87a6c7;font-size:10px}
.timeframes{background:#0b1727;border:1px solid #253951;padding:3px;border-radius:9px;gap:2px}
.timeframes button{padding:7px 8px;border-radius:6px;font-size:11px;line-height:1.1}
.timeframes button.active{background:#204f78;color:#e5f6ff;box-shadow:0 1px 3px #0005}
.plain-tool{padding:8px 10px;border-radius:8px;font-weight:600;font-size:11.5px}
.plain-tool:hover,.icon-button:hover,.rail-item:hover{background:#1d3a55;color:#edf8ff}
.icon-button{border-radius:9px}
.save-button{border:1px solid #397ab2;border-radius:9px;padding:8px 12px;background:linear-gradient(130deg,#2569af,#15497e);color:#f1f9ff;font-weight:700;box-shadow:0 3px 12px #137dde22}
.save-button:hover{background:linear-gradient(130deg,#3287d7,#1c5e9d);border-color:#65b1ed}
.tabsbar{height:39px;min-height:39px;background:#101d2d;padding-right:19px}
.chart-tab{max-width:188px;padding:0 15px;border-right:1px solid #243a53;transition:background .14s ease}
.chart-tab .tab-dot{width:7px;height:7px;box-shadow:0 0 0 3px #318dea14}
.chart-tab .tab-text{font-size:11.5px}
.chart-tab.active{background:linear-gradient(180deg,#172f4a,#14253b);border-bottom-color:#42a6ff}
.chart-tab:hover{background:#1b3049}
.tabs-right{display:flex;align-items:center;gap:5px;color:#8fa9c3}
.top-status-pulse{display:inline-block;width:6px;height:6px;border-radius:100%;background:#4bbaef;box-shadow:0 0 10px #4bbaef8c;margin-right:4px}
.chart-area{background:#0b1524}
.chart-host{background:#0c1727}
.chart-statusbar{height:32px;min-height:32px;background:#111f31;padding:0 17px}
.sidebar{background:#0e1b2c;width:300px;min-width:300px}
.sidebar-top{height:69px;min-height:69px;padding-left:19px}
.sidebar-title strong{font-size:13px;letter-spacing:.1px}
.sidebar-title small{font-size:10.5px;margin-top:5px}
.list-table-head{height:37px;min-height:37px;padding:0 16px}
.watch-row{min-height:57px;padding:10px 15px;gap:11px;border-left-width:3px;transition:background .13s ease}
.watch-row:hover{background:#19344d}
.watch-row.active{background:linear-gradient(90deg,#1b3e60,#122842 80%)}
.watch-coin{width:30px;height:30px;font-size:10px}
.watch-name{max-width:164px;font-size:12px;line-height:1.25}
.watch-meta{font-size:10px;line-height:1.3;color:#7899b7}
.watch-exchange{font-size:10px}
.sidebar-info{padding:19px;background:linear-gradient(160deg,#14263b,#102037)}
.sidebar-info strong{font-size:19px}
.detail-actions button{border-radius:8px;padding:10px 7px;font-size:11px}
.side-rail{background:#111f31}
.rail-item{border-radius:9px}
.bottomdock{height:40px;min-height:40px;background:#0c1829}
.chart-quick-actions{left:59px;top:14px;padding:6px 7px;gap:5px;background:#12253bdb;border:1px solid #385673;border-radius:12px;box-shadow:0 10px 28px #0005}
.quick-actions-title{font-size:8px;letter-spacing:.9px;color:#79a3c2;font-weight:800;margin:0 6px 0 3px}
.chart-quick-actions button{height:30px;min-width:32px;border-radius:7px}
.chart-quick-actions button:hover{background:#26577d}
.cosmo-editor{background:#102137f5;border:1px solid #375674;border-radius:16px;box-shadow:0 25px 65px #0009;overflow:hidden}
.editor-head{background:linear-gradient(90deg,#15334f,#12263d);padding:17px 18px}
.editor-head strong{font-size:15.5px}
.editor-head button,.quick-menu-head button{width:30px;height:30px;border-radius:8px}
.editor-tabs{gap:7px}
.editor-tabs button{font-size:11.5px;font-weight:700}
.editor-row{font-size:12px;grid-template-columns:minmax(0,1fr) 125px;min-height:41px}
.editor-row input:not([type=checkbox]),.editor-row select{height:34px;border-radius:8px}
.editor-foot{padding:11px;gap:7px}
.editor-foot button{padding:9px 8px;border-radius:8px}
.quick-menu{top:103px;background:#12243aF8;border-radius:15px;padding:17px;box-shadow:0 25px 70px #0009}
.quick-indicator-grid button,.draw-grid button{border-radius:10px;min-height:52px}
.quick-indicator-grid button:hover,.draw-grid button:hover{transform:translateY(-1px)}
.clear-choices label{border-radius:10px;min-height:49px}
.modal{border-radius:17px}
.modal-backdrop{backdrop-filter:blur(5px)}
.search-result{border-radius:9px}
.toast{border-radius:12px;padding:12px 19px;font-size:12px}
/* Responsive layout keeps critical actions visible even on smaller screens. */
@media(max-width:1320px){.plain-tool{padding:8px 7px}.marketbar{gap:3px}.symbol-caption{display:none}.sidebar{width:270px;min-width:270px}}
@media(max-width:1100px){.appbar{height:50px;min-height:50px}.marketbar{height:45px;min-height:45px}.sidebar{width:245px;min-width:245px}.chart-quick-actions{left:54px}.quick-menu{top:95px}}
@media(max-width:870px){.marketbar{padding:0 8px}.timeframes button{padding:7px 6px}.sidebar{width:218px;min-width:218px}.quick-actions-title{display:none}}
@media(max-width:700px){.chart-quick-actions{left:8px;top:8px}.cosmo-editor{top:52px;max-height:calc(100% - 57px)}.quick-menu{top:91px}.sidebar{display:none}.marketbar{overflow:auto;scrollbar-width:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* Day mode — shell, menus, editor and entire page switch together with chart. */
html[data-theme="light"]{
 color-scheme:light;
 --bg:#edf3fb;--bar:#fff;--panel:#fff;--panel-alt:#f4f8fd;
 --surface:#eaf3ff;--border:#d7e3f0;--line:#d9e6f2;
 --text:#182c45;--muted:#647e9c;--soft:#35516e;
 --blue:#167ee1;--cyan:#0878c7;
}
html[data-theme="light"] body,html[data-theme="light"] #shell{background:#edf3fb;color:#1b324e}
html[data-theme="light"] .appbar{background:linear-gradient(105deg,#fff,#f6faff);border-color:#d6e4f1}
html[data-theme="light"] .workspace-id,html[data-theme="light"] .tabs-right{color:#48617a}
html[data-theme="light"] .workspace-caption,html[data-theme="light"] .brand-name small{color:#7791a9}
html[data-theme="light"] .feed-pill{background:#e9f6ff;border-color:#d2e9f9;color:#45687e}
html[data-theme="light"] .marketbar,html[data-theme="light"] .tabsbar,html[data-theme="light"] .chart-statusbar{background:#fff;border-color:#d5e2f0;color:#5d7790}
html[data-theme="light"] .chart-area,html[data-theme="light"] .chart-host{background:#fff}
html[data-theme="light"] .symbol-trigger{background:#f0f7ff;border-color:#cddff0;color:#153457}
html[data-theme="light"] .symbol-trigger:hover,html[data-theme="light"] .plain-tool:hover,html[data-theme="light"] .icon-button:hover,html[data-theme="light"] .rail-item:hover{background:#e0efff;color:#085b9d}
html[data-theme="light"] .symbol-trigger .ico{color:#126eb3}
html[data-theme="light"] .kbd-hint{background:#fff;border-color:#d0e0ef;color:#697c90}
html[data-theme="light"] .symbol-caption{color:#567d9b}
html[data-theme="light"] .timeframes{background:#f1f6fc;border-color:#d5e3f0}
html[data-theme="light"] .timeframes button{color:#627e97}
html[data-theme="light"] .timeframes button:hover{background:#e4f0fd;color:#234e76}
html[data-theme="light"] .timeframes button.active{color:#1667ae;background:#d9ecff;box-shadow:none}
html[data-theme="light"] .plain-tool,html[data-theme="light"] .icon-button{color:#44647f}
html[data-theme="light"] .toolbar-separator,html[data-theme="light"] .appbar-divider{background:#d6e3f0}
html[data-theme="light"] .chart-tab{color:#667f96;border-right-color:#e1eaf4}
html[data-theme="light"] .chart-tab:hover{background:#eaf3fd}
html[data-theme="light"] .chart-tab.active{color:#214d76;background:#e8f4ff;border-bottom-color:#2087de}
html[data-theme="light"] .chart-tab .tab-close{color:#7b93aa}
html[data-theme="light"] .add-tab{color:#6384a1}
html[data-theme="light"] .sidebar,html[data-theme="light"] .side-rail,html[data-theme="light"] .sidebar-footer{background:#f9fcff;border-color:#d7e3f0}
html[data-theme="light"] .sidebar-top,html[data-theme="light"] .list-table-head{border-color:#e1e9f1}
html[data-theme="light"] .sidebar-title strong{color:#193652}
html[data-theme="light"] .sidebar-title small,html[data-theme="light"] .watch-meta,html[data-theme="light"] .list-table-head{color:#7890a5}
html[data-theme="light"] .watch-row{color:#223a55}
html[data-theme="light"] .watch-row:hover{background:#e9f3ff}
html[data-theme="light"] .watch-row.active{background:linear-gradient(90deg,#dfedff,#f2f8ff);border-left-color:#1e88e5}
html[data-theme="light"] .watch-exchange{color:#68849f}
html[data-theme="light"] .sidebar-info{background:linear-gradient(125deg,#eff7ff,#fff);border-color:#e0eaf3}
html[data-theme="light"] .sidebar-info-title,html[data-theme="light"] .sidebar-info>small{color:#6a87a2}
html[data-theme="light"] .sidebar-info strong{color:#1e4263}
html[data-theme="light"] .detail-actions button{background:#e5f1ff;border-color:#c8ddec;color:#276597}
html[data-theme="light"] .bottomdock{background:#f7fbff;border-color:#d7e3f0;color:#678197}
html[data-theme="light"] .chart-quick-actions{background:#fffffff2;border-color:#cbdfee;box-shadow:0 10px 25px #315a8e22}
html[data-theme="light"] .chart-quick-actions button{color:#35668e}
html[data-theme="light"] .chart-quick-actions button:hover{background:#e1f0ff;color:#1478c8}
html[data-theme="light"] .chart-quick-actions #open-editor{border-left-color:#d6e3f0;color:#137ec8}
html[data-theme="light"] .quick-actions-title{color:#7696ae}
html[data-theme="light"] .cosmo-editor,html[data-theme="light"] .quick-menu{background:#fffffffa;border-color:#caddeb;box-shadow:0 20px 50px #2a517329}
html[data-theme="light"] .editor-head{background:linear-gradient(90deg,#e7f3ff,#f7fbff);border-color:#dbe7f1}
html[data-theme="light"] .editor-head small{color:#347ead}
html[data-theme="light"] .editor-head strong,html[data-theme="light"] .quick-menu-head{color:#183c60}
html[data-theme="light"] .editor-head button,html[data-theme="light"] .quick-menu-head button{background:#deecf9;color:#37698c}
html[data-theme="light"] .editor-help,html[data-theme="light"] .editor-note,html[data-theme="light"] .quick-menu-foot{color:#6b86a0}
html[data-theme="light"] .editor-tabs,html[data-theme="light"] .editor-foot{border-color:#dae6f0}
html[data-theme="light"] .editor-tabs button{color:#6e8497}
html[data-theme="light"] .editor-tabs button.active{color:#106da9;border-color:#2a98e4}
html[data-theme="light"] .editor-content h4{color:#234c6e}
html[data-theme="light"] .editor-row{color:#45627c}
html[data-theme="light"] .editor-row>small{color:#7591a6}
html[data-theme="light"] .editor-row input:not([type=checkbox]),html[data-theme="light"] .editor-row select{background:#f5f9fe;color:#224b6c;border-color:#c4d9e8}
html[data-theme="light"] .editor-foot button,html[data-theme="light"] .editor-wide-button,html[data-theme="light"] .editor-buttonrow button{color:#225b85;background:#eaf4ff;border-color:#c8ddeb}
html[data-theme="light"] .editor-foot button.danger{color:#b5394e;background:#ffe8ed;border-color:#f5c3cc}
html[data-theme="light"] .fib-level-row,html[data-theme="light"] .clear-choices label{background:#f0f6fd;color:#234966;border-color:#d2e2ef}
html[data-theme="light"] .fib-level-row input[type=number]{background:#fff;color:#234966;border-color:#c5dbea}
html[data-theme="light"] .quick-menu p{color:#637f9a}
html[data-theme="light"] .quick-indicator-grid button,html[data-theme="light"] .draw-grid button{color:#2d526d;background:#f0f7ff;border-color:#d3e3f1}
html[data-theme="light"] .quick-indicator-grid button:hover,html[data-theme="light"] .draw-grid button:hover{background:#e1f0ff;border-color:#8ac4f3}
html[data-theme="light"] .quick-indicator-grid button small{color:#7092a9}
html[data-theme="light"] .quick-all{background:#e3f2ff;border-color:#bad9f2;color:#207cb8}
html[data-theme="light"] .modal-backdrop{background:#182e4659}
html[data-theme="light"] .modal{background:#fff;border-color:#cedfea;color:#213e59;box-shadow:0 25px 75px #1630472c}
html[data-theme="light"] .modal h2{color:#173d5f}
html[data-theme="light"] .modal-heading{border-color:#d7e4f0}
html[data-theme="light"] .modal-eyebrow,html[data-theme="light"] .modal-footnote{color:#7494a8}
html[data-theme="light"] .search-control{background:#f1f7fe;border-color:#d3e3f1;color:#446c8b}
html[data-theme="light"] .search-control input{color:#1c4160}
html[data-theme="light"] .sourcebar,html[data-theme="light"] .search-results-label{color:#59758d}
html[data-theme="light"] .sourcebar select{background:#f1f7fe;color:#284c6a;border-color:#d2e2ee}
html[data-theme="light"] .search-result{color:#234664}
html[data-theme="light"] .search-result:hover{background:#edf6ff}
html[data-theme="light"] .search-result-main small,html[data-theme="light"] .search-result-ex{color:#6b8aa1}
html[data-theme="light"] .search-empty,html[data-theme="light"] .about-lead,html[data-theme="light"] .shortcuts>div{color:#647e93}
html[data-theme="light"] .shortcuts>div{border-color:#dce7f1}
html[data-theme="light"] .shortcuts kbd{background:#eef6ff;color:#386e99;border-color:#d2e3f0}
html[data-theme="light"] .clear-choices label:has(input:checked){background:#e1f1ff;border-color:#65b7eb}
html[data-theme="light"] .plain-button{background:#edf5ff;color:#245c83;border-color:#c7dceb}
html[data-theme="light"] .modal-close{color:#426c8c}
html[data-theme="light"] #fatal{background:#ffffffef;color:#173d60}
html[data-theme="light"] #fatal p{color:#637f97}
html[data-theme="light"] .toast{background:#ecf7ff;color:#1e4d70;border-color:#9dcfee;box-shadow:0 12px 35px #1b4d732d}

/* Keep compact toolbar readable instead of wrapping the market ticker. */
.symbol-trigger{white-space:nowrap;flex-shrink:0}
.symbol-trigger #current-short{white-space:nowrap}
.marketbar .timeframes,.marketbar .plain-tool,.marketbar .icon-button,.marketbar .save-button{flex-shrink:0}
@media(max-width:1500px){#header-indicators,#header-objects{display:none}}
@media(max-width:1200px){#header-settings span,.marketbar .clear-action span{display:none}}
/* Keep one clear entry point per action — no crowded duplicate toolbar items. */
.marketbar #header-indicators,.marketbar #header-objects{display:none}

/* COSMO CHART v0.4 — fully monochrome application theme.
   Market candles keep positive/negative colors for trading legibility. */
html[data-theme="dark"] {
  color-scheme:dark;
  --bg:#080808;--bar:#101010;--panel:#111111;--panel-alt:#171717;
  --surface:#191919;--border:#313131;--line:#303030;
  --text:#fff;--muted:#c6c6c6;--soft:#e6e6e6;
  --blue:#e4e4e4;--cyan:#e7e7e7;
  --mono-root:#080808;--mono-bar:#111111;--mono-panel:#151515;--mono-raise:#202020;
  --mono-text:#ffffff;--mono-muted:#c8c8c8;--mono-border:#353535;--mono-focus:#a9a9a9;
}
html[data-theme="light"] {
  color-scheme:light;
  --bg:#fff;--bar:#fff;--panel:#fff;--panel-alt:#f7f7f7;
  --surface:#f3f3f3;--border:#d7d7d7;--line:#e5e5e5;
  --text:#111;--muted:#404040;--soft:#202020;
  --blue:#242424;--cyan:#282828;
  --mono-root:#fff;--mono-bar:#fafafa;--mono-panel:#fff;--mono-raise:#f0f0f0;
  --mono-text:#101010;--mono-muted:#474747;--mono-border:#cecece;--mono-focus:#444444;
}
html[data-theme] body,html[data-theme] #shell,
html[data-theme] .chart-area,html[data-theme] .chart-host,
html[data-theme] .appbar,html[data-theme] .marketbar,html[data-theme] .tabsbar,
html[data-theme] .sidebar,html[data-theme] .side-rail,html[data-theme] .sidebar-footer,
html[data-theme] .chart-statusbar,html[data-theme] .bottomdock,
html[data-theme] .list-table-head,html[data-theme] .sidebar-top {
  background:var(--mono-root)!important;background-image:none!important;color:var(--mono-text)!important;
  border-color:var(--mono-border)!important;
}
html[data-theme] .appbar,html[data-theme] .marketbar,html[data-theme] .tabsbar,
html[data-theme] .sidebar,html[data-theme] .side-rail,html[data-theme] .sidebar-info,
html[data-theme] .bottomdock {background:var(--mono-bar)!important;background-image:none!important;}
html[data-theme] .feed-pill,html[data-theme] .symbol-trigger,
html[data-theme] .timeframes,html[data-theme] .timeframes button.active,
html[data-theme] .chart-tab.active,html[data-theme] .chart-quick-actions,
html[data-theme] .sidebar-info,html[data-theme] .detail-actions button,
html[data-theme] .sidebar .watch-row.active,html[data-theme] .quick-menu,
html[data-theme] .cosmo-editor,html[data-theme] .modal,
html[data-theme] .toast,html[data-theme] .search-control,
html[data-theme] .sourcebar,html[data-theme] .search-result,
html[data-theme] .quick-indicator-grid button,html[data-theme] .draw-grid button,
html[data-theme] .clear-choices label,html[data-theme] .editor-head,
html[data-theme] .editor-foot button,html[data-theme] .editor-row input,
html[data-theme] .editor-row select,html[data-theme] .fib-level-row,
html[data-theme] .fib-level-row input,html[data-theme] .editor-wide-button,
html[data-theme] .editor-buttonrow button,html[data-theme] .modal select,
html[data-theme] .modal input,html[data-theme] .settings-chart-button,
html[data-theme] .save-button,html[data-theme] .primary-button,
html[data-theme] .plain-button,html[data-theme] .danger-button,
html[data-theme] .top-avatar,html[data-theme] .search-results,
html[data-theme] .clear-footer button,html[data-theme] .quick-all {
  background:var(--mono-panel)!important;background-image:none!important;
  color:var(--mono-text)!important;border-color:var(--mono-border)!important;
  box-shadow:none!important;
}
html[data-theme] .watch-row:hover,html[data-theme] .search-result:hover,
html[data-theme] .plain-tool:hover,html[data-theme] .icon-button:hover,
html[data-theme] .chart-tab:hover,html[data-theme] .timeframes button:hover,
html[data-theme] .rail-item:hover,html[data-theme] .quick-menu button:hover,
html[data-theme] .editor-foot button:hover,html[data-theme] .settings-chart-button:hover,
html[data-theme] .settings-section select:hover {
  background:var(--mono-raise)!important;background-image:none!important;color:var(--mono-text)!important;
}
html[data-theme] .marketbar button,html[data-theme] .quick-menu button,
html[data-theme] .modal button,html[data-theme] .sidebar button,
html[data-theme] .chart-tab,html[data-theme] .sidebar-title,
html[data-theme] .sidebar-info,html[data-theme] .bottomdock *,
html[data-theme] .editor-head *,html[data-theme] .editor-content *,
html[data-theme] .watch-name,html[data-theme] .tabs-right,
html[data-theme] .workspace-id,html[data-theme] .brand-name,
html[data-theme] .brand-name strong,html[data-theme] .brand-name small {
  color:var(--mono-text)!important;
}
html[data-theme] .watch-meta,html[data-theme] .watch-exchange,
html[data-theme] .sidebar-title small,html[data-theme] .workspace-caption,
html[data-theme] .symbol-caption,html[data-theme] .status-cluster,
html[data-theme] .modal-footnote,html[data-theme] .editor-help,
html[data-theme] .editor-note,html[data-theme] .modal p,
html[data-theme] .quick-menu p,html[data-theme] .quick-menu small,
html[data-theme] .quick-menu-foot,html[data-theme] .sourcebar span,
html[data-theme] .search-results-label,html[data-theme] .settings-section p {
  color:var(--mono-muted)!important;
}
html[data-theme] .watch-row.active,html[data-theme] .chart-tab.active,
html[data-theme] .timeframes button.active,html[data-theme] .rail-item.selected,
html[data-theme] .clear-choices label:has(input:checked) {
  background:var(--mono-raise)!important;border-color:var(--mono-text)!important;
}
html[data-theme] .chart-tab.active {border-bottom:2px solid var(--mono-text)!important;}
html[data-theme] .top-avatar {border:1px solid var(--mono-border)!important;}
html[data-theme] .saturn {filter:grayscale(1) brightness(1.3);}
html[data-theme="light"] .saturn {filter:grayscale(1) brightness(.74);}
html[data-theme] .watch-coin,html[data-theme] .asset-badge {background:var(--mono-raise)!important;color:var(--mono-text)!important;border-color:var(--mono-border)!important;}
html[data-theme] .asset-badge img {filter:grayscale(1);background:var(--mono-raise)!important;}
html[data-theme] .tab-dot,html[data-theme] .top-status-pulse,
html[data-theme] .workspace-dot {background:var(--mono-text)!important;box-shadow:none!important;}
html[data-theme] .market-led,html[data-theme] .connection-dot {box-shadow:none!important;}
html[data-theme] .danger-button,html[data-theme] .clear-action {color:var(--mono-text)!important;}
html[data-theme] input[type=checkbox],html[data-theme] input[type=radio] {accent-color:var(--mono-text);}
html[data-theme="light"] input[type=checkbox],html[data-theme="light"] input[type=radio] {accent-color:#222;}
html[data-theme] button:focus-visible,html[data-theme] input:focus-visible,
html[data-theme] select:focus-visible {outline:2px solid var(--mono-focus)!important;outline-offset:2px;}
html[data-theme] .modal-backdrop {background:#0009!important;}
html[data-theme] .editor-head,html[data-theme] .modal-heading,html[data-theme] .editor-tabs,
html[data-theme] .sidebar-top,html[data-theme] .settings-section {border-color:var(--mono-border)!important;}
html[data-theme] .timeframes button,html[data-theme] .plain-tool,
html[data-theme] .icon-button,html[data-theme] .sidebar-info-title,
html[data-theme] .sidebar-footer,html[data-theme] .search-result-ex,
html[data-theme] .quick-actions-title,html[data-theme] .editor-tabs button,
html[data-theme] .modal-eyebrow,html[data-theme] .editor-content h4,
html[data-theme] .clear-choices label,html[data-theme] .search-result-main,
html[data-theme] .search-result-main small {color:var(--mono-text)!important;}
/* OpenAlgo sets these variables inline; !important intentionally wins. */
html[data-theme] #terminal .oac-widget {
  --oac-bg:var(--mono-root)!important;
  --oac-panel:var(--mono-bar)!important;
  --oac-panel-2:var(--mono-panel)!important;
  --oac-elev:var(--mono-panel)!important;
  --oac-elev-2:var(--mono-raise)!important;
  --oac-elev-3:var(--mono-raise)!important;
  --oac-bd:var(--mono-border)!important;
  --oac-bd-soft:var(--mono-border)!important;
  --oac-bd-hover:var(--mono-muted)!important;
  --oac-tx:var(--mono-text)!important;
  --oac-tx-strong:var(--mono-text)!important;
  --oac-mut:var(--mono-muted)!important;
  --oac-faint:var(--mono-muted)!important;
  --oac-acc:var(--mono-text)!important;
  --oac-acc-2:var(--mono-muted)!important;
  --oac-ring:var(--mono-muted)!important;
  --oac-ring-soft:var(--mono-border)!important;
  --oac-sb-thumb:var(--mono-border)!important;
  --oac-sb-thumb-hover:var(--mono-muted)!important;
  --oac-on-bg:var(--mono-text)!important;
  --oac-on-bd:var(--mono-border)!important;
}
/* The widget may portal popovers directly to document.body; their tokens are inherited
   from the widget theme object supplied to createWidget. */
.app-settings {max-width:540px;}
.settings-section{padding:18px 22px;border-bottom:1px solid var(--mono-border);display:flex;align-items:center;justify-content:space-between;gap:18px;}
.settings-section strong{font-size:13px;display:block;}
.settings-section p{font-size:11px;line-height:1.5;margin:7px 0 0;max-width:330px;}
.settings-section select{flex-shrink:0;min-width:122px;border:1px solid var(--mono-border);border-radius:10px;padding:10px;background:var(--mono-panel);color:var(--mono-text);}
.settings-chart-button{margin:16px 22px 20px;width:calc(100% - 44px);padding:12px;border:1px solid var(--mono-border);border-radius:10px;text-align:center;cursor:pointer;}
@media(max-width:540px){.settings-section{flex-wrap:wrap}.settings-section select{width:100%}}
/* Final contrast rule: no inherited navy/blue text survives in either shell or dialogs. */
html[data-theme] #shell :not(.oac-widget):not(.oac-widget *),
html[data-theme] .modal :not(.oac-widget):not(.oac-widget *),
html[data-theme] .quick-menu :not(.oac-widget):not(.oac-widget *),
html[data-theme] .toast :not(.oac-widget):not(.oac-widget *) {
  color:var(--mono-text)!important;
}


/* COSMO CHART v0.5 — softer objects / layers panel */
.modal-objects{width:min(1180px,calc(100vw - 40px));max-width:1180px;max-height:min(840px,calc(100vh - 40px));display:flex;flex-direction:column}
.objects-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:10px;padding-top:2px}
.objects-filters{display:flex;gap:8px;flex-wrap:wrap}
.objects-filter{border:1px solid var(--mono-border);background:var(--mono-panel);color:var(--mono-text);border-radius:999px;padding:10px 14px;font:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease,transform .15s ease}
.objects-filter:hover{transform:translateY(-1px)}
.objects-filter.active{background:var(--mono-raise)!important;border-color:var(--mono-text)!important}
.objects-count{color:var(--mono-muted);font-size:13px}
.objects-layout{display:grid;grid-template-columns:minmax(360px,1.1fr) minmax(320px,.9fr);gap:18px;margin-top:16px;min-height:420px}
.objects-list-wrap,.objects-detail{background:var(--mono-panel)!important;border:1px solid var(--mono-border)!important;border-radius:18px;padding:14px 14px 16px;min-height:0}
.objects-list-wrap{display:flex;flex-direction:column}
.objects-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 2px 12px;color:var(--mono-muted);font-size:13px}
.objects-list{display:flex;flex-direction:column;gap:10px;overflow:auto;padding-right:4px}
.objects-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;border:1px solid var(--mono-border)!important;border-radius:16px;background:var(--mono-root)!important;padding:12px 12px;cursor:pointer;transition:background .15s ease,border-color .15s ease,transform .15s ease}
.objects-row:hover{background:var(--mono-raise)!important;transform:translateY(-1px)}
.objects-row.active{background:var(--mono-raise)!important;border-color:var(--mono-text)!important}
.objects-icon{width:38px;height:38px;border-radius:12px;border:1px solid var(--mono-border)!important;display:grid;place-items:center;background:var(--mono-panel)!important;color:var(--mono-text)!important;font-weight:700;font-size:15px;overflow:hidden}
.objects-icon small{font-size:13px;line-height:1}
.objects-main{min-width:0;display:flex;flex-direction:column;gap:3px}
.objects-main strong{font-size:14px;line-height:1.25;color:var(--mono-text)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.objects-main span{font-size:12px;color:var(--mono-muted)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.objects-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.objects-actions button{width:34px;height:34px;border-radius:10px;border:1px solid var(--mono-border)!important;background:var(--mono-panel)!important;color:var(--mono-text)!important;cursor:pointer;font:inherit}
.objects-actions button:hover{background:var(--mono-raise)!important}
.objects-actions .danger-lite{border-color:#7b4646!important;color:#ffdbdb!important}
.objects-empty{padding:32px 18px;text-align:center;color:var(--mono-muted)}
.objects-detail{display:flex;flex-direction:column;gap:16px;overflow:auto}
.objects-empty-state{margin:auto 0;color:var(--mono-muted)}
.objects-empty-state strong{display:block;margin-bottom:8px;color:var(--mono-text)!important;font-size:16px}
.objects-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.objects-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--mono-border)!important;background:var(--mono-root)!important;color:var(--mono-muted)!important;border-radius:999px;padding:6px 10px;font-size:12px}
.objects-card-title strong{display:block;font-size:20px;line-height:1.2;margin-bottom:6px;color:var(--mono-text)!important}
.objects-card-title p{margin:0;color:var(--mono-muted)!important;font-size:13px}
.objects-section{display:flex;flex-direction:column;gap:10px}
.objects-section h4{margin:0;font-size:13px;color:var(--mono-muted)!important;text-transform:uppercase;letter-spacing:.04em}
.objects-button-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.objects-button-grid button,.objects-wide-button,.objects-secondary-row button{border:1px solid var(--mono-border)!important;background:var(--mono-root)!important;color:var(--mono-text)!important;border-radius:14px;padding:12px 12px;font:inherit;cursor:pointer;text-align:left}
.objects-button-grid button small,.objects-wide-button small{display:block;margin-top:4px;color:var(--mono-muted)!important;font-size:12px}
.objects-button-grid button:hover,.objects-wide-button:hover,.objects-secondary-row button:hover{background:var(--mono-raise)!important}
.objects-secondary-row{display:flex;gap:10px;flex-wrap:wrap}
.objects-wide-button{width:100%}
.objects-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.objects-stat{border:1px solid var(--mono-border)!important;background:var(--mono-root)!important;border-radius:14px;padding:12px 12px}
.objects-stat small{display:block;color:var(--mono-muted)!important;font-size:12px;margin-bottom:6px}
.objects-stat strong{font-size:14px;color:var(--mono-text)!important}
@media (max-width:960px){.modal-objects{width:min(100vw - 20px,1180px)}.objects-layout{grid-template-columns:1fr}.objects-detail{min-height:240px}}


/* COSMO CHART v0.6 — comfortable hit areas, genuine monochrome shell */
.chart-quick-actions{display:none!important} /* Permanently removed from HTML; old CSS is harmless. */
#search-modal .modal{width:min(735px,calc(100vw - 22px));max-height:min(850px,calc(100vh - 30px));padding:23px}
#search-modal .search-control{height:50px;border-radius:13px}
#search-modal .search-control input{font-size:14px}
#search-modal .sourcebar{padding:12px 0}
#search-modal .sourcebar select{min-height:39px;border-radius:10px}
.market-discovery-controls{display:flex;gap:10px;margin:15px 0 10px;align-items:center;flex-wrap:wrap}
.market-discovery-controls label{flex:1;min-width:175px;display:flex;gap:6px;flex-direction:column}
.market-discovery-controls label span{font-size:11px;color:var(--mono-muted)!important}
.market-discovery-controls select{appearance:auto;border:1px solid var(--mono-border)!important;background:var(--mono-panel)!important;color:var(--mono-text)!important;border-radius:11px;padding:10px 12px;height:42px}
.search-results-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}
.search-results-meta #market-page-hint{font-size:11px;color:var(--mono-muted)!important}
#search-modal .search-results-label{margin:12px 0 9px}
#search-modal .search-results{max-height:min(50vh,475px);scrollbar-color:var(--mono-border) transparent}
#search-modal .search-result{min-height:61px;padding:10px 12px;gap:12px;border-radius:12px}
#search-modal .search-result + .search-result{border-top:1px solid var(--mono-border)}
#search-modal .search-result-main strong{font-size:13px;line-height:1.3}
#search-modal .search-result-main small{font-size:11px}
#search-modal .search-result-bubble{width:37px;height:37px;font-size:11px}
.search-result-metrics{min-width:96px;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:3px;white-space:nowrap;font-size:11px}
.search-result-metrics .market-percent{font-size:13px;font-weight:750;font-variant-numeric:tabular-nums}
.search-result-metrics .market-percent.pos{color:#22ba8b!important}
.search-result-metrics .market-percent.neg{color:#ef6767!important}
.search-result-metrics small{font-size:10px;color:var(--mono-muted)!important}
.market-catalog-hint{padding:10px 13px;margin:0 0 5px;border:1px solid var(--mono-border)!important;background:var(--mono-panel)!important;color:var(--mono-muted)!important;border-radius:11px;font-size:11px;line-height:1.5}
.market-load-more{display:block;width:100%;border:1px solid var(--mono-border)!important;background:var(--mono-panel)!important;color:var(--mono-text)!important;border-radius:12px;margin-top:10px;min-height:41px;font-weight:650}
.market-load-more:hover{background:var(--mono-raise)!important}
.quick-menu{width:min(414px,calc(100vw - 24px));padding:18px!important;border-radius:17px;box-shadow:0 15px 45px #0005}
.quick-menu-head button{min-width:37px;min-height:37px;font-size:20px}
.draw-grid,.quick-indicator-grid{gap:9px!important}
.draw-grid button,.quick-indicator-grid button{min-height:47px;padding:11px 12px!important;border-radius:12px!important;line-height:1.35!important}
.draw-grid button span{font-size:12px!important}
.quick-indicator-grid button small{font-size:11px!important}
.quick-menu .quick-all{min-height:44px;border-radius:11px}
/* Native drawing rail — larger targets without turning the sidebar into a giant block. */
#terminal .oac-widget button:focus-visible{outline:2px solid var(--mono-text)!important;outline-offset:1px}
#terminal .oac-widget [role="toolbar"] button{min-width:36px;min-height:36px}
.chart-bottom-actions{position:absolute;z-index:18;left:61px;bottom:12px;display:flex;gap:5px;align-items:center;background:var(--mono-panel)!important;color:var(--mono-text)!important;border:1px solid var(--mono-border)!important;border-radius:13px;padding:5px;box-shadow:0 8px 20px #0005}
.chart-bottom-actions button{width:33px;height:33px;border:0;background:transparent;color:var(--mono-text)!important;border-radius:9px;display:grid;place-items:center;font-size:18px;font-weight:650;line-height:1}
.chart-bottom-actions button:hover{background:var(--mono-raise)!important}
.chart-bottom-actions button:focus-visible{outline:2px solid var(--mono-text)}
.chart-bottom-actions .actions-separator{height:18px;width:1px;background:var(--mono-border)}
.bottomdock .dock-tab{color:var(--mono-muted)!important;border-bottom-color:transparent!important;font-size:12px;font-weight:550;white-space:nowrap}
.bottomdock .dock-tab.active{color:var(--mono-text)!important;border-bottom-color:var(--mono-text)!important}
.bottomdock .dock-tab:hover{color:var(--mono-text)!important}
/* Token logo images remain colorful against the black/white app theme. */
html[data-theme] .asset-badge img{filter:none!important;background:transparent!important}
html[data-theme] .asset-badge{background:var(--mono-raise)!important;color:var(--mono-text)!important}
@media(max-width:760px){#search-modal .modal{padding:14px}.chart-bottom-actions{left:12px;bottom:12px}.market-discovery-controls label{min-width:125px}.quick-menu{left:8px;top:93px} .bottomdock .bottom-caption{display:none}}
@media(max-width:480px){.search-result-metrics{min-width:78px}.bottomdock .dock-tab{font-size:11px;padding:0 4px}.chart-bottom-actions{padding:3px}}


/* COSMO CHART v0.7 — native monochrome workspace manager */
.workspace-open{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;padding:8px 12px;color:var(--mono-text);background:var(--mono-panel);border:1px solid var(--mono-border);border-radius:10px;cursor:pointer;font-size:12px;font-weight:600}
.workspace-open:hover{background:var(--mono-raise)}
.modal-workspaces{width:min(800px,calc(100vw - 24px));max-width:800px;max-height:min(850px,calc(100dvh - 28px));overflow:auto}
.workspace-intro{color:var(--mono-muted);font-size:13px;line-height:1.5;margin:14px 0 18px}
.workspace-save-form{background:var(--mono-panel);padding:17px;border:1px solid var(--mono-border);border-radius:16px;display:flex;flex-direction:column;gap:10px}
.workspace-save-form label{font-weight:600;color:var(--mono-text);font-size:13px}
.workspace-save-form small{font-size:12px;color:var(--mono-muted)}
.workspace-save-line{display:flex;gap:8px;flex-wrap:wrap}
.workspace-save-line input{background:var(--mono-root)!important;color:var(--mono-text)!important;border:1px solid var(--mono-border)!important;border-radius:10px;min-width:165px;flex:1;min-height:39px;padding:9px 12px;font-size:13px}
.workspace-main-button,.workspace-secondary-button{border:1px solid var(--mono-border)!important;background:var(--mono-raise)!important;color:var(--mono-text)!important;border-radius:10px;padding:10px 13px;cursor:pointer;font:inherit;font-size:12px;font-weight:600}
.workspace-main-button{background:var(--mono-text)!important;color:var(--mono-root)!important;border-color:var(--mono-text)!important}
.workspace-main-button:hover,.workspace-secondary-button:hover{opacity:.84}
.workspace-section-head{display:flex;justify-content:space-between;align-items:center;margin:20px 2px 10px;color:var(--mono-text)}
.workspace-section-head strong{font-size:13px}
.workspace-section-head span{color:var(--mono-muted);font-size:12px}
.workspace-items{display:flex;flex-direction:column;gap:8px;max-height:246px;overflow:auto}
.workspace-item{border:1px solid var(--mono-border);background:var(--mono-panel);border-radius:14px;padding:12px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.workspace-item.active{border-color:var(--mono-text)}
.workspace-item-content{min-width:0;display:flex;flex-direction:column;gap:5px}
.workspace-item-content strong{font-size:13px;color:var(--mono-text);overflow-wrap:anywhere}
.workspace-item-content small{font-size:11px;color:var(--mono-muted)}
.workspace-item-actions,.workspace-tools{display:flex;gap:6px;flex-wrap:wrap}
.workspace-item-actions button{border:1px solid var(--mono-border);color:var(--mono-text);background:var(--mono-root);font:inherit;font-size:11px;font-weight:600;border-radius:8px;padding:8px 10px;cursor:pointer}
.workspace-item-actions button:hover{background:var(--mono-raise)}
.workspace-item-actions .workspace-danger{opacity:.76}
.workspace-empty{font-size:13px;color:var(--mono-muted);padding:15px;border:1px dashed var(--mono-border);border-radius:12px}
.quote-freshness{white-space:nowrap;color:var(--mono-muted);font-size:11px}
.quote-freshness[data-stale="true"]{font-weight:700;text-decoration:underline;text-decoration-style:dotted}
/* Trading assets can retain their real logos; only UI furniture is monochrome. */
html[data-theme] .asset-badge img{filter:none!important;opacity:1!important;mix-blend-mode:normal!important}
@media(max-width:980px){.workspace-open span{display:none}}
@media(max-width:640px){.workspace-save-line{flex-direction:column}.workspace-save-line input{flex:none;width:100%}.workspace-item{flex-direction:column;align-items:stretch}.workspace-item-actions{justify-content:flex-start}.modal-workspaces{width:calc(100vw - 14px)}}

/* Micro-polish: icons across search, tabs, header and watchlist. */
.current-asset-icon{display:inline-flex;flex:none;align-items:center;justify-content:center}
.header-coin{width:24px!important;height:24px!important;min-width:24px!important;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--mono-border);border-radius:50%;font-size:10px;overflow:hidden}
.tab-asset-icon{width:20px!important;height:20px!important;min-width:20px!important;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;font-size:9px;overflow:hidden;vertical-align:middle}
.header-coin img,.tab-asset-icon img{width:100%!important;height:100%!important;border-radius:50%;object-fit:contain}
.watch-item{display:flex;align-items:center;gap:3px;width:100%;min-width:0}
.watch-item .watch-row{flex:1;min-width:0;width:auto}
.watch-remove{background:transparent;border:1px solid transparent;color:var(--mono-muted);border-radius:8px;font-size:20px;line-height:1;width:28px;height:32px;opacity:.4;cursor:pointer;flex:none}
.watch-item:hover .watch-remove,.watch-remove:focus-visible{opacity:1}
.watch-remove:hover{background:var(--mono-raise);border-color:var(--mono-border)}

/* v0.8: clean charting UI, always-visible coin logos and live 24h metrics. */
#market-refresh-status{font-size:11px;color:var(--mono-muted);margin-right:12px;white-space:nowrap}
#search-modal .search-results{max-height:min(55vh,600px)}
.search-result-metrics .market-percent.flat{color:#909090!important}
.search-result-metrics .market-percent.unknown{color:#8a8a8a!important}
.search-result-metrics .market-percent.pos{color:#29b77d!important}
.search-result-metrics .market-percent.neg{color:#e66b70!important}
html[data-theme] .asset-badge img{opacity:1;filter:none!important;mix-blend-mode:normal!important;background:transparent!important;display:block!important;}
#search-modal .search-result{min-height:48px}
#search-modal .search-result-main strong{font-size:13px}
#search-modal .search-result-metrics{min-width:90px}
#search-modal .search-result-metrics .market-percent{font-size:13px}

/* v0.9 five exact stroke presets — every supported shape / Fibonacci family */
.stroke-preset-picker{display:flex;align-items:stretch;gap:6px;width:100%;max-width:340px}
.stroke-preset{min-width:0;flex:1;background:var(--mono-panel)!important;border:1px solid var(--mono-border)!important;border-radius:9px;min-height:53px;padding:8px 4px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:8px;color:var(--mono-text)!important;cursor:pointer;font:inherit;font-size:12px}
.stroke-preset:hover{background:var(--mono-raise)!important}
.stroke-preset.selected{border-color:var(--mono-text)!important;background:var(--mono-raise)!important}
.stroke-demo{display:block;width:75%;min-height:0.5px;background:var(--mono-text)!important;border-radius:1px;flex:none}
.clear-locked-option{display:flex;gap:10px;align-items:center;padding:12px 2px;font-size:13px;color:var(--mono-text)!important;cursor:pointer}
.clear-locked-option input{accent-color:var(--mono-text)}

/* COSMO CHART v0.9.1 — compact native-like adaptive tool dock. */
:root{--cosmo-rail-width:78px}
#terminal{box-sizing:border-box;padding-left:var(--cosmo-rail-width)}
.cosmo-tool-rail{position:absolute;top:0;bottom:0;left:0;width:var(--cosmo-rail-width);z-index:23;display:flex;flex-direction:column;align-items:center;gap:4px;padding:9px 4px 8px;background:var(--mono-bar);border-right:1px solid var(--mono-border);color:var(--mono-text)}
.cosmo-tool-main{min-height:0;width:100%;display:flex;flex-direction:column;align-items:center;gap:clamp(2px,0.5vh,6px);flex:1;justify-content:flex-start}
.cosmo-rail-key{width:100%;height:min(calc(var(--cosmo-rail-width) * .78),calc((100dvh - 270px)/8));min-height:28px;flex-shrink:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;border:1px solid transparent;background:transparent;color:var(--mono-text);border-radius:10px;cursor:pointer}
.cosmo-rail-key:hover,.cosmo-rail-key.active{background:var(--mono-raise)!important;border-color:var(--mono-border)!important}
.cosmo-rail-key .tool-mark{font-weight:500;line-height:1.1;font-size:clamp(18px,calc(var(--cosmo-rail-width) * .27),28px);font-family:system-ui,sans-serif}
.cosmo-rail-key .rail-label{color:var(--mono-muted);font-size:clamp(8px,calc(var(--cosmo-rail-width) * .155),12px);line-height:1.25;white-space:nowrap}
.rail-size-controls{display:flex;width:100%;align-items:center;justify-content:space-between;gap:2px;margin-top:auto}
.rail-size-controls button{font:inherit;font-size:17px;width:28px;height:28px;background:var(--mono-panel);border:1px solid var(--mono-border);border-radius:8px;color:var(--mono-text);cursor:pointer}
.rail-size-controls span{font-size:10px;color:var(--mono-muted)}
.rail-grip{position:absolute;right:-4px;top:0;bottom:0;width:7px;cursor:ew-resize;touch-action:none}
.rail-grip:focus-visible{outline:1px solid var(--mono-text)}
.cosmo-tool-popover{position:absolute;top:16px;left:calc(var(--cosmo-rail-width) + 8px);z-index:45;width:min(410px,calc(100vw - var(--cosmo-rail-width) - 70px));padding:14px;border:1px solid var(--mono-border);border-radius:15px;background:var(--mono-bar);color:var(--mono-text);box-shadow:0 14px 45px #0007}
.cosmo-tool-popover[hidden],.cosmo-tool-label[hidden],.capture-menu[hidden],.modal-backdrop[hidden]{display:none!important}
.tool-popover-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.tool-popover-head strong{font-size:14px;font-weight:650}
.tool-popover-head button{height:30px;width:30px;border:1px solid var(--mono-border);border-radius:8px;background:var(--mono-panel);color:var(--mono-text)}
.tool-popover-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-height:150px}
.tool-choice{display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;min-width:0;min-height:64px;padding:8px 5px;border:1px solid var(--mono-border);border-radius:11px;color:var(--mono-text);background:var(--mono-panel);font:inherit;cursor:pointer;font-size:11px;line-height:1.25;word-break:break-word;text-align:center}
.tool-choice:hover{background:var(--mono-raise);border-color:var(--mono-text)}
.tool-choice-icon{font-size:19px;line-height:1.1}
.tool-popover-foot{display:flex;justify-content:center;align-items:center;gap:15px;margin-top:12px;font-size:12px}
.tool-popover-foot button{width:33px;height:29px;border:1px solid var(--mono-border);background:var(--mono-panel);color:var(--mono-text);border-radius:9px;font-size:20px;cursor:pointer}
.tool-popover-foot button:disabled{opacity:.28;cursor:default}
.tool-empty{grid-column:1/-1;padding:25px 10px;color:var(--mono-muted);text-align:center}
.cosmo-tool-label{position:absolute;z-index:50;top:12px;left:calc(var(--cosmo-rail-width) + 12px);padding:9px 13px;background:var(--mono-bar);border:1px solid var(--mono-border);border-radius:11px;color:var(--mono-text);box-shadow:0 9px 30px #0006;max-width:260px;font-size:13px;pointer-events:none}
.chart-bottom-actions{left:calc(var(--cosmo-rail-width) + 10px)!important}
.capture-menu{position:fixed;z-index:210;top:95px;right:100px;background:var(--mono-bar);border:1px solid var(--mono-border);border-radius:11px;box-shadow:0 15px 35px #0008;padding:6px;display:flex;flex-direction:column;gap:2px;min-width:130px}
.capture-menu button{background:transparent;border:0;padding:10px 12px;border-radius:7px;color:var(--mono-text);font:inherit;text-align:left;cursor:pointer}
.capture-menu button:hover{background:var(--mono-raise)}
/* Native capture action is superseded by PNG, JPEG and Clipboard; no CSV/SVG in screenshot menu. */
#terminal .oac-widget button[aria-label="Capture"],#terminal .oac-widget button[title="Capture"],#terminal .oac-widget button[aria-label="Снимок"],#terminal .oac-widget button[title="Снимок"]{display:none!important}
.live-chart-dialog{width:min(720px,calc(100vw - 24px));max-width:720px}
.live-chart-tabs{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:15px}
.live-chart-tabs button{border:1px solid var(--mono-border);background:var(--mono-panel);color:var(--mono-text);border-radius:9px;padding:9px 11px;font:inherit;cursor:pointer}
.live-chart-tabs button.active{border-color:var(--mono-text);background:var(--mono-raise)}
.live-chart-fields{display:flex;flex-direction:column;gap:5px;max-height:min(53vh,460px);overflow:auto;padding-right:6px}
.live-chart-fields h3{font-size:12px;color:var(--mono-muted);margin:12px 0 5px}
.live-field{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:39px;border-bottom:1px solid var(--mono-border);font-size:13px}
.live-field>label{flex:1;min-width:0;color:var(--mono-text)}
.live-field-control{display:flex;justify-content:flex-end;gap:7px;align-items:center}
.live-field-control input:not([type=checkbox]):not([type=color]),.live-field-control select{width:148px;max-width:40vw;background:var(--mono-panel);border:1px solid var(--mono-border);border-radius:8px;color:var(--mono-text);padding:7px 9px}
.live-field-control input[type=color],.layer-inline-editor input[type=color]{appearance:none;width:39px;height:30px;cursor:pointer;border:1px solid var(--mono-border);border-radius:8px;background:var(--mono-panel);padding:3px}
.live-field-control input[type=checkbox]{width:17px;height:17px;accent-color:var(--mono-text)}
.objects-row{grid-template-columns:auto minmax(0,1fr)!important;cursor:pointer}
.objects-detail{gap:11px}
.layer-edit-title{margin:0 0 4px;font-size:20px;color:var(--mono-text);line-height:1.25}
.layer-single-actions{display:flex;gap:6px;flex-wrap:wrap}
.layer-single-actions button{border:1px solid var(--mono-border);background:var(--mono-panel);color:var(--mono-text);font:inherit;border-radius:9px;padding:9px 10px;cursor:pointer;font-size:12px;flex:1;white-space:nowrap}
.layer-single-actions button:hover{background:var(--mono-raise)}
.layer-inline-editor{display:flex;flex-direction:column;gap:10px;padding:13px;background:var(--mono-root);border:1px solid var(--mono-border);border-radius:13px}
.layer-inline-editor h4{margin:3px 0 0;color:var(--mono-text);font-size:13px}
.layer-inline-editor .editor-row{min-height:40px}
.layer-inline-editor .editor-row select,.layer-inline-editor .editor-row input:not([type=color]){background:var(--mono-panel);color:var(--mono-text);border:1px solid var(--mono-border);border-radius:8px}
.layer-advanced{background:var(--mono-panel);border:1px solid var(--mono-border);border-radius:10px;color:var(--mono-text);padding:10px 12px;text-align:center;cursor:pointer;font:inherit}
.editor-above-modal{position:fixed!important;z-index:900!important;top:13vh!important;right:2vw!important;max-height:78vh!important}
html:has(#objects-modal:not([hidden])) #cosmo-editor.editor-above-modal{z-index:900!important}
@media(max-width:680px){
 .cosmo-tool-rail{padding:5px 2px}.cosmo-rail-key .rail-label{display:none}.cosmo-rail-key{min-height:28px}
 .cosmo-tool-popover{width:min(360px,calc(100vw - var(--cosmo-rail-width) - 25px))}.tool-popover-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .live-field-control input:not([type=checkbox]):not([type=color]),.live-field-control select{width:100px}
 .capture-menu{top:94px;right:18px}
}


/* COSMO Chart v0.10 — price-first layout, neutral chrome, fluent chart controls. */
html[data-theme="dark"]{
 --bg:#0d0e10;--bar:#131416;--panel:#151618;--panel-alt:#1a1b1e;
 --surface:#1e2023;--border:#2c2e32;--line:#282a2e;
 --text:#f1f2f3;--muted:#a9abb1;--soft:#ced0d4;
 --mono-root:#0d0e10;--mono-bar:#131416;--mono-panel:#18191b;
 --mono-raise:#232528;--mono-text:#f3f4f5;--mono-muted:#adb0b5;
 --mono-border:#303236;--mono-focus:#c4c5c8;
}
html[data-theme="light"]{
 --bg:#ffffff;--bar:#fafafa;--panel:#ffffff;--panel-alt:#f7f8f9;
 --surface:#f2f3f4;--border:#dcdfe2;--line:#e3e5e7;
 --text:#202125;--muted:#62666e;--soft:#303237;
 --mono-root:#ffffff;--mono-bar:#fafafa;--mono-panel:#ffffff;
 --mono-raise:#f0f1f3;--mono-text:#1b1c20;--mono-muted:#61656b;
 --mono-border:#dadde1;--mono-focus:#424449;
}
#shell{min-height:300px;}
.appbar{height:40px!important;min-height:40px!important;padding-inline:11px!important;gap:9px!important}
.marketbar{height:44px!important;min-height:44px!important;padding-inline:10px!important;gap:5px!important}
.tabsbar{height:30px!important;min-height:30px!important}
.chart-statusbar{height:22px!important;min-height:22px!important;padding-inline:9px!important}
.bottomdock{height:29px!important;min-height:29px!important}
.sidebar{width:233px!important;min-width:233px!important}
.sidebar-top{height:47px!important;min-height:47px!important;padding-inline:10px!important}
.sidebar-title small{display:none!important}
.list-table-head{height:27px!important;min-height:27px!important}
.sidebar-info{padding:10px 11px!important}
.sidebar-info strong{font-size:13px!important;margin-top:5px!important}
.sidebar-info>small{margin-top:2px!important;max-height:18px!important;overflow:hidden}
.sidebar-info-title{font-size:9px!important;letter-spacing:.04em!important}
.sidebar-info .detail-actions{margin-top:7px!important}
.sidebar-footer{display:none!important}
.watch-row{min-height:43px!important;padding:6px 10px!important;gap:7px!important}
.watch-coin{width:25px!important;height:25px!important}
.side-rail{width:38px!important;min-width:38px!important}
.rail-item{width:31px!important;height:31px!important}
#terminal{background:var(--mono-root)}
#terminal .oac-widget{--oac-radius:6px!important;--oac-font:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important}
/* TradingView-inspired restrained, informative colours (no blue backgrounds). */
.market-percent.pos{color:#089981!important}.market-percent.neg{color:#f23645!important}
.market-percent.flat{color:var(--mono-muted)!important}
.marketbar .symbol-trigger{padding:5px 8px!important;box-shadow:none!important}
.marketbar .plain-tool{padding:6px 8px!important;border-radius:7px}
.marketbar .save-button{border-radius:7px!important}
.cosmo-tool-rail{background:var(--mono-bar)!important}
.chart-navigation{position:absolute;right:15px;bottom:11px;z-index:35;display:flex;align-items:center;gap:2px;padding:5px;background:color-mix(in srgb,var(--mono-bar) 94%,transparent);border:1px solid var(--mono-border);border-radius:12px;box-shadow:0 8px 28px #0004;opacity:.80;transition:opacity .18s ease,transform .18s ease;backdrop-filter:blur(9px)}
.chart-navigation:hover,.chart-navigation:focus-within{opacity:1}
.chart-navigation button{width:32px;height:32px;min-width:32px;display:flex;align-items:center;justify-content:center;border:0;background:transparent;color:var(--mono-text);border-radius:8px;cursor:pointer}
.chart-navigation button:hover{background:var(--mono-raise)!important}
.chart-navigation button:active{transform:scale(.95)}
.chart-navigation .ico{width:17px;height:17px}
.chart-navigation .nav-divider{width:1px;height:19px;margin-inline:4px;background:var(--mono-border)}
.chart-navigation button[aria-pressed="true"]{background:var(--mono-raise)}
/* The fullscreen element is documentElement: all dialogs, sheets and popovers remain visible. */
html.chart-focus-mode #shell{height:100dvh!important;min-height:0!important}
html.chart-focus-mode .appbar,
html.chart-focus-mode .tabsbar,
html.chart-focus-mode .chart-statusbar,
html.chart-focus-mode .bottomdock,
html.chart-focus-mode .workspace .sidebar,
html.chart-focus-mode .workspace .side-rail{display:none!important}
html.chart-focus-mode .marketbar{height:42px!important;min-height:42px!important}
html.chart-focus-mode .chart-host{min-height:0!important}
html.chart-focus-mode .chart-navigation{opacity:1;bottom:13px;right:16px}
html.chart-focus-mode #header-objects{display:inline-flex!important}
/* Compact screens get unobtrusive controls without hiding the chart behind them. */
@media(max-width:1100px){.sidebar{width:206px!important;min-width:206px!important}}
@media(max-width:880px){.chart-navigation{right:8px;bottom:8px;padding:4px}.chart-navigation button{width:29px;height:29px;min-width:29px}.chart-navigation .nav-divider{margin-inline:1px}.marketbar #header-drawings span{display:none}}
@media(max-width:640px){
 .chart-navigation{left:auto;right:6px;max-width:calc(100vw - var(--cosmo-rail-width) - 12px);overflow:visible}
 .chart-navigation button{width:26px;height:28px;min-width:26px}
 .chart-navigation button .ico{width:15px;height:15px}
 .chart-navigation .nav-divider{margin-inline:0}
 .chart-bottom-actions{bottom:55px!important}
 .appbar .workspace-id,.appbar .feed-pill{display:none!important}
}
@media(prefers-reduced-motion:reduce){.chart-navigation{transition:none!important}}

/* v0.11: split-action tool categories and fixed lower drawing actions */
.cosmo-tool-rail{overflow:visible}
.cosmo-rail-entry{width:100%;display:flex;align-items:stretch;justify-content:center;min-height:0;position:relative;gap:1px;border-radius:11px;border:1px solid transparent}
.cosmo-rail-entry:hover,.cosmo-rail-entry.active{background:var(--mono-raise)!important;border-color:var(--mono-border)!important}
.cosmo-rail-entry .cosmo-rail-key{min-width:0;flex:1;width:auto;padding:3px 0 3px 2px;min-height:30px}
.cosmo-rail-entry .cosmo-rail-key:hover,.cosmo-rail-entry .cosmo-rail-key.active{border-color:transparent!important}
.cosmo-rail-arrow{width:clamp(15px,calc(var(--cosmo-rail-width)*.22),24px);min-width:15px;border:0;border-left:1px solid var(--mono-border);border-radius:0 9px 9px 0;background:transparent!important;color:var(--mono-muted)!important;cursor:pointer;font:inherit;font-size:17px;display:flex;align-items:center;justify-content:center;padding:0}
.cosmo-rail-arrow:hover{background:var(--mono-panel)!important;color:var(--mono-text)!important}
.cosmo-rail-footer{width:100%;display:flex;flex-direction:column;gap:7px;flex:none;margin-top:auto;padding-top:9px;border-top:1px solid var(--mono-border)}
#cosmo-tool-rail .chart-bottom-actions{position:static!important;left:auto!important;bottom:auto!important;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;padding:2px;background:transparent!important;border:0!important;box-shadow:none!important;margin:0}
#cosmo-tool-rail .chart-bottom-actions button{width:100%;height:clamp(24px,calc(var(--cosmo-rail-width)*.39),35px);min-height:24px;background:var(--mono-panel)!important;border:1px solid var(--mono-border)!important;border-radius:9px;padding:0}
#cosmo-tool-rail .chart-bottom-actions button:hover{background:var(--mono-raise)!important}
#cosmo-tool-rail .chart-bottom-actions .actions-separator{display:none}
#cosmo-tool-rail .rail-size-controls{margin-top:0}
.cosmo-tool-main{justify-content:flex-start;gap:clamp(1px,0.3vh,5px);flex:1 1 auto}
.cosmo-rail-entry .cosmo-rail-key{height:min(calc(var(--cosmo-rail-width)*.72),calc((100dvh - 310px)/7));}
.tool-choice.selected{border-color:var(--mono-text)!important;background:var(--mono-raise)!important}
#search-modal .search-result.keyboard-active{background:var(--mono-raise)!important;outline:1px solid var(--mono-text)}
#load-symbol[hidden]{display:none!important}
@media(max-height:675px){.cosmo-tool-rail{padding-top:3px;padding-bottom:3px;gap:1px}.cosmo-rail-entry .cosmo-rail-key{height:29px;min-height:25px}.cosmo-rail-entry .cosmo-rail-key .tool-mark{font-size:17px}.cosmo-rail-footer{gap:3px;padding-top:4px}.cosmo-tool-main{gap:1px}}


/* Cosmo Chart v0.11.1 — tool-rail layout rebuild.
   Split action: left cell contains icon and category title, right cell is the chevron.
   Icons, titles and arrows each own a dedicated grid area so they cannot collide.
*/
.cosmo-tool-rail {
  --rail-row-height:clamp(39px,calc(var(--cosmo-rail-width)*.68),60px);
  --rail-chevron-width:clamp(18px,calc(var(--cosmo-rail-width)*.23),24px);
  padding:8px 5px 7px!important;
  gap:0!important;
  align-items:stretch!important;
  overflow:visible;
}
.cosmo-tool-main {
  display:flex!important;
  flex-direction:column;
  align-items:stretch;
  flex:1 1 auto;
  justify-content:flex-start;
  gap:5px!important;
  min-height:0;
}
.cosmo-rail-entry {
  position:relative;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) var(--rail-chevron-width);
  width:100%;
  height:var(--rail-row-height);
  min-height:var(--rail-row-height);
  max-height:var(--rail-row-height);
  flex:0 0 var(--rail-row-height);
  gap:0!important;
  align-items:stretch;
  border:1px solid transparent;
  border-radius:10px;
  overflow:hidden;
}
.cosmo-rail-entry[data-category="cursor"]{grid-template-columns:minmax(0,1fr)}
.cosmo-rail-entry:hover,.cosmo-rail-entry.active {border-color:var(--mono-border)!important}
.cosmo-rail-entry>.cosmo-rail-key {
  display:grid!important;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:minmax(0,1fr) auto;
  place-items:center;
  align-content:center;
  justify-items:center;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  min-width:0!important;
  box-sizing:border-box;
  margin:0!important;
  padding:4px 1px 4px!important;
  gap:2px!important;
  border:0!important;
  border-radius:8px 0 0 8px;
  overflow:hidden;
  flex:none!important;
  background:transparent!important;
}
.cosmo-rail-entry>.cosmo-rail-key:focus-visible,
.cosmo-rail-entry>.cosmo-rail-arrow:focus-visible{outline:2px solid var(--mono-focus)!important;outline-offset:-2px}
.cosmo-rail-entry .cosmo-rail-key .tool-mark {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  max-height:25px;
  min-height:0;
  margin:0;
  font-size:clamp(17px,calc(var(--cosmo-rail-width)*.265),26px)!important;
  font-weight:500;
  font-family:Arial,"Segoe UI Symbol",system-ui,sans-serif;
  line-height:1!important;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
}
.cosmo-rail-entry .cosmo-rail-key .rail-label {
  display:block!important;
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0;
  font:500 9px/11px Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  letter-spacing:-.2px;
  color:var(--mono-muted)!important;
  text-align:center;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-wrap:nowrap;
}
.cosmo-rail-entry>.cosmo-rail-arrow {
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  height:100%!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0 9px 9px 0;
  background:transparent!important;
  color:var(--mono-muted)!important;
  cursor:pointer;
}
.cosmo-rail-entry>.cosmo-rail-arrow::before {
  content:"";
  position:absolute;
  top:25%;bottom:25%;
  right:calc(var(--rail-chevron-width) - 1px);
  border-left:1px solid var(--mono-border);
  pointer-events:none;
}
.cosmo-rail-arrow .rail-chevron{width:13px!important;height:13px!important;stroke-width:2;flex-shrink:0}
.cosmo-rail-arrow:hover .rail-chevron{transform:translateY(1px)}
.cosmo-tool-rail[data-size="large"] .cosmo-rail-key .rail-label{font-size:10.5px;line-height:12.5px}
.cosmo-tool-rail[data-size="medium"] .cosmo-rail-key .rail-label{font-size:9px;line-height:11px}
/* Small mode is genuinely icon-only; the complete label remains in title/aria-label. */
.cosmo-tool-rail[data-size="small"] {--rail-row-height:39px;--rail-chevron-width:18px;padding-inline:3px!important}
.cosmo-tool-rail[data-size="small"] .cosmo-rail-key{grid-template-rows:minmax(0,1fr)!important;padding:4px 0!important}
.cosmo-tool-rail[data-size="small"] .cosmo-rail-key .rail-label{display:none!important}
.cosmo-tool-rail[data-size="small"] .tool-mark{max-height:24px!important}
.cosmo-tool-rail[data-size="small"] .rail-chevron{width:12px!important;height:12px!important}
/* Footer is a separate area; arrows and active tools never push its controls away. */
.cosmo-rail-footer{flex:0 0 auto!important;display:flex!important;flex-direction:column;gap:6px!important;min-height:0;margin-top:auto;padding-top:7px!important}
#cosmo-tool-rail .chart-bottom-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px!important;align-items:stretch!important;padding:0!important}
#cosmo-tool-rail .chart-bottom-actions button {
  display:flex!important;align-items:center!important;justify-content:center!important;
  height:clamp(27px,calc(var(--cosmo-rail-width)*.4),38px)!important;
  min-height:27px!important;
  border-radius:9px;
  line-height:1;
}
#cosmo-tool-rail .chart-bottom-actions button .ico{width:17px;height:17px}
#cosmo-tool-rail .rail-size-controls{display:grid!important;grid-template-columns:1fr auto 1fr;gap:4px;align-items:center;justify-items:stretch;margin-top:0!important}
#cosmo-tool-rail .rail-size-controls button{width:100%!important;height:28px;display:grid;place-items:center;line-height:1}
#cosmo-tool-rail .rail-size-controls span{text-align:center;min-width:10px}
/* Tool picker: one icon row and up to two readable name lines, never overlapping. */
.tool-popover-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px!important}
.tool-choice{
  display:grid!important;
  grid-template-rows:26px minmax(24px,auto);
  align-items:center;justify-items:center;
  padding:8px 6px!important;
  gap:5px!important;
  min-width:0!important;
  min-height:78px!important;
  overflow:hidden;
}
.tool-choice .tool-choice-icon{display:grid;place-items:center;width:100%;height:26px;font-size:20px;line-height:1}
.tool-choice>span:last-child:not(.tool-choice-icon){
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  width:100%;max-height:33px;
  overflow:hidden;
  overflow-wrap:anywhere;
  text-align:center;
  font-size:11px;
  font-weight:500;
  line-height:15px;
}
.tool-popover-head{margin-bottom:10px!important}
.tool-popover-head button,.tool-popover-foot button{display:grid;place-items:center;line-height:1}
@media(max-width:680px){.tool-popover-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Height-based adaptive density so the seven groups and footer fit without overlap. */
@media(max-height:760px){
 .cosmo-tool-rail{--rail-row-height:40px;gap:0!important;padding-block:4px!important}
 .cosmo-tool-main{gap:3px!important}
 .cosmo-rail-entry>.cosmo-rail-key{padding:3px 1px!important;gap:1px!important}
 .cosmo-rail-entry .cosmo-rail-key .tool-mark{max-height:21px;font-size:18px!important}
 .cosmo-rail-entry .cosmo-rail-key .rail-label{font-size:8.5px;line-height:10px}
 .cosmo-tool-rail[data-size="large"] .cosmo-rail-key .rail-label{font-size:9.5px;line-height:11px}
 .cosmo-rail-footer{gap:3px!important;padding-top:4px!important}
 #cosmo-tool-rail .chart-bottom-actions{gap:3px!important}
 #cosmo-tool-rail .chart-bottom-actions button{height:27px!important}
 #cosmo-tool-rail .rail-size-controls button{height:25px}
}
@media(max-height:590px){
 .cosmo-tool-rail{--rail-row-height:33px;padding-block:3px!important}
 .cosmo-tool-main{gap:2px!important}
 .cosmo-rail-entry .cosmo-rail-key .tool-mark{max-height:17px;font-size:16px!important}
 .cosmo-rail-entry .cosmo-rail-key .rail-label{font-size:8px;line-height:9px}
 .cosmo-tool-rail[data-size="large"] .cosmo-rail-key .rail-label{font-size:8.5px;line-height:9px}
 #cosmo-tool-rail .chart-bottom-actions button{height:24px!important;min-height:24px!important}
 #cosmo-tool-rail .rail-size-controls button{height:23px}
}

/* v0.11.5: readable, scrollable drawing properties without covering the plot. */
.cosmo-editor{max-width:min(392px,calc(100vw - 86px));max-height:min(78vh,680px);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin}
.cosmo-editor .editor-content{max-height:min(57vh,510px);overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}
.cosmo-editor .editor-row{display:flex;gap:9px;align-items:center;min-width:0;flex-wrap:wrap}
.cosmo-editor .editor-row>span{min-width:110px;flex:1 1 120px}
.cosmo-editor .editor-row>input,.cosmo-editor .editor-row>select,.cosmo-editor .editor-row>textarea{min-width:0;max-width:100%;flex:1 1 130px;box-sizing:border-box}
.cosmo-editor .editor-row>textarea{min-height:78px;resize:vertical;line-height:1.4;padding:9px;border-radius:8px;border:1px solid var(--mono-border);background:var(--mono-panel);color:var(--mono-text)}
.cosmo-editor .editor-row>input[type="datetime-local"]{font-size:12px;min-width:170px;color-scheme:dark}
html[data-theme="light"] .cosmo-editor .editor-row>input[type="datetime-local"]{color-scheme:light}
.cosmo-editor .editor-note{font-size:11px;line-height:1.45;overflow-wrap:anywhere}
@media(max-width:700px){.cosmo-editor{max-height:75vh;width:min(352px,calc(100vw - 92px))}.cosmo-editor .editor-content{max-height:52vh}}

/* v0.11.6 contextual tool controls, anchored inside chart host */
.cosmo-object-toolbar{position:absolute;z-index:55;display:flex;align-items:center;gap:5px;max-width:calc(100% - 95px);height:40px;padding:5px 7px;border:1px solid var(--mono-border);border-radius:9px;background:color-mix(in srgb,var(--mono-bar) 93%,transparent);box-shadow:0 10px 27px #0007;backdrop-filter:blur(11px);white-space:nowrap;pointer-events:auto}
.cosmo-object-toolbar[hidden]{display:none!important}
.cosmo-object-toolbar button{height:29px;min-width:30px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--mono-text);font-size:17px;line-height:1;cursor:pointer}
.cosmo-object-toolbar button:hover,.cosmo-object-toolbar button:focus-visible{background:var(--mono-raise);border-color:var(--mono-border)}
.cosmo-object-swatch{display:flex;align-items:center;justify-content:center;width:32px;height:29px;padding:3px;border-radius:6px;border:1px solid var(--mono-border);background:var(--mono-panel);cursor:pointer}
.cosmo-object-swatch input{padding:0;width:23px;height:23px;border:0;background:none;cursor:pointer}
#cosmo-toolbar-opacity{width:63px;height:22px;accent-color:var(--mono-text)}
.tool-choice>span:last-child:not(.tool-choice-icon){max-height:none!important;-webkit-line-clamp:3!important;overflow:hidden;overflow-wrap:break-word;line-height:14px!important}
.tool-choice{min-height:83px!important;grid-template-rows:25px minmax(25px,auto)!important;padding-block:8px!important}
@media(max-width:700px){.cosmo-object-toolbar{gap:2px;padding:4px;max-width:calc(100% - 65px)}#cosmo-toolbar-opacity{width:42px}.cosmo-object-toolbar button{min-width:25px}}

/* 0.11.7 — unified, persistent last-10 color palette in properties and contextual toolbar */
.cosmo-recent-colors{display:flex;flex-direction:column;gap:7px;min-width:0;padding:10px 12px;border-top:1px solid var(--mono-border);background:var(--mono-panel);color:var(--mono-text)}
.cosmo-recent-colors[hidden]{display:none!important}
.cosmo-recent-caption{color:var(--mono-muted);font-size:11px;font-weight:650;line-height:14px}
.cosmo-recent-empty{font-size:11px;color:var(--mono-muted)}
.cosmo-recent-swatches{display:flex;flex-wrap:wrap;gap:5px;align-items:center;max-width:100%}
.cosmo-recent-swatch{box-sizing:border-box;width:23px;height:23px;flex:0 0 23px;border:2px solid color-mix(in srgb,var(--mono-text) 30%,transparent);border-radius:6px;cursor:pointer;padding:0;box-shadow:0 0 0 1px #0002 inset}
.cosmo-recent-swatch:hover,.cosmo-recent-swatch:focus-visible{outline:2px solid var(--mono-text);outline-offset:2px;transform:translateY(-1px)}
#cosmo-editor>.cosmo-recent-colors{position:relative;flex-shrink:0}
#objects-detail>.cosmo-recent-colors{margin-top:10px;border-radius:8px}
.cosmo-object-toolbar .cosmo-toolbar-recent{position:absolute;top:calc(100% + 5px);left:0;z-index:70;width:min(275px,calc(100vw - 110px));padding:11px;border:1px solid var(--mono-border);border-radius:10px;box-shadow:0 10px 26px #0007;backdrop-filter:blur(12px);white-space:normal;background:var(--mono-bar)}
@media(max-width:700px){.cosmo-recent-swatch{width:25px;height:25px;flex-basis:25px}}

/* Cosmo 0.11.27 - source-aware quote picker */
#search-modal .market-discovery-controls{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(0,.8fr);gap:9px;}
#search-modal .market-discovery-controls>label{min-width:0;}
#search-modal .market-discovery-controls label[hidden]{display:none!important;}
#search-modal .market-discovery-controls select{width:100%;min-width:0;}
#search-modal #market-discovery-controls[hidden]{display:none!important;}
@media(max-width:600px){#search-modal .market-discovery-controls{grid-template-columns:repeat(2,minmax(0,1fr));}#search-modal .market-quote-control{grid-column:1/-1;}}

/* v0.11.29: FOREX asset tabs reuse the existing responsive market filters. */
#search-modal .market-asset-control:not([hidden]){min-width:170px;flex:1.2}
#search-modal .market-asset-control select{font-weight:650}
#search-modal .market-discovery-controls label[hidden]{display:none!important}

/* COSMO 0.11.45: search row action, separate from opening a symbol. */
#search-modal .cosmo-search-entry{display:flex;align-items:center;width:100%;min-width:0;gap:4px;border-bottom:1px solid var(--mono-border)}
#search-modal .cosmo-search-entry>.search-result{flex:1;width:auto;min-width:0;border-top:0!important;border-bottom:0!important}
#search-modal .cosmo-search-add{display:grid;place-items:center;flex:none;width:29px;height:29px;margin-right:8px;border:1px solid var(--mono-border);border-radius:8px;background:var(--mono-raise);color:var(--mono-text);cursor:pointer;font-size:18px;line-height:1}
#search-modal .cosmo-search-add:hover,#search-modal .cosmo-search-add:focus-visible{outline:2px solid #459fff;outline-offset:1px}
#search-modal .cosmo-search-add.is-added{font-size:14px;color:#28b982}
#search-modal .cosmo-search-entry>.search-result.keyboard-active{background:var(--mono-raise)!important}
