:root{--bg:#f5f7fb;--ink:#17263b;--muted:#758296;--line:#e4eaf2;--accent:#326de6;--green:#187754;--amber:#ad6912}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.65 -apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif}button,input,select{font:inherit}button{cursor:pointer;border:0;border-radius:8px;background:var(--accent);color:#fff;padding:9px 15px;font-weight:600}button:hover{filter:brightness(.96)}button:disabled{opacity:.55;cursor:wait}button.secondary{border:1px solid var(--line);background:#fff;color:#435673}input,select{padding:9px 11px;border:1px solid #dce3ed;border-radius:8px;background:white;color:var(--ink);min-width:0}input:focus,select:focus{outline:2px solid #b5ceff;outline-offset:1px}label{display:flex;flex-direction:column;gap:6px}header{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 max(4vw,24px);gap:20px}.brand{font-size:23px;font-weight:750;color:var(--accent);text-decoration:none}.brand span{color:#203453}.subtitle{color:var(--muted);padding-left:20px;border-left:1px solid var(--line)}.connection{margin-left:auto;display:flex;gap:8px;align-items:center;color:var(--muted);font-size:13px}i{width:7px;height:7px;background:#a1adbe;display:inline-block;border-radius:100%}i.online{background:#32a27e}main{max-width:1520px;margin:auto;padding:35px 4vw 50px}h1{font-size:29px;line-height:1.3;margin:7px 0 10px;letter-spacing:-.03em}h2{font-size:21px;margin:0 0 10px}h3{font-size:16px;margin:0 0 14px}p{margin:6px 0;color:var(--muted)}.eyebrow{color:var(--accent);font-size:12px;font-weight:650;letter-spacing:.08em}.page-title{display:flex;justify-content:space-between;align-items:center;margin:5px 0 25px}.card{background:white;border:1px solid var(--line);border-radius:12px;padding:22px;min-width:0}.login{display:grid;grid-template-columns:1.2fr 1fr;gap:50px;padding:50px;max-width:1000px;margin:80px auto}.login form{display:flex;flex-direction:column;gap:12px}.hint,.footnote{font-size:12px;color:var(--muted)}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin:0 0 27px}.stats article{background:white;border:1px solid var(--line);border-radius:11px;padding:20px 22px}.stats span,.stats small{display:block;color:var(--muted);font-size:12px}.stats strong{display:block;font-size:32px;letter-spacing:-.03em;margin:6px 0}.tabs{display:flex;gap:25px;border-bottom:1px solid var(--line);margin-bottom:23px}.tabs button{color:var(--muted);background:none;padding:0 4px 14px;border-radius:0}.tabs button.active{color:var(--accent);border-bottom:3px solid var(--accent)}.toolbar{display:flex;gap:12px;align-items:center;margin-bottom:18px}.toolbar input#search{flex:1;max-width:340px}.check{flex-direction:row;align-items:center;font-size:13px;color:var(--muted)}.workspace{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(380px,1fr);gap:22px;align-items:start}.market-list{padding:0;overflow:hidden}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left;font-size:13px}th{color:var(--muted);font-weight:500;background:#fafbfd;padding:16px 14px;white-space:nowrap}td{padding:17px 14px;border-top:1px solid #edf1f6;vertical-align:middle}tbody tr{cursor:pointer}tbody tr:hover,tbody tr.selected{background:#f4f8ff}.pair-name{font-weight:650;font-size:14px;display:block;white-space:nowrap}.pair-meta{font-size:11px;color:var(--muted);display:block;margin-top:4px}.price{font-variant-numeric:tabular-nums;font-weight:650;white-space:nowrap}.star{background:none;padding:2px;color:#bdc8d7;font-size:21px}.star.saved{color:#e9ac31}.tag{display:inline-block;background:#eaf7f0;color:var(--green);border-radius:5px;padding:3px 8px;font-size:11px;white-space:nowrap}.tag.warning{background:#fff4df;color:var(--amber)}.tag.neutral{background:#edf1f6;color:#708098}.footnote{padding:13px 20px;border-top:1px solid var(--line);margin:0}.empty{text-align:center;padding:50px 22px;color:#5b6d83}.empty p{max-width:310px;margin:10px auto 0;font-size:13px}.detail-top{display:flex;justify-content:space-between;align-items:start;margin-bottom:16px}.detail-title{font-size:18px;font-weight:650}.detail-tools{display:flex;gap:7px;margin:20px 0 8px}.detail-tools button{font-size:12px;padding:5px 12px}.chart{width:100%;height:190px;background:#fbfcff;border-radius:8px;display:block}.section-heading{margin-bottom:20px}.section-heading p{font-size:13px}.book{margin-top:16px}.book table{font-size:12px}.book td,.book th{padding:9px 8px}.book tr{cursor:default}.detail-form{border-top:1px solid var(--line);margin-top:20px;padding-top:18px;display:grid;grid-template-columns:1fr 1fr;gap:10px}.detail-form label{font-size:12px}.detail-form .wide{grid-column:1/-1}.detail-form button{align-self:end}.result{font-size:13px;padding:10px 0;color:var(--green)}.collector-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:20px}.health-line{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #f0f3f7;gap:15px}.health-line span:first-child{color:var(--muted)}.record{padding:15px 0;border-top:1px solid var(--line)}.record:first-child{border-top:0}.record-title{font-weight:600}.record p{font-size:12px}.record button{float:right;font-size:12px}.actions{display:flex;gap:10px;margin-top:17px}.text-button{background:none;color:var(--accent);padding:5px 0;font-size:12px}.danger{color:#b75b45}#notice{border:1px solid #f0d6ae;background:#fff7e9;color:#976518;padding:13px 18px;border-radius:9px;margin:0 0 20px}dialog{border:1px solid var(--line);border-radius:14px;padding:28px;width:min(640px,94vw);max-height:85vh}dialog::backdrop{background:#17263b66}.review-row{display:grid;grid-template-columns:1fr 1.5fr 1fr 1fr;gap:8px;margin:9px 0;align-items:center;font-size:12px}footer{text-align:center;color:#93a0b1;font-size:12px;padding:15px 20px 30px}[hidden]{display:none!important}@media(max-width:1100px){.workspace{grid-template-columns:1fr}.stats{gap:10px}.subtitle{display:none}}@media(max-width:620px){main{padding:22px 16px}.stats{grid-template-columns:repeat(2,1fr)}.login{grid-template-columns:1fr;margin:20px 0;padding:25px;gap:25px}.toolbar{flex-wrap:wrap}.brand{font-size:20px}header{padding:0 16px}.stats article{padding:15px}.connection{font-size:11px}.detail-form{grid-template-columns:1fr}.review-row{grid-template-columns:1fr 1.5fr 1fr 1fr}.card{padding:17px}.market-list{padding:0}}
@media(max-width:620px){.toolbar #market-filter,.toolbar input#search{flex:0 0 100%;width:100%;max-width:none}.review-row{grid-template-columns:1fr 1fr}.detail-tools{flex-wrap:wrap}}

.quote-summary{padding:12px 15px;background:#f4f8ff;border:1px solid #dce7ff;border-radius:8px}.quote-summary p{color:#435673}.book{padding:14px 0;border-top:1px solid var(--line)}.book-direction{color:var(--ink);font-weight:600}.book table{margin-top:9px}.tag.neutral{background:#edf1f6;color:#596c87}
.direction-toggle{background:#edf3ff;color:var(--accent);padding:2px 7px;margin:0 6px;font-size:16px;line-height:1.6;vertical-align:middle}.direction-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.pair-name,.detail-title{display:flex;align-items:center}.arbitrage-cell{min-width:205px}.arbitrage-line{margin:4px 0}.arbitrage-label{display:block;font-size:11px;color:var(--muted)}.arbitrage-line small{display:block;font-size:11px;color:var(--muted)}.profit{color:var(--green);font-weight:600}.arbitrage-detail{margin:18px 0;padding:15px;background:#f8fbf9;border:1px solid #dfede4;border-radius:8px}.arbitrage-result{margin-bottom:12px}.arbitrage-result strong{font-size:13px}.route{font-size:12px;color:#435673}.trend-heading{margin-top:24px}.price{font-size:12px}.workspace{grid-template-columns:minmax(0,1.65fr) minmax(370px,1fr)}main{max-width:1760px}@media(max-width:1300px){.workspace{grid-template-columns:1fr}.market-list .table-scroll{max-height:600px}}@media(max-width:620px){.page-title .actions{flex-direction:column;gap:5px}.pair-name{white-space:nowrap}.arbitrage-cell{min-width:180px}}
/* Target overview and quote detail pages. */
.market-context{display:flex;align-items:center;gap:12px;margin-bottom:22px}.market-context label{font-size:12px;color:var(--muted)}.market-context select{max-width:480px}.overview-top{display:grid;grid-template-columns:minmax(300px,430px) 1fr;gap:22px;margin-bottom:26px;align-items:stretch}.exchange-card{display:flex;flex-direction:column;align-items:flex-start;text-align:left;background:#fff;color:var(--ink);border:1px solid #ceddf8;padding:24px 28px;border-radius:12px;box-shadow:0 3px 14px #326de609;gap:4px}.exchange-label{font-size:16px;font-weight:650}.exchange-rate{font-size:38px;line-height:1.35;letter-spacing:-.04em;color:#255bc7}.exchange-quotes{font-size:12px;font-weight:500;color:#435673;margin-top:7px}.exchange-card small{font-size:11px;color:var(--muted);font-weight:400}.expectation-form{display:flex;align-items:center;gap:20px;border:1px solid var(--line);padding:22px;border-radius:12px;background:#fff;flex-wrap:wrap}.expectation-form>div{flex:1;min-width:150px}.expectation-form label{position:relative;font-size:12px;max-width:145px}.expectation-form input{width:100%;padding-right:52px}.expectation-form small{position:absolute;right:10px;bottom:10px;color:var(--muted);font-size:11px}.expectation-form button{align-self:center}.overview-table>thead>tr:first-child>th{font-size:14px;font-weight:650;color:var(--ink);padding-bottom:9px}.overview-table>thead th small{display:block;font-size:11px;font-weight:400;margin-top:4px}.overview-table>thead>tr:first-child th:first-child{width:22%}.overview-table td{padding:21px 22px}.target-link{background:none;color:var(--ink);padding:8px 0;font-size:16px;text-align:left}.target-link:hover{color:var(--accent)}.opportunity-link{display:flex;flex-direction:column;align-items:flex-start;gap:3px;background:none;color:var(--ink);text-align:left;padding:0;font-weight:400;min-width:175px;width:100%}.opportunity-link strong{font-size:17px}.opportunity-link span{font-size:12px;color:#435673}.opportunity-link small{font-size:11px;color:var(--muted)}.waiting-profit{color:#9e6819;font-weight:600}.muted{color:var(--muted);font-weight:400!important}.back-button{margin:0 0 18px;font-size:14px}.detail-page-title{display:flex;align-items:baseline;gap:20px;margin-bottom:20px}.detail-page-title h1{margin:0}.detail-table-scroll{padding:0;overflow:auto;margin-bottom:24px}.detail-quotes td{padding:14px 20px}.detail-quotes tbody tr{cursor:default}.detail-quotes small{white-space:nowrap;color:var(--muted);font-size:11px}.quote-price{background:#f1f5fc;border:1px solid #dde6f5;color:var(--ink);font-size:17px;padding:8px 16px;min-width:90px;font-variant-numeric:tabular-nums}.quote-price.active{background:#e8f0ff;color:#2056bf;border-color:#83a9f2;box-shadow:0 0 0 1px #83a9f2}.detail-grid{display:grid;grid-template-columns:minmax(260px,1.05fr) minmax(360px,1.5fr) minmax(260px,1fr);gap:22px;align-items:start}.detail-grid h2{font-size:18px}.strategy-result{padding:17px 0;border-top:1px solid var(--line)}.strategy-result:first-of-type{border-top:0}.strategy-result p{font-size:13px;color:#576a80}.strategy-result p.hint{font-size:11px;color:var(--muted)}.strategy-heading{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-bottom:9px}.strategy-heading h3{font-size:14px;margin:0}.result-profit{display:block;font-size:23px;margin-bottom:8px}.trend-panel{min-width:0}.trend-panel .detail-tools{margin:0 0 12px}.trend-card{margin-bottom:20px}.trend-card h2{margin-bottom:3px}.trend-card .chart{height:230px;margin-top:14px}.depth-panel{padding:20px 15px}.depth-panel h3{margin:12px 0 3px}.depth-panel table{margin:18px 0}.depth-panel td,.depth-panel th{padding:10px 6px}.depth-panel td{font-size:12px}.depth-panel td small{display:block;font-size:10px;margin-top:3px}.depth-panel tbody tr{cursor:default}.quality-warning{color:var(--amber)}.opportunity-panel>.hint{font-size:11px}.market-context .hint{margin-left:auto}
@media(max-width:1250px){.detail-grid{grid-template-columns:minmax(260px,1fr) minmax(360px,1.3fr)}.depth-panel{grid-column:1/-1}.depth-panel table{max-width:900px}.overview-top{grid-template-columns:340px 1fr}.expectation-form{gap:12px}.expectation-form>div{flex-basis:100%}.expectation-form label{max-width:135px}.overview-table td{padding:18px 16px}.market-context{flex-wrap:wrap}.market-context .hint{margin-left:0}}
@media(max-width:800px){.overview-top,.detail-grid{grid-template-columns:1fr}.depth-panel{grid-column:auto}.overview-top{gap:14px}.exchange-card{padding:20px}.exchange-rate{font-size:34px}.expectation-form{padding:18px}.overview-table>thead>tr:first-child th:first-child{min-width:155px}.detail-page-title{display:block}.market-context select{max-width:100%;width:100%}.market-context label{display:none}.trend-card .chart{height:200px}.detail-table-scroll{padding:0}.detail-quotes th,.detail-quotes td{padding:12px}.detail-page-title p{font-size:12px}}
.expectation-note{flex-basis:100%;margin:0}.gold-estimate-form{display:flex;align-items:end;gap:8px;margin-top:12px}.gold-estimate-form label{font-size:11px;flex:1;min-width:0}.gold-estimate-form input{width:100%;font-size:12px;padding:7px}.gold-estimate-form button{font-size:11px;white-space:nowrap;padding:8px}.opportunity-panel .strategy-result p.gold-cost{font-size:12px}
/* Compact header keeps navigation and refresh above the market content. */
.app-header{height:64px;gap:24px;position:sticky;top:0;z-index:20}.app-header .brand{font-size:21px;white-space:nowrap;flex-shrink:0}.header-tools{display:flex;align-items:center;flex:1;min-width:0;gap:20px}.app-header .tabs{margin:0;border:0;gap:8px;flex-shrink:0}.app-header .tabs button{padding:8px 12px;border:0;border-radius:7px;white-space:nowrap;font-size:13px}.app-header .tabs button.active{background:#edf3ff}.header-actions{display:flex;align-items:center;gap:12px;margin-left:auto;white-space:nowrap}.header-actions #updated{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}.header-actions button{font-size:12px;padding:6px 11px}.app-header .connection{flex-shrink:0;margin-left:0;font-size:11px;white-space:nowrap}main{padding-top:18px}.overview-top{grid-template-columns:minmax(300px,360px) 1fr;gap:16px;margin-bottom:16px}.exchange-card{display:grid;grid-template-columns:1fr auto;gap:2px 12px;padding:16px 20px;align-content:center}.exchange-label{grid-column:1;grid-row:1;font-size:14px}.exchange-rate{grid-column:2;grid-row:1/3;font-size:30px;align-self:center}.exchange-card>.hint{grid-column:1;grid-row:2;font-size:11px}.exchange-quotes{grid-column:1/-1;margin-top:4px}.exchange-card>small{grid-column:1/-1}.expectation-form{padding:14px 18px;gap:10px 16px}.expectation-form>div{min-width:110px;flex:1}.expectation-form>div p{margin:2px 0}.expectation-form label{max-width:145px;flex:1;min-width:100px}.expectation-form input{padding-top:7px;padding-bottom:7px}.expectation-form small{bottom:8px}.expectation-note{font-size:11px}.toolbar{margin-bottom:12px}.overview-table>thead>tr:first-child>th{padding:12px 18px;font-size:13px}.overview-table td{padding:13px 18px}.target-row:focus-within{background:#f4f8ff}.target-row:hover .target-link{color:var(--accent)}.target-link:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
@media(max-width:1100px){.app-header{height:auto;min-height:64px;padding-top:10px;padding-bottom:10px;flex-wrap:wrap;gap:8px 20px}.app-header .connection{margin-left:auto}.header-tools{order:3;flex-basis:100%;gap:12px}.overview-top{grid-template-columns:300px 1fr}.expectation-form>div{flex-basis:100%}.expectation-form{gap:8px 12px}.expectation-form label{max-width:none;min-width:90px}.expectation-form button{padding:7px 10px}.exchange-card{padding:14px 16px}}
@media(max-width:800px){main{padding-top:14px}.overview-top{grid-template-columns:1fr;gap:12px}.exchange-card{grid-template-columns:1fr auto}.exchange-rate{font-size:30px}.expectation-form{padding:12px 14px}.overview-table>thead>tr:first-child>th,.overview-table td{padding:12px 14px}}
@media(max-width:540px){.app-header{padding:8px 12px}.app-header .brand{font-size:19px}.header-tools{gap:5px;flex-wrap:wrap}.app-header .tabs{gap:2px;flex:1}.app-header .tabs button{padding:7px 9px;font-size:12px}.header-actions{gap:8px}.header-actions #updated{font-size:10px}.header-actions button{padding:5px 8px}.expectation-form label{min-width:80px}.expectation-form>div{min-width:0}.expectation-form>div p{display:none}}
/* Keep column headings and target names visible within the scrolling list. */
.market-list .table-scroll{overflow:auto;max-height:65vh;overscroll-behavior:contain;scrollbar-gutter:stable}.overview-table{border-collapse:separate;border-spacing:0}.overview-table thead th{position:sticky;top:0;z-index:3;background:#fafbfd;box-shadow:0 1px 0 var(--line)}.overview-table tbody td:first-child{position:sticky;left:0;z-index:2;background:#fff}.overview-table thead th:first-child{left:0;z-index:4}.overview-table tbody tr:hover td:first-child,.overview-table tbody tr:focus-within td:first-child{background:#f4f8ff}.sort-toggle{white-space:nowrap;font-size:12px;padding:8px 12px}.sort-toggle[aria-pressed=true]{border-color:#83a9f2;background:#edf3ff;color:var(--accent)}.toolbar #target-count{margin-left:auto;white-space:nowrap}.exchange-rate{grid-row:1}.exchange-quotes{grid-row:2}.detail-grid.exchange-detail{grid-template-columns:minmax(360px,1.6fr) minmax(260px,1fr)}.exchange-detail .depth-panel{grid-column:auto}main{padding-bottom:18px}@media(max-width:800px){.detail-grid.exchange-detail{grid-template-columns:1fr}.toolbar{flex-wrap:wrap}.sort-toggle{padding:7px 10px}}
/* Target detail dialog: fit both chart/book rows inside the viewport. */
body.detail-open{overflow:hidden}
.market-detail-dialog{width:min(1480px,calc(100vw - 24px));height:calc(100dvh - 24px);max-width:none;max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--line);background:var(--bg);overflow:hidden}
.market-detail-dialog[open]{display:flex;flex-direction:column}
.market-detail-dialog::backdrop{background:#17263b88}
.detail-close{position:absolute;top:8px;right:8px;z-index:10;width:30px;height:30px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid #dce3ed;background:#fff;color:#596c87;font-size:23px;font-weight:400;line-height:1;box-shadow:0 2px 6px #17263b0d}
.detail-close:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.detail-modal-header{display:flex;align-items:center;gap:14px;flex-shrink:0;min-height:47px;padding:8px 48px 8px 12px;border-bottom:1px solid var(--line);background:#fff}
.detail-modal-header h1{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;margin:0;letter-spacing:0}
.currency-tabs{display:flex;gap:6px;margin-left:auto;flex-shrink:0}
.currency-tabs button{font-size:12px;padding:4px 10px;white-space:nowrap}
.detail-modal-body{position:relative;display:flex;flex-direction:column;flex:1;gap:8px;min-height:0;overflow:hidden;padding:8px 10px}
.detail-notice{flex-shrink:0;background:#fff7e9;color:#976518;padding:5px 12px;font-size:12px}
.detail-opportunities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;flex-shrink:0;margin:0;padding:0;border:0;background:transparent}
.detail-opportunities .strategy-result{margin:0;padding:8px 10px;background:#fff;border:1px solid var(--line);border-radius:8px;min-width:0}
.detail-opportunities .strategy-heading{gap:6px;margin-bottom:3px}
.detail-opportunities .strategy-heading h3{font-size:12px}
.detail-opportunities .strategy-heading .tag{padding:1px 5px;font-size:10px}
.detail-opportunities .strategy-summary{display:flex;align-items:baseline;justify-content:space-between;gap:6px;min-height:24px}
.detail-opportunities .strategy-summary>strong{font-size:17px;line-height:24px;margin:0}
.detail-opportunities .strategy-summary>strong.muted{font-size:12px}
.detail-opportunities .strategy-roi{font-size:11px;color:var(--muted);white-space:nowrap}
.detail-opportunities .strategy-result p{font-size:11px;line-height:18px;margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.detail-opportunities .gold-estimate-form{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:4px}
.detail-opportunities .gold-estimate-form label{display:flex;flex-direction:row;align-items:center;gap:5px;flex:none;font-size:10px;white-space:nowrap}
.detail-opportunities .gold-estimate-form input{width:66px;padding:2px 5px;font-size:11px;height:24px}
.detail-opportunities .gold-estimate-form button{padding:2px 7px;font-size:10px;height:24px}
.detail-opportunities .gold-efficiency{font-size:10px;line-height:16px;color:var(--muted);white-space:nowrap}
.detail-pair-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;align-items:stretch;flex:1;min-height:0}
.detail-pair-grid .detail-row-card{display:flex;flex-direction:column;min-height:0;margin:0;padding:8px;grid-column:auto;overflow:hidden}
.detail-pair-grid .panel-heading-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;min-height:26px;margin-bottom:5px}
.detail-pair-grid .panel-heading{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:13px;line-height:22px}
.detail-pair-grid .detail-tools{display:flex;gap:4px;flex-shrink:0;flex-wrap:nowrap;margin:0 0 0 auto}
.detail-pair-grid .detail-tools button{font-size:11px;line-height:18px;padding:2px 7px;white-space:nowrap}
.chart-slot{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
.chart-interactive{position:relative;display:flex;flex:1;min-height:0;min-width:0;overflow:hidden}
.chart-interactive .chart{cursor:crosshair;outline-offset:-2px}
.chart-guides{pointer-events:none}
.chart-price,.chart-time{position:absolute;z-index:2;pointer-events:none;max-width:calc(100% - 6px);border-radius:5px;background:#2458b8;color:#fff;box-shadow:0 2px 8px #17263b26;font-variant-numeric:tabular-nums;line-height:1.45}
.chart-price{padding:5px 8px;font-size:13px;white-space:nowrap}
.chart-price small{display:block;font-size:10px;color:#dce8ff}
.chart-time{bottom:0;padding:3px 7px;font-size:11px;text-align:center;white-space:normal;width:max-content}
.detail-pair-grid .chart{width:100%;height:100%;min-height:0;flex:1;margin:0}
.depth-table-scroll{overflow:auto;flex:1;min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable}
.detail-pair-grid .depth-panel table{margin:0;font-size:12px}
.detail-pair-grid .depth-panel th,.detail-pair-grid .depth-panel td{padding:4px 6px;font-size:12px;line-height:17px;white-space:nowrap}
.detail-pair-grid .depth-panel th{position:sticky;top:0;background:#fafbfd;z-index:1}
.detail-pair-grid .depth-panel td small{display:inline;margin:0 0 0 5px;font-size:10px}
.detail-pair-grid .book-captured{margin-left:auto;flex-shrink:0;font-size:10px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:900px){.detail-opportunities .strategy-result{padding:7px}.detail-opportunities .gold-efficiency{flex-basis:100%}.detail-pair-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.market-detail-dialog{width:calc(100vw - 12px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);border-radius:10px}.detail-modal-header{gap:6px;padding-left:8px;padding-right:42px}.detail-modal-header h1{font-size:14px}.currency-tabs{gap:3px}.currency-tabs button{font-size:10px;padding:4px 5px}.detail-close{top:9px;right:6px;width:27px;height:27px}.detail-modal-body{padding:6px;gap:6px}.detail-opportunities{grid-template-columns:repeat(3,minmax(220px,1fr));overflow-x:auto;gap:6px}.detail-pair-grid{gap:6px}.detail-pair-grid .detail-row-card{padding:5px}.detail-pair-grid .panel-heading-row{gap:3px;flex-wrap:wrap;align-content:center;min-height:44px;margin-bottom:3px}.detail-pair-grid .panel-heading{font-size:11px;flex-basis:100%}.detail-pair-grid .detail-tools{gap:3px}.detail-pair-grid .detail-tools button{font-size:10px;padding:1px 5px}.detail-pair-grid .depth-panel th,.detail-pair-grid .depth-panel td{font-size:10px;padding:3px 4px}.detail-pair-grid .depth-panel td small{font-size:9px}.detail-pair-grid .book-captured{font-size:9px}}

.strategy-gold{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:4px;font-size:11px;color:var(--muted)}
.book-gold-cost{flex-shrink:0;font-size:11px;color:var(--muted);margin:0 0 4px;line-height:16px}
@media(max-height:800px) and (min-width:641px){.detail-pair-grid .depth-panel th,.detail-pair-grid .depth-panel td{padding-top:2.5px;padding-bottom:2.5px}}

/* Keep the exchange controls beside the quote and preserve the compact header height. */
.overview-top{grid-template-columns:minmax(0,1fr) 360px}
.exchange-panel{display:grid;grid-template-columns:minmax(0,1fr) 190px;align-items:center;min-width:0;border:1px solid #ceddf8;border-radius:12px;background:#fff;box-shadow:0 3px 14px #326de609;overflow:hidden}
.exchange-panel .exchange-card{width:100%;min-width:0;border:0;border-radius:0;box-shadow:none;padding:16px 20px}
.exchange-panel .exchange-rate{justify-self:end;white-space:nowrap}
.exchange-panel .exchange-quotes{grid-column:1;grid-row:2;white-space:nowrap}
.exchange-panel .exchange-caption{grid-column:2;grid-row:2;justify-self:end;align-self:center;text-align:right}
.exchange-stock-form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 8px;padding:14px 20px 14px 0;font-size:12px;color:#435673}
.exchange-stock-form label{grid-column:1/-1}
.exchange-stock-form label,.exchange-stock-form span{white-space:nowrap}
.exchange-stock-picker{position:relative;min-width:0}
.exchange-stock-picker::after{content:'▾';position:absolute;right:9px;top:50%;transform:translateY(-50%);pointer-events:none;color:#435673}
.exchange-stock-form input{width:100%;min-width:0;padding:4px 30px 4px 7px;font-size:12px;appearance:textfield}
.exchange-stock-form input::-webkit-inner-spin-button,.exchange-stock-form input::-webkit-outer-spin-button{appearance:none;margin:0}
.exchange-stock-picker select{position:absolute;right:1px;top:1px;bottom:1px;width:26px;padding:0;border:0;background:transparent;appearance:none;color:transparent;cursor:pointer}
.exchange-stock-picker select option{color:var(--ink);background:#fff}
.exchange-stock-picker select:focus{outline-offset:-2px}
.expectation-form{flex-wrap:nowrap}
.expectation-form>div{min-width:0;flex:0 0 auto}
.expectation-form label{min-width:0;max-width:none}
.expectation-form button{flex-shrink:0}
@media(min-width:801px) and (max-width:1100px){
  .overview-top{grid-template-columns:minmax(0,1fr) 280px}
  .exchange-panel{grid-template-columns:minmax(0,1fr) 140px}
  .exchange-panel .exchange-card{padding:14px 16px;column-gap:8px}
  .exchange-panel .exchange-quotes{font-size:11px}
  .exchange-stock-form{padding-right:16px}
  .expectation-form{padding:12px 10px;gap:8px}
}
@media(max-width:800px){
  .overview-top{grid-template-columns:1fr}
  .exchange-panel{grid-template-columns:1fr}
  .exchange-panel .exchange-card{padding:14px 16px 6px}
  .exchange-panel .exchange-quotes{grid-column:1/-1}
  .exchange-panel .exchange-caption{grid-column:1/-1;grid-row:3;justify-self:start;text-align:left}
  .exchange-stock-form{display:flex;gap:8px;padding:4px 16px 14px}
  .exchange-stock-picker{flex:1}
}

/* Readable strategy details with scrolling, followed by full-sized price trends. */
.detail-modal-body{display:block;overflow-y:auto;padding:12px;scrollbar-gutter:stable}
.detail-opportunities{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:start;margin-bottom:16px;overflow:visible}
.detail-opportunities .strategy-result{padding:16px}
.detail-opportunities .strategy-heading{margin-bottom:12px}
.detail-opportunities .strategy-heading h3{font-size:15px}
.detail-opportunities .strategy-gold-primary{display:block;font-size:25px;line-height:1.4;color:var(--green);font-variant-numeric:tabular-nums}
.detail-opportunities .strategy-result p{font-size:12px;line-height:1.65;white-space:normal;overflow:visible;margin:6px 0}
.detail-opportunities .strategy-gold-label{margin-top:0;color:var(--muted)}
.detail-opportunities .strategy-reason{color:var(--amber);background:#fff7e9;padding:6px 8px;border-radius:6px}
.strategy-metrics{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}
.strategy-metrics dt{font-size:11px;color:var(--muted)}
.strategy-metrics dd{font-size:16px;font-weight:650;margin:1px 0 0;font-variant-numeric:tabular-nums}
.strategy-threshold{display:flex;flex-direction:column;gap:3px;background:#f1f5fc;padding:10px;border-radius:7px;margin:12px 0}
.strategy-threshold span,.strategy-threshold small{font-size:11px;color:#596c87}
.strategy-threshold strong{font-size:17px}
.detail-opportunities .strategy-route{font-weight:650;color:var(--ink)}
.strategy-fee-breakdown{padding:6px 10px;background:#f7f9fc;border-radius:6px}
.strategy-formulas{margin-top:12px;border-top:1px solid var(--line);padding-top:9px}
.strategy-formulas summary{font-size:12px;font-weight:600;cursor:pointer;color:var(--accent)}
.detail-pair-grid{grid-template-rows:repeat(2,300px);gap:12px;margin-bottom:14px}
@media(max-width:1100px){.detail-opportunities{grid-template-columns:1fr}.strategy-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:640px){.detail-modal-body{padding:8px}.detail-opportunities{grid-template-columns:1fr;overflow:visible}.detail-opportunities .strategy-result{padding:12px}.strategy-metrics{grid-template-columns:1fr 1fr}.detail-pair-grid{grid-template-columns:1fr;grid-template-rows:300px auto 300px auto}.detail-pair-grid .depth-panel{min-height:180px;max-height:340px}}

.detail-opportunities .strategy-result[data-feasible=false] .strategy-gold-primary{color:var(--muted)}

/* Temporary calculations reuse the regular strategy cards and captured stock. */
.search-field{position:relative;flex:1;max-width:340px;min-width:0}
.toolbar .search-field input#search{width:100%;max-width:none;padding-right:38px}
#search-clear{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:28px;height:28px;padding:0;border-radius:50%;font-size:21px;font-weight:400;line-height:1;background:transparent;color:var(--muted)}
#search-clear:hover{background:#edf1f6;color:var(--ink)}
#search-clear:focus-visible{outline:2px solid var(--accent)}
.calculator-jump{display:block;margin:0 0 10px auto;padding:5px 8px}
.calculator-panel{padding:18px;scroll-margin-top:12px;border-color:#ceddf8}
.calculator-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.calculator-heading h2{margin:0;font-size:19px}
.calculator-panel .calculator-intro{font-size:13px;color:#435673;margin-top:9px}
.calculator-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}
.calculator-form fieldset{margin:0;padding:12px;min-width:0;border:1px solid var(--line);border-radius:8px;background:#fafcff}
.calculator-form legend{padding:0 5px;font-size:13px;font-weight:650}
.calculator-form label{font-size:12px;gap:4px;margin-bottom:12px}
.calculator-form label:last-child{margin-bottom:0}
.calculator-form input{width:100%;font-variant-numeric:tabular-nums}
.calculator-form input[aria-invalid=true]{border-color:#b75b45;background:#fff8f6}
.calculator-form input::placeholder{color:#8794a5;opacity:1}
.calculator-form .hint{font-size:11px;line-height:1.5}
.calculator-limit{color:var(--ink);font-size:12px;margin-top:18px}
.calculator-actions{grid-column:1/-1;display:flex;gap:10px;flex-wrap:wrap}
.calculator-status{font-size:12px;margin:12px 0;color:#435673}
.calculator-status.invalid{color:#b75b45}
.calculator-results{margin:0}
@media(max-width:640px){.toolbar .search-field{flex:0 0 100%;max-width:none;width:100%}.calculator-panel{padding:12px}.calculator-form{grid-template-columns:1fr}.calculator-form fieldset{padding:10px}.calculator-heading h2{font-size:17px}}

/* Keep execution prices easy to compare between the overview and details. */
.opportunity-link .overview-operation{font-weight:650;color:#255bc7;font-size:12px;white-space:normal}
.opportunity-link .overview-threshold{font-weight:650;color:#7950a0;font-size:12px;white-space:normal}
.detail-opportunities .strategy-result .strategy-route{font-size:16px;font-weight:750;color:#194fb4;background:#edf4ff;border-left:3px solid var(--accent);border-radius:6px;padding:10px 12px;margin:12px 0;line-height:1.6}
.converted-stock{color:#255bc7;font-variant-numeric:tabular-nums}

.currency-name{display:flex;align-items:center;gap:6px}
.favorite-button{flex:0 0 30px;width:30px;height:32px;padding:0;border-radius:6px;background:transparent;color:#8594aa;font-size:23px;line-height:1}
.favorite-button.saved{color:#b17b13}
.favorite-button:hover{background:#edf3ff}
.favorite-button:focus-visible{outline:2px solid var(--accent)}
.toolbar .check{white-space:nowrap}
@media(max-width:900px){.toolbar{flex-wrap:wrap}.toolbar .search-field{max-width:none}.currency-name{gap:2px}}

/* Buy and sell prices share one time axis, with both depth tables below. */
.detail-pair-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:320px 280px}
.detail-pair-grid .combined-trend{grid-column:1/-1;padding:12px}
.trend-legend{display:flex;gap:18px;margin:2px 0 6px;font-size:12px;flex-shrink:0}
.trend-legend>span{display:flex;gap:7px;align-items:center;color:var(--series-color)}
.trend-legend i{width:22px;height:0;background:none;border-radius:0;border-top:2px solid var(--series-color)}
.trend-legend [data-side=bid] i{border-top-style:dashed}
.combined-trend .chart-price{background:#fff;color:var(--ink);border:1px solid #dce3ed;white-space:normal;max-width:min(330px,calc(100% - 6px))}
.combined-trend .chart-price small{color:#64748b;line-height:1.45}
.chart-quote+.chart-quote{border-top:1px solid var(--line);margin-top:5px;padding-top:5px}
@media(max-width:640px){.detail-pair-grid{grid-template-columns:1fr;grid-template-rows:300px auto auto}.detail-pair-grid .combined-trend{padding:8px}.detail-pair-grid .depth-panel{min-height:190px;max-height:340px}.detail-modal-header{gap:4px}.detail-modal-header .favorite-button{flex-basis:25px;width:25px}.depth-table-scroll table{min-width:440px}}

/* Keep quote depth beside live/manual results; trends occupy their own full row. */
.detail-workspace{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(320px,1fr);gap:12px;align-items:start;margin-bottom:14px}
.detail-reference{display:grid;gap:10px;position:sticky;top:0;min-width:0}
.detail-workspace .depth-panel{grid-column:auto;padding:12px;min-width:0}
.detail-workspace .panel-heading-row,.detail-trend-section .panel-heading-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px;flex-wrap:wrap}
.detail-workspace .panel-heading,.detail-trend-section .panel-heading{font-size:13px;line-height:1.5;margin:0}
.detail-workspace .book-captured{font-size:10px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.detail-workspace .depth-table-scroll{overflow-x:auto;overflow-y:visible;scrollbar-gutter:auto}
.detail-workspace .depth-panel table{margin:0;min-width:0;max-width:none;table-layout:auto}
.detail-workspace .depth-panel th,.detail-workspace .depth-panel td{padding:4px 6px;font-size:12px;line-height:18px;white-space:normal}
.detail-workspace .depth-panel td:first-child{width:44px}
.detail-workspace .depth-panel th:first-child{white-space:nowrap}
.detail-workspace .depth-price{padding:1px 5px;background:transparent;color:var(--accent);font-size:12px;border-radius:4px;font-variant-numeric:tabular-nums}
.detail-workspace .depth-price:hover,.detail-workspace .depth-price:focus-visible{background:#edf3ff;outline:1px solid #b5ceff}
.detail-workspace .converted-stock{overflow-wrap:anywhere}
.detail-workspace .calculator-panel{padding:12px;border-color:var(--line)}
.detail-workspace .calculator-heading{justify-content:space-between;gap:8px;margin-bottom:10px}
.detail-workspace .calculator-heading h2{font-size:14px}
.calculator-modes{display:flex;gap:5px}
.calculator-modes button{font-size:12px;padding:4px 9px}
.detail-workspace .calculator-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;margin:0 0 10px}
.detail-workspace .calculator-form label{font-size:11px;color:#596c87;gap:4px;margin:0}
.detail-workspace .calculator-form input{font-size:13px;padding:5px 8px;line-height:1.4}
.detail-workspace .calculator-form input.modified{border-color:#97b6f2;background:#f6f9ff}
.detail-workspace .calculator-form input[aria-invalid=true]{border-color:#b75b45;background:#fff8f6}
.detail-workspace .calculator-limit{display:flex;flex-direction:column;gap:4px;margin:0;min-width:0;font-size:11px;color:#596c87}
.detail-workspace .calculator-limit strong{font-size:12px;font-weight:500;color:var(--ink);background:#f7f9fc;border:1px solid var(--line);border-radius:8px;padding:5px 8px;line-height:19px}
.detail-workspace .calculator-actions{justify-content:flex-end}
.detail-workspace .calculator-actions button{font-size:11px;padding:0 2px}
.detail-workspace .calculator-status{margin:6px 0;font-size:12px}
.detail-workspace .detail-opportunities{display:grid;grid-template-columns:1fr;gap:8px;margin:0;overflow:visible}
.detail-workspace .strategy-result{padding:0;overflow:hidden}
.detail-workspace .strategy-result>summary{display:block;padding:9px 10px;cursor:pointer;list-style:none}
.detail-workspace .strategy-result>summary::-webkit-details-marker{display:none}
.detail-workspace .strategy-result>summary:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.detail-workspace .strategy-heading{display:flex;align-items:center;gap:7px;margin:0}
.detail-workspace .strategy-heading h3{font-size:13px;white-space:nowrap;margin:0}
.detail-workspace .strategy-gold-primary{display:flex;align-items:baseline;gap:5px;margin-left:auto;white-space:nowrap;font-size:19px;line-height:1.25}
.detail-workspace .strategy-gold-primary small{font-size:11px;font-weight:500}
.detail-workspace .strategy-heading .tag{font-size:10px;padding:1px 5px}
.strategy-chevron{display:inline-block;color:var(--muted);font-size:17px;line-height:1}
.strategy-result[open]>.strategy-summary .strategy-chevron{transform:rotate(90deg)}
.detail-workspace .strategy-result .strategy-route{font-size:14px;line-height:1.5;padding:4px 7px;margin:6px 0 0;border-left-width:2px;overflow-wrap:anywhere}
.detail-workspace .strategy-result .strategy-threshold-line{font-size:14px;line-height:1.5;font-weight:750;color:#7950a0;background:#f6f1fa;border-left:2px solid #9c76bb;border-radius:6px;padding:4px 7px;margin:5px 0 0;overflow-wrap:anywhere}
.detail-workspace .strategy-body{border-top:1px solid var(--line);padding:0 10px 8px}
.detail-workspace .strategy-metrics{grid-template-columns:1fr 1fr;gap:5px 10px;margin:7px 0}
.detail-workspace .strategy-metrics dt{font-size:11px;line-height:1.4}
.detail-workspace .strategy-metrics dd{font-size:13px;line-height:1.45;margin:1px 0 0;overflow-wrap:anywhere}
.detail-workspace .strategy-formulas{margin:5px 0 0;padding:5px 0 0}
.detail-workspace .strategy-formulas summary{font-size:11px}
.detail-workspace .strategy-reason{font-size:11px;line-height:1.4;margin:5px 0;padding:4px 6px}
.detail-trend-section{display:flex;flex-direction:column;min-width:0;height:340px;padding:12px;margin:0}
.detail-trend-section .detail-tools{margin:0;gap:5px}
.detail-trend-section .detail-tools button{font-size:11px;padding:3px 8px}
.detail-trend-section .chart{width:100%;height:100%;min-height:0;flex:1;margin:0}
.exchange-workspace{grid-template-columns:1fr}
.exchange-workspace .detail-reference{grid-template-columns:repeat(2,minmax(0,1fr));position:static}
@media(max-width:850px){.detail-workspace{grid-template-columns:1fr}.detail-reference{position:static}.exchange-workspace .detail-reference{grid-template-columns:1fr}.detail-workspace .depth-panel{padding:10px}.detail-workspace .calculator-panel{padding:10px}.detail-trend-section{height:310px}}
@media(max-width:420px){.detail-workspace .strategy-heading{gap:4px;flex-wrap:wrap}.detail-workspace .strategy-heading h3{font-size:12px}.detail-workspace .strategy-gold-primary{font-size:17px}.detail-workspace .strategy-result .strategy-route,.detail-workspace .strategy-result .strategy-threshold-line{font-size:13px}.detail-workspace .depth-panel th,.detail-workspace .depth-panel td{padding:4px;font-size:11px}.detail-workspace .book-captured{font-size:9px}.detail-workspace .calculator-form{column-gap:8px}.detail-trend-section .panel-heading-row{align-items:flex-start}.detail-trend-section .detail-tools{margin-left:auto}.detail-trend-section{padding:9px}}
