/* ---- Design tokens. Themes change only these values; rules below use var(--name). ---- */
:root,:root[data-theme="dark"]{color-scheme:dark;--bg:#101211;--surface:#191c1a;--surface-2:#161a17;--surface-sunk:#141814;--input-bg:#111510;--hover:#1d221d;--row-highlight:#1c211b;--row-open:#1f261d;--selected:#232c1f;--border:#2b302c;--border-soft:#252a26;--border-input:#3c443c;--grid:#262c27;--grid-strong:#4a554a;--text:#edf1e9;--text-2:#b5bdb1;--text-3:#cfd6cb;--muted:#919b90;--axis:#8a9488;--accent:#c7f481;--accent-ink:#172210;--accent-soft:#26321f;--accent-border:#40512f;--chip-bg:#262b25;--positive:#c7f481;--negative:#ff9797;--negative-soft:#392727;--negative-border:#633838;--negative-strong:#ffb4b4;--live-border:#5a3c3c;--live-bg:#1f1717;--warn:#f2c46d;--warn-soft:#3a3222;--hold:#3a4733;--hold-open:#5b4b26;--alert-bg:#392a22;--alert-border:#745344;--alert-text:#ffca9f;--info:#8fb8ff;--info-soft:#1d2530;--info-border:#34465e;--info-text:#b9d3f5;--violet:#b7a0ec;--track:#30372e;--area-up:rgba(199,244,129,.09);--area-down:rgba(255,151,151,.09);--backdrop:rgba(0,0,0,.6)}
:root[data-theme="light"]{color-scheme:light;--bg:#f4f5f2;--surface:#ffffff;--surface-2:#f8f9f6;--surface-sunk:#f3f5f0;--input-bg:#ffffff;--hover:#eef2ea;--row-highlight:#f1f7e9;--row-open:#eaf2df;--selected:#e2eed4;--border:#dde1d8;--border-soft:#eceee8;--border-input:#c5ccbf;--grid:#e6e9e2;--grid-strong:#a9b2a3;--text:#1a1f19;--text-2:#454e42;--text-3:#333b30;--muted:#626b5f;--axis:#6c7568;--accent:#3b7a12;--accent-ink:#ffffff;--accent-soft:#e3efd5;--accent-border:#b3d18c;--chip-bg:#eef0eb;--positive:#1f7a2e;--negative:#c0362c;--negative-soft:#fbe4e2;--negative-border:#e8b2ac;--negative-strong:#a3291f;--live-border:#e6b5af;--live-bg:#fdf2f1;--warn:#946300;--warn-soft:#fbf0d5;--hold:#cde3b6;--hold-open:#efdcab;--alert-bg:#fff4e6;--alert-border:#f0c898;--alert-text:#8a4a12;--info:#2b63c2;--info-soft:#e4edfb;--info-border:#b6cbee;--info-text:#1e4d96;--violet:#6a4fc4;--track:#e2e6de;--area-up:rgba(59,122,18,.10);--area-down:rgba(192,54,44,.10);--backdrop:rgba(20,24,20,.35)}
:root[data-theme="blossom"]{color-scheme:light;--bg:#fbf2f4;--surface:#ffffff;--surface-2:#fdf6f8;--surface-sunk:#fbeff3;--input-bg:#ffffff;--hover:#fbe9ef;--row-highlight:#fdf0f4;--row-open:#f9e3eb;--selected:#f6d9e3;--border:#efdde3;--border-soft:#f6eaee;--border-input:#e2c6d0;--grid:#f2e4e9;--grid-strong:#cfaab7;--text:#2a1c21;--text-2:#5b4148;--text-3:#40303a;--muted:#6c525b;--axis:#86686f;--accent:#b23a62;--accent-ink:#ffffff;--accent-soft:#fbe1ea;--accent-border:#efb3c6;--chip-bg:#f8edf1;--positive:#1f7a2e;--negative:#c0362c;--negative-soft:#fbe4e2;--negative-border:#e8b2ac;--negative-strong:#a3291f;--live-border:#e6b5af;--live-bg:#fdf2f1;--warn:#946300;--warn-soft:#fbf0d5;--hold:#f3cfdc;--hold-open:#f2ddb4;--alert-bg:#fff4e6;--alert-border:#f0c898;--alert-text:#8a4a12;--info:#2b63c2;--info-soft:#e4edfb;--info-border:#b6cbee;--info-text:#1e4d96;--violet:#6a4fc4;--track:#f1e2e7;--area-up:rgba(178,58,98,.10);--area-down:rgba(192,54,44,.10);--backdrop:rgba(20,24,20,.35)}
:root[data-theme="mint"]{color-scheme:light;--bg:#eff8f5;--surface:#ffffff;--surface-2:#f5fbf9;--surface-sunk:#ecf7f3;--input-bg:#ffffff;--hover:#e2f3ed;--row-highlight:#ebf7f2;--row-open:#dbf0e8;--selected:#cfeadf;--border:#d3e9e1;--border-soft:#e5f2ed;--border-input:#b9d9cd;--grid:#dfeee8;--grid-strong:#93bcae;--text:#16251f;--text-2:#3d544b;--text-3:#2b3d36;--muted:#4a645b;--axis:#62786f;--accent:#13786a;--accent-ink:#ffffff;--accent-soft:#d6f0e8;--accent-border:#9fd6c6;--chip-bg:#e9f4f0;--positive:#1f7a2e;--negative:#c0362c;--negative-soft:#fbe4e2;--negative-border:#e8b2ac;--negative-strong:#a3291f;--live-border:#e6b5af;--live-bg:#fdf2f1;--warn:#946300;--warn-soft:#fbf0d5;--hold:#bfe4d6;--hold-open:#efdcab;--alert-bg:#fff4e6;--alert-border:#f0c898;--alert-text:#8a4a12;--info:#2b63c2;--info-soft:#e4edfb;--info-border:#b6cbee;--info-text:#1e4d96;--violet:#6a4fc4;--track:#dcece6;--area-up:rgba(19,120,106,.10);--area-down:rgba(192,54,44,.10);--backdrop:rgba(20,24,20,.35)}
:root[data-theme="lavender"]{color-scheme:light;--bg:#f4f2fb;--surface:#ffffff;--surface-2:#f8f7fd;--surface-sunk:#f1eefa;--input-bg:#ffffff;--hover:#ebe7f8;--row-highlight:#f2effb;--row-open:#e6e1f7;--selected:#ddd6f4;--border:#e0dbf1;--border-soft:#ece9f7;--border-input:#c9c1e6;--grid:#e7e3f4;--grid-strong:#a89ccd;--text:#1e1a2e;--text-2:#48425f;--text-3:#353049;--muted:#5a5375;--axis:#6f688a;--accent:#5e48c0;--accent-ink:#ffffff;--accent-soft:#e6e0fa;--accent-border:#bdb0ef;--chip-bg:#efecf9;--positive:#1f7a2e;--negative:#c0362c;--negative-soft:#fbe4e2;--negative-border:#e8b2ac;--negative-strong:#a3291f;--live-border:#e6b5af;--live-bg:#fdf2f1;--warn:#946300;--warn-soft:#fbf0d5;--hold:#d6cdf3;--hold-open:#efdcab;--alert-bg:#fff4e6;--alert-border:#f0c898;--alert-text:#8a4a12;--info:#2b63c2;--info-soft:#e4edfb;--info-border:#b6cbee;--info-text:#1e4d96;--violet:#9a3fa8;--track:#e5e1f4;--area-up:rgba(94,72,192,.10);--area-down:rgba(192,54,44,.10);--backdrop:rgba(20,24,20,.35)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font:14px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer;font:inherit;color:inherit;background:transparent;border:1px solid var(--border);border-radius:8px;padding:8px 12px}button:hover{border-color:var(--accent)}a{color:inherit;text-decoration:none}.shell{display:grid;grid-template-columns:212px 1fr;min-height:100vh}aside{padding:38px 22px;border-right:1px solid var(--border);position:sticky;top:0;height:100vh;display:flex;flex-direction:column}.brand{font-size:48px;letter-spacing:-4px;font-weight:800;padding-left:14px}.brand span{color:var(--accent);font-size:18px;letter-spacing:0;margin-left:5px}.rail-label{font-size:10px;letter-spacing:2px;color:var(--muted);margin:58px 14px 18px}.nav{padding:13px;border-radius:7px;margin:3px 0;color:var(--muted)}.nav.active{background:var(--accent-soft);color:var(--accent)}.rail-foot{margin-top:auto;padding:20px 10px 0;font-size:12px;line-height:1.8;color:var(--muted)}.demo-tag{font-size:9px;letter-spacing:1.5px;border:1px solid var(--accent-border);border-radius:4px;padding:5px;color:var(--accent)}main{max-width:1600px;width:100%;padding:0 46px;margin:0 auto}header{height:92px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border)}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--muted)}.header-right{display:flex;gap:15px;align-items:center}.pill{border:1px solid var(--border);border-radius:30px;padding:7px 12px;font-size:12px}.pill.good{color:var(--accent);border-color:var(--accent-border)}.pill.bad{color:var(--negative);border-color:var(--negative-border)}.intro{display:flex;justify-content:space-between;align-items:center;margin:40px 0 30px}h1{font-size:37px;letter-spacing:-1.5px;margin:0 0 12px;font-weight:650}.dot{color:var(--accent)}p{line-height:1.7} .intro p{margin:0;color:var(--muted)}.timestamp{text-align:right;display:grid;gap:7px}.timestamp span{font-size:9px;letter-spacing:1.5px;color:var(--muted)}.timestamp strong{font-size:13px;font-weight:500;font-variant-numeric:tabular-nums}.timestamp small{color:var(--muted);font-size:11px}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}.metric,.panel{background:var(--surface);border:1px solid var(--border);border-radius:12px}.metric{padding:24px 23px}.metric>span{color:var(--text-2);font-size:12px;display:flex;justify-content:space-between}.metric small{font-size:10px;font-weight:400;color:var(--muted)}.metric>strong{font-size:34px;font-weight:550;letter-spacing:-1px;display:block;margin:24px 0 15px;font-variant-numeric:tabular-nums}.metric>strong small{font-size:20px}.metric-note{font-size:11px;color:var(--muted)}.positive{color:var(--positive)}.negative{color:var(--negative)}.two-col{display:grid;grid-template-columns:1.15fr 1fr;gap:22px}.panel{padding:23px;margin-bottom:22px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}h2{font-size:15px;font-weight:550;margin:0}.muted{font-size:11px;color:var(--muted)}.panel-head p{margin:8px 0 0}.live-label{font-size:9px;letter-spacing:1px;color:var(--accent)}.bot-state{display:flex;align-items:center;gap:16px;padding:4px 0 24px}.state-icon{font-size:30px;background:var(--accent-soft);color:var(--accent);border-radius:12px;padding:9px 16px}.bot-state h3{font-size:18px;font-weight:500;margin:0 0 8px}.bot-state p{font-size:12px;margin:0;color:var(--muted)}.facts{border-top:1px solid var(--border);padding-top:9px}.facts>div{display:flex;justify-content:space-between;margin:13px 0;font-size:12px}.facts span{color:var(--muted)}.facts b{font-weight:400}.risk{margin:24px 0}.risk>div{display:flex;justify-content:space-between;font-size:12px;margin-bottom:12px}.risk span{color:var(--text-2)}.risk b{font-weight:400;font-variant-numeric:tabular-nums}progress{width:100%;height:5px;border:none;display:block;border-radius:10px;overflow:hidden;background:var(--track)}progress::-webkit-progress-bar{background:var(--track)}progress::-webkit-progress-value{background:var(--accent);border-radius:10px}progress::-moz-progress-bar{background:var(--accent)}.panel-foot{border-top:1px solid var(--border);padding-top:18px;color:var(--muted);font-size:10px;margin-bottom:0}.empty{color:var(--muted);text-align:center;padding:35px 12px;font-size:13px;line-height:1.8}.filters{display:flex;gap:6px}.filter{font-size:11px;border-color:transparent}.filter.active{background:var(--accent-soft);color:var(--accent)}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;white-space:nowrap;text-align:left}th{font-size:10px;font-weight:400;color:var(--muted);padding:0 12px 14px;border-bottom:1px solid var(--border)}td{padding:15px 12px;border-bottom:1px solid var(--border-soft);font-size:12px}tr:last-child td{border-bottom:0}td:first-child{font-weight:600}td:last-child{font-weight:400;color:var(--muted);font-size:11px;white-space:normal;min-width:160px}.badge{display:inline-block;padding:4px 7px;background:var(--chip-bg);border-radius:4px;font-size:10px}.badge.long{color:var(--accent)}.badge.short,.badge.blocked{color:var(--negative);background:var(--negative-soft)}.event{padding:17px 0;display:grid;grid-template-columns:85px 1fr;gap:16px;border-bottom:1px solid var(--border)}.event:last-child{border:0}.event time{font-size:11px;color:var(--muted)}.event strong{font-size:12px;font-weight:500}.event p{font-size:11px;margin:7px 0 0;color:var(--muted)}.warning{background:var(--alert-bg);border:1px solid var(--alert-border);color:var(--alert-text);border-radius:8px;margin-bottom:22px;padding:14px 18px;line-height:1.7;font-size:13px}footer{padding:12px 0 30px;display:flex;justify-content:space-between;gap:15px;color:var(--muted);font-size:10px}footer b{color:var(--text);letter-spacing:1px}button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}[hidden]{display:none!important}@media(min-width:1600px){main{padding:0 65px}}@media(max-width:1100px){.shell{grid-template-columns:165px 1fr}aside{padding:28px 12px}main{padding:0 25px}.metric{padding:20px 15px}.metric>strong{font-size:28px}.two-col{grid-template-columns:1fr}.timestamp{display:none}}@media(max-width:700px){.shell{display:block}aside{position:static;height:auto;flex-direction:row;align-items:center;border-right:0;border-bottom:1px solid var(--border);padding:12px 18px;gap:12px}.brand{font-size:31px;padding:0;letter-spacing:-2px}.brand span{font-size:10px}.rail-label,.rail-foot{display:none}.nav{font-size:11px;padding:9px;margin:0}.nav.active{margin-left:auto}main{padding:0 17px}header{height:65px}.eyebrow{font-size:8px}.header-right{gap:8px}.pill{font-size:10px}button{font-size:11px;padding:7px 9px}.intro{margin:28px 0 22px}h1{font-size:30px}.intro p{font-size:11px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric{padding:17px 14px}.metric>strong{font-size:28px;margin:18px 0 12px}.metric-note{font-size:9px}.panel{padding:18px 15px}.panel-head{flex-wrap:wrap;margin-bottom:19px}.bot-state h3{font-size:16px}.facts>div{font-size:11px}.filters{gap:3px}.filter{padding:6px;font-size:10px}footer{flex-direction:column;line-height:1.7}.event{grid-template-columns:66px 1fr;gap:10px}}
.account-link{font-size:11px;color:var(--muted);padding:8px}.account-link:hover{color:var(--accent)}.account-page{max-width:540px;padding:45px 24px;margin:0 auto}.account-back{display:block;color:var(--muted);font-size:12px;margin-bottom:52px}.account-page .eyebrow{margin-bottom:18px}.account-panel{margin-top:28px}.account-panel label{display:block;margin:24px 0 10px;font-size:12px;color:var(--text-2)}.account-panel label:first-child{margin-top:0}.account-panel input{width:100%;border:1px solid var(--border-input);border-radius:7px;background:var(--input-bg);color:var(--text);font:inherit;padding:12px}.account-panel input:focus{outline:2px solid var(--accent);outline-offset:2px}.account-panel input[readonly]{color:var(--muted);background:var(--surface)}.field-help{font-size:11px;color:var(--muted);line-height:1.8}.primary{display:block;width:100%;padding:13px;border-radius:7px;border:0;background:var(--accent);color:var(--accent-ink);text-align:center;font:inherit;font-weight:600;margin-top:28px}.primary:disabled{opacity:.55}.form-error{color:var(--negative);font-size:12px;line-height:1.8}.account-continue{margin-bottom:8px}#password-success p{font-size:13px;color:var(--muted);line-height:1.9}@media(max-width:700px){.header-right{gap:4px}.account-link{font-size:10px;padding:5px}.account-page{padding-top:28px}}

.entry-frequency{margin:22px 0}.entry-wait{padding:4px 0 22px}.entry-wait strong{display:block;color:var(--accent);font-size:32px;margin-top:12px;font-variant-numeric:tabular-nums}.entry-wait p{margin-bottom:0}

/* ---- Navigation groups, header crumbs (shared by every operations page) ---- */

.rail{display:flex;flex-direction:column}.rail .rail-label{margin:34px 14px 10px;font-size:10px;letter-spacing:1.5px}.rail .rail-label:first-child{margin-top:46px}
.nav{display:flex;align-items:center;gap:10px;padding:11px 13px;font-size:13px;transition:color .15s,background .15s}.nav i{font-style:normal;width:16px;text-align:center;opacity:.8}.nav:hover{color:var(--text);background:var(--hover)}.nav.active{font-weight:600}
.crumbs{font-size:12px;color:var(--muted);letter-spacing:.3px}.crumbs span::after{content:'/';margin:0 9px;color:var(--grid-strong)}.crumbs b{color:var(--text);font-weight:550}
.text-link{font-size:12px;color:var(--accent);white-space:nowrap}.text-link:hover{text-decoration:underline}
.official-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:20px}.official-links span{font-size:11px;color:var(--muted);margin-right:4px}.official-links a{font-size:12px;border:1px solid var(--border);border-radius:20px;padding:7px 12px;color:var(--text)}.official-links a:hover{border-color:var(--accent);color:var(--accent)}
.chip{font-size:12px;border:1px solid var(--border);border-radius:20px;padding:5px 11px;white-space:nowrap;font-variant-numeric:tabular-nums}
.shell>main{min-width:0}.metrics>*,.two-col>*,.grid-2-1>*{min-width:0}
.grid-2-1{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:22px}
/* ---- Tables ---- */
th.num,td.num{text-align:right}td.num,table td:last-child.num{font-variant-numeric:tabular-nums;white-space:nowrap;min-width:0;font-size:12px;color:var(--text)}
td.positive,td.num.positive,table td:last-child.positive{color:var(--positive)}td.negative,td.num.negative,table td:last-child.negative{color:var(--negative)}
td.strong b{font-weight:650}td.muted{color:var(--muted);font-size:11px}td.wrap{white-space:normal;min-width:200px;line-height:1.6}
td:first-child{font-weight:400}.pair-cell{display:flex;align-items:center;gap:8px}.pair-cell b{font-weight:650;font-size:13px}
.stack{display:flex;flex-direction:column;gap:4px}td.num .stack{align-items:flex-end}.stack b{font-weight:500}.stack small{font-size:10px;color:var(--muted);font-weight:400}
.badge.side{font-weight:600;letter-spacing:.5px}.badge.side.long{color:var(--accent);background:var(--accent-soft)}.badge.side.short{color:var(--negative);background:var(--negative-soft)}.badge.side.both{color:var(--warn);background:var(--warn-soft)}
.badge.filled{color:var(--accent);background:var(--accent-soft)}.badge.pending{color:var(--warn);background:var(--warn-soft)}.badge.quiet{color:var(--muted);background:var(--chip-bg)}
.holding-tag b{color:var(--warn)}.tag{color:var(--text)}.exit-reason{color:var(--muted)}.tag-cell{white-space:normal;line-height:1.6;min-width:180px;max-width:300px;font-size:11px}
tr.has-signal td{background:var(--row-highlight)}
/* ---- Ledger (거래 내역 / 신호 기록) ---- */
.toolbar{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-end;justify-content:space-between;margin-bottom:20px}.toolbar .trade-filters{flex:1;min-width:280px}.toolbar-actions{display:flex;gap:8px;align-items:center}
.trade-filters{display:flex;flex-wrap:wrap;gap:12px}.trade-filters label{display:grid;gap:7px;font-size:11px;color:var(--muted);flex:1;min-width:120px;max-width:220px}
select,input[type=date],input[type=search]{background:var(--input-bg);color:var(--text);border:1px solid var(--border-input);padding:9px 10px;border-radius:6px;font:inherit;font-size:12px;min-width:0;max-width:100%}select:focus,input:focus{outline:2px solid var(--accent);outline-offset:2px}
.ledger tbody tr.row{cursor:pointer}.ledger tbody tr.row:hover td{background:var(--hover)}.ledger tbody tr.row.open td{background:var(--row-open);border-bottom-color:transparent}.ledger tbody tr.row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.ledger td{vertical-align:top;padding:13px 8px}.ledger th{padding:0 8px 12px}.ledger .tag-cell{min-width:150px;max-width:220px}.ledger tbody tr.row td:first-child{border-left:2px solid transparent}.ledger tbody tr.row.holding td:first-child{border-left-color:var(--warn)}
tr.detail td{background:var(--surface-sunk);padding:0 12px 18px;white-space:normal;color:var(--text);font-size:12px}.detail-body{padding:16px 6px 4px}.detail-body h4{font-size:12px;font-weight:550;margin:20px 0 10px;color:var(--text-2)}
.detail-facts{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px 22px;margin:0}.detail-facts dt{font-size:10px;color:var(--muted);margin-bottom:5px}.detail-facts dd{margin:0;font-size:12px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
table.fills th{padding-bottom:10px}table.fills td{padding:10px 12px;font-size:11px}
.legend-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px 26px;border-top:1px solid var(--border);margin:22px 0 0;padding-top:18px}.legend-list dt{font-size:11px;font-weight:600;margin-bottom:6px}.legend-list dd{margin:0;font-size:11px;line-height:1.75;color:var(--muted)}
.pagination{display:flex;align-items:center;justify-content:center;gap:18px;margin:20px 0 4px;font-size:12px;color:var(--muted)}button:disabled{opacity:.4;cursor:default}
/* ---- Stat strip ---- */
.stat-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));gap:12px;margin-bottom:22px}.stat{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:16px 16px 14px}.stat>span{display:block;font-size:11px;color:var(--text-2)}.stat>strong{display:block;font-size:22px;font-weight:550;margin:12px 0 8px;font-variant-numeric:tabular-nums;letter-spacing:-.5px}.stat>small{font-size:10px;color:var(--muted)}
/* ---- Charts ---- */
.line-chart{width:100%;min-height:220px}.line-chart.tall{min-height:300px}.line-chart svg,.signal-map svg{display:block;overflow:visible}
svg .grid{stroke:var(--grid);stroke-width:1}svg .zero{stroke:var(--grid-strong);stroke-width:1;stroke-dasharray:4 4}svg .axis{fill:var(--axis);font-size:10px;font-family:inherit;font-variant-numeric:tabular-nums}
svg .line{fill:none;stroke:var(--accent);stroke-width:2}svg .area.up{fill:var(--area-up)}svg .area.down{fill:var(--area-down)}svg .pt{stroke:var(--bg);stroke-width:2;cursor:pointer}svg .pt.win{fill:var(--accent)}svg .pt.loss{fill:var(--negative)}
.chart-readout{min-height:20px;font-size:12px;color:var(--text-2);margin:10px 0 0;font-variant-numeric:tabular-nums}
.signal-map{width:100%;overflow-x:auto}svg .lane{cursor:pointer}svg .lane-bg{fill:transparent}svg .lane:hover .lane-bg,svg .lane:focus .lane-bg{fill:var(--hover)}svg .lane.selected .lane-bg{fill:var(--selected)}svg .lane:focus{outline:none}
svg .lane-label{fill:var(--text);font-size:12px;font-weight:600;font-family:inherit}svg .hold{fill:var(--hold)}svg .hold.open{fill:var(--hold-open)}
svg .sig{stroke:var(--bg);stroke-width:1.5}svg .sig.filled{fill:var(--accent)}svg .sig.blocked{fill:var(--negative)}svg .sig.pending{fill:var(--warn)}
svg .sig-guide{stroke-width:1;stroke-dasharray:2 4;opacity:.55}svg .sig-guide.filled{stroke:var(--accent)}svg .sig-guide.blocked{stroke:var(--negative)}svg .sig-guide.pending{stroke:var(--warn)}
svg .trade-link{stroke-width:1.5;stroke-dasharray:5 4}svg .trade-link.win{stroke:var(--accent)}svg .trade-link.loss{stroke:var(--negative)}
svg .mark-entry{fill:none;stroke:var(--accent);stroke-width:2}svg .mark-exit{fill:none;stroke:var(--violet);stroke-width:2}
.legend{display:flex;flex-wrap:wrap;gap:14px;font-size:11px;color:var(--muted)}.legend span{display:inline-flex;align-items:center;gap:6px}.legend i{display:inline-block;width:9px;height:9px;border-radius:50%}
.legend .dot-filled{background:var(--accent)}.legend .dot-blocked{background:var(--negative)}.legend .dot-pending{background:var(--warn)}.legend .mark-entry{border:2px solid var(--accent);border-radius:1px}.legend .mark-exit{border:2px solid var(--violet);border-radius:1px}
#pair-detail .legend{margin-top:14px}
/* ---- Monitor ---- */
.state-icon.bad{background:var(--negative-soft);color:var(--negative)}
.funnel{list-style:none;margin:0 0 18px;padding:0;display:grid;gap:14px}.funnel li>div:first-child{display:flex;justify-content:space-between;font-size:12px;margin-bottom:7px}.funnel b{font-weight:600;font-variant-numeric:tabular-nums}.funnel small{font-size:10px;color:var(--muted);display:block;margin-top:6px}
.funnel .bar{height:6px;background:var(--track);border-radius:6px;overflow:hidden}.funnel .bar i{display:block;height:100%;background:var(--accent);border-radius:6px}.funnel li.blocked{border-top:1px solid var(--border);padding-top:13px}.funnel li.blocked b{color:var(--negative)}
.entry-wait{padding:0 0 14px}.entry-wait strong{font-size:30px;margin-top:10px;font-weight:550}.entry-wait p{margin:6px 0 0}
.foot-details{margin:16px 0 0;border-top:1px solid var(--border);padding-top:12px}.foot-details summary{font-size:11px;color:var(--muted)}.foot-details p{line-height:1.8}
.event.is-blocked strong span:first-child{color:var(--negative)}.event.is-filled strong span:first-child{color:var(--accent)}.event strong{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
@media(max-width:1100px){.grid-2-1{grid-template-columns:1fr}}
@media(max-width:700px){.rail{flex-direction:row;flex-wrap:wrap;gap:4px;width:100%}.rail .nav.active{margin-left:0}.rail .rail-label{display:none}aside{flex-wrap:wrap}.nav{padding:8px 9px;font-size:11px;gap:5px}.nav i{display:none}.crumbs{font-size:11px}.crumbs span{display:none}.stat>strong{font-size:18px}.toolbar-actions{width:100%;justify-content:flex-end}.trade-filters label{min-width:130px}}

/* ---- Multiple accounts ---- */
.account-picker{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted)}.account-picker select{min-width:150px;max-width:220px;padding:7px 9px}
.notice{background:var(--info-soft);border:1px solid var(--info-border);color:var(--info-text);border-radius:8px;margin-bottom:22px;padding:13px 18px;line-height:1.7;font-size:13px}
svg .line.estimate{stroke-dasharray:4 4;opacity:.6}svg .hit{fill:transparent;cursor:crosshair}
svg .flow-mark{stroke-width:1.5;stroke-dasharray:3 3}svg .flow-mark.deposit{stroke:var(--info)}svg .flow-mark.withdraw{stroke:var(--warn)}
.legend .dot-deposit{background:var(--info)}.legend .dot-withdraw{background:var(--warn)}.legend .dot-estimate{background:transparent;border:1px dashed var(--accent)}
.flow-list{margin-top:16px}.flow-list p{margin:0 0 10px}
.account-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px}
.account-card{border:1px solid var(--border);border-radius:10px;padding:18px;background:var(--surface-2);display:grid;gap:16px}.account-card.live{border-color:var(--live-border)}
.account-card-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.account-name{font-size:15px;font-weight:650;margin-right:auto}.account-name:hover{color:var(--accent)}
.badge.live-badge{color:var(--negative-strong);background:var(--negative-soft);font-weight:600}
.check-list{display:flex;flex-wrap:wrap;gap:6px}.check-item{font-size:11px;border-radius:4px;padding:4px 7px;background:var(--chip-bg)}.check-item.ok{color:var(--accent)}.check-item.warn{color:var(--warn);background:var(--warn-soft)}.check-item.bad{color:var(--negative);background:var(--negative-soft)}
.card-actions{display:flex;flex-wrap:wrap;gap:8px}.primary.inline{display:inline-block;width:auto;margin:0;padding:9px 16px}
.register-form{display:grid;gap:18px}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px 18px}
.register-form label,#confirm-form label{display:grid;gap:7px;font-size:12px;color:var(--text-2)}
.register-form input:not([type=radio]):not([type=checkbox]),#confirm-form input{width:100%;border:1px solid var(--border-input);border-radius:7px;background:var(--input-bg);color:var(--text);font:inherit;padding:11px}
.register-form fieldset{border:1px solid var(--border);border-radius:7px;padding:8px 14px;display:flex;gap:18px;align-items:center;margin:0}.register-form legend{font-size:12px;color:var(--text-2);padding:0 4px}
.register-form label.radio,.register-form label.check{display:flex;align-items:center;gap:8px;color:var(--text)}
.live-rules{border:1px solid var(--live-border);background:var(--live-bg);border-radius:8px;padding:16px 18px}.live-rules h3{font-size:13px;margin:0 0 8px;color:var(--negative-strong)}.live-rules ul{margin:0 0 14px;padding-left:18px;font-size:12px;line-height:1.9;color:var(--text-3)}
.form-status{min-height:18px;font-size:12px;color:var(--text-2);margin:0;line-height:1.7}.form-status.ok{color:var(--accent)}.form-status.bad{color:var(--negative)}
dialog{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:12px;padding:24px;width:min(440px,calc(100vw - 32px))}dialog::backdrop{background:var(--backdrop)}
#confirm-form{display:grid;gap:14px}#confirm-form h2{font-size:16px}#confirm-form p{margin:0;line-height:1.7}.dialog-actions{display:flex;justify-content:flex-end;gap:8px}
@media(max-width:700px){.account-picker span{display:none}.account-picker select{min-width:0;max-width:150px}.account-cards{grid-template-columns:1fr}}
.demo-tag.live{color:var(--negative-strong);border-color:var(--live-border)}
.account-card{align-content:start}.card-actions{align-self:end}
/* ---- Strategy page ---- */
.kicker{font-size:10px;letter-spacing:1.5px;color:var(--accent)}.strategy-name{font-size:22px;margin:10px 0 8px}
.strategy-description p{font-size:13px;line-height:1.9;color:var(--text-3);margin:0 0 10px}.strategy-facts{margin-top:18px;border-top:1px solid var(--border);padding-top:18px}
.param-input{width:110px;background:var(--input-bg);color:var(--text);border:1px solid var(--border-input);border-radius:6px;padding:7px 8px;font:inherit;font-size:12px}
.param-save{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;margin-top:18px}.param-save label{display:grid;gap:7px;font-size:12px;color:var(--text-2)}
.param-save input{border:1px solid var(--border-input);border-radius:7px;background:var(--input-bg);color:var(--text);font:inherit;padding:10px}
.badge.changed{color:var(--info);background:var(--info-soft);margin-left:6px}
.theme-picker select{font-size:11px;padding:6px 8px;color:var(--text-2);background:var(--surface);border-color:var(--border)}
/* ---- Panel layout: 12-column grid; widths and order come from layout.json ---- */
.layout{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:22px;margin-bottom:22px;align-items:start}
.layout>[data-panel]{grid-column:span 12;margin:0;min-width:0}
.layout>[data-width="8"]{grid-column:span 8}.layout>[data-width="6"]{grid-column:span 6}.layout>[data-width="4"]{grid-column:span 4}
.layout>.layout-off{display:none!important}
@media(max-width:1100px){.layout>[data-panel]{grid-column:span 12}}
.brand-logo{display:block;max-width:150px;max-height:48px;object-fit:contain;margin-left:14px}@media(max-width:700px){.brand-logo{max-height:32px;margin-left:0}}

/* 전략 JSON 작업실 */
.strategy-workspace{display:grid;grid-template-columns:minmax(210px,280px) minmax(0,1fr);gap:24px}.strategy-library{border-right:1px solid var(--border);padding-right:20px}.strategy-library h3{font-size:13px;margin:24px 0 10px}.strategy-library input,.editor-password input{width:100%;background:var(--input-bg);color:var(--text);border:1px solid var(--border-input);border-radius:7px;padding:10px;font:inherit}.editor-list{display:grid;gap:7px;max-height:340px;overflow:auto}.editor-list button{text-align:left;display:grid;gap:5px;white-space:normal;overflow-wrap:anywhere}.editor-list button.selected{border-color:var(--accent);background:var(--selected)}.editor-list small{color:var(--muted)}.editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0}.file-button{display:inline-block;border:1px solid var(--border-input);border-radius:6px;padding:8px 12px;cursor:pointer;font-size:12px}.file-button input{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0}.file-button:focus-within{outline:2px solid var(--accent);outline-offset:2px}.editor-document-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.editor-document-head h3{margin:0 0 8px}.strategy-document{min-width:0}.json-editor{display:block;box-sizing:border-box;width:100%;min-height:480px;resize:vertical;background:var(--input-bg);color:var(--text);border:1px solid var(--border-input);border-radius:8px;padding:16px;font:13px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:2;margin-top:8px}.json-editor:focus{outline:2px solid var(--accent);outline-offset:2px}.json-editor[readonly]{background:var(--surface)}.editor-password{display:grid;gap:8px;max-width:360px;margin-top:20px}.validation-result{border:1px solid var(--border);border-radius:8px;padding:14px;margin-top:16px}.validation-result ul{padding-left:20px}.validation-result li{margin:8px 0;overflow-wrap:anywhere}.json-diff{white-space:pre-wrap;overflow-wrap:anywhere;max-height:420px;overflow:auto;background:var(--input-bg);padding:14px;font-size:12px}.editor-events article{padding:12px 0;border-bottom:1px solid var(--border)}.editor-events small{display:block;margin-top:5px;color:var(--muted)}.version-actions{display:flex;flex-wrap:wrap;gap:6px;min-width:240px}.version-actions button{font-size:11px;padding:6px 8px}.editor-version-hash{font-family:ui-monospace,monospace;color:var(--muted);font-size:11px}.editor-status-bad{color:var(--negative)}
@media(max-width:900px){.strategy-workspace{grid-template-columns:1fr}.strategy-library{border-right:0;border-bottom:1px solid var(--border);padding:0 0 20px}.editor-list{max-height:200px}.json-editor{min-height:380px}.editor-document-head{flex-wrap:wrap}}

/* 계좌 등록: 설명과 입력 영역을 분리하고 컨트롤 높이를 맞춥니다. */
.registration-section{display:grid;grid-template-columns:160px minmax(0,1fr);gap:24px;padding:24px 0;border-top:1px solid var(--border-soft)}
.registration-heading h3{font-size:13px;margin:0 0 8px}.registration-heading p{font-size:12px;line-height:1.7;color:var(--muted);margin:0;max-width:155px}
.registration-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start;min-width:0}
.register-form .form-field{display:flex;flex-direction:column;gap:8px;min-width:0;margin:0}.register-form .form-field input,.register-form .form-field select{box-sizing:border-box;height:44px;min-width:0;width:100%;margin:0;border:1px solid var(--border-input);border-radius:7px;background:var(--input-bg);color:var(--text);font:inherit;padding:0 12px}
.register-form .form-field input:focus,.register-form .form-field select:focus{outline:2px solid var(--accent);outline-offset:2px}
.register-form .account-mode{display:block;min-width:0;border:0;padding:0;margin:0}.register-form .account-mode legend{padding:0;margin:0 0 8px;line-height:normal}.mode-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.register-form .mode-options .radio{height:44px;box-sizing:border-box;padding:0 12px;gap:8px;border:1px solid var(--border-input);border-radius:7px;cursor:pointer;background:var(--input-bg);white-space:nowrap}.register-form .mode-options .radio:has(input:checked){border-color:var(--accent-border);background:var(--accent-soft)}.mode-options input{margin:0;accent-color:var(--accent)}.mode-options .radio:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.strategy-field{grid-column:1/-1;min-width:0}.strategy-field .field-help{margin:8px 0 0;max-width:760px;line-height:1.7}
#register-form{gap:0}#register-form .live-rules{margin:0 0 24px;padding:20px 24px;background:var(--surface-2);border-color:var(--border)}#register-form .live-rules h3{margin-bottom:12px}#register-form .live-rules ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 30px;margin-bottom:18px}#register-form .live-rules .check{border-top:1px solid var(--border);padding-top:16px;align-items:flex-start;line-height:1.7}#register-form .check input{flex:none;margin:4px 0 0}
.registration-submit{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;border-top:1px solid var(--border-soft);padding-top:24px}.registration-submit>.form-field{width:min(360px,100%)}.registration-action{display:flex;align-items:center;gap:20px}.registration-action p{font-size:12px;color:var(--muted);margin:0}.registration-action button{white-space:nowrap;min-height:44px}#register-form .form-status:empty{display:none}#register-form .form-status:not(:empty){margin-top:16px}
@media(max-width:1100px){.registration-section{grid-template-columns:1fr;gap:16px}.registration-heading p{max-width:none}.registration-action{flex-direction:column;align-items:flex-end;gap:10px}#register-form .live-rules ul{grid-template-columns:1fr}}
@media(max-width:700px){.registration-fields{grid-template-columns:1fr;gap:18px}.registration-section{padding:20px 0}.registration-submit{flex-direction:column;align-items:stretch;gap:18px}.registration-submit>.form-field{width:100%}.registration-action{align-items:stretch}.registration-action button{width:100%}#register-form .live-rules{padding:16px}.mode-options{gap:8px}}
