.trend-dialog{box-sizing:border-box;width:min(1100px,96vw);max-width:96vw;max-height:94dvh;padding:22px;border:0;border-radius:18px;background:#fff;color:#243746;overflow:auto}.trend-dialog::backdrop{background:#15233099}.trend-dialog header{display:flex;align-items:center;justify-content:space-between}.trend-dialog h2{margin:4px 0 16px;font-size:21px}.trend-dialog small{font-size:10px;letter-spacing:2px;color:#718291}.trend-dialog button,.trend-dialog select,.trend-open{border:1px solid #dce3e9;background:#f7f9fb;color:#294556;border-radius:8px;min-height:38px;padding:6px 12px;cursor:pointer}.trend-dialog button:disabled{opacity:.35;cursor:default}.trend-toolbar,.trend-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.trend-toolbar{justify-content:space-between;font-size:12px}.trend-toolbar span,.trend-range{color:#718291;font-size:12px}.trend-quote{font-size:12px;line-height:1.8;min-height:44px;margin:10px 0 0;font-variant-numeric:tabular-nums}.trend-surface{touch-action:pan-y;cursor:crosshair;border:1px solid #edf0f3}.trend-surface svg{display:block;width:100%;height:auto;min-width:0}.trend-surface svg text{font:12px sans-serif;fill:#506171}.trend-controls{margin-top:12px;justify-content:center}.trend-controls button{min-width:42px;font-size:18px}.trend-controls [data-trend=latest]{font-size:12px}.trend-hint{color:#7c8792;font-size:12px;line-height:1.7;margin-bottom:0}.trend-open{font-size:12px;margin:0 0 10px}.trend-dialog :focus-visible{outline:2px solid #278d91;outline-offset:2px}@media(max-width:600px){.trend-dialog{padding:14px;width:96vw}.trend-dialog h2{font-size:18px}.trend-quote{min-height:65px}.trend-toolbar span{font-size:10px}.trend-controls{gap:6px}.trend-hint{font-size:11px}}

.trend-marker{cursor:pointer}.trend-marker:focus-visible{outline:none}.trend-marker:focus-visible .trend-marker-disc{stroke:#172f43;stroke-width:2}.trend-signal-detail{background:#f5f8fa;border-radius:8px;padding:8px 12px;font-size:12px;line-height:1.7;margin-top:8px}.trend-signal-detail[hidden]{display:none}.trend-signal-detail p{margin:3px 0}.trend-toolbar [data-trend-signals]{vertical-align:middle;accent-color:#127f79}
.trend-marker path,.trend-marker text{pointer-events:none}

.trend-surface svg{shape-rendering:geometricPrecision;text-rendering:optimizeLegibility}.trend-surface svg text{font-family:system-ui,"Microsoft YaHei",sans-serif}

.trend-inline{width:100%;max-width:none;max-height:none;overflow:visible;padding:12px 0;border-radius:0}.trend-inline header{display:none}.trend-inline .trend-surface svg{width:100%;max-height:none}.trend-inline .trend-quote{margin:8px 0;min-height:0}@media(max-width:600px){.trend-inline{width:100%;padding:8px 0}}

.trend-ma-legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin:4px 0 10px;font-size:12px;color:#506171}.trend-ma-legend[hidden]{display:none}.trend-ma-legend span{display:inline-flex;align-items:center;gap:6px}.trend-ma-legend i{display:inline-block;width:18px;height:3px;border-radius:2px}

.trend-monitor-actions{display:flex;align-items:center;gap:12px;flex-wrap:nowrap}.trend-monitor-actions>label{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.trend-toolbar{position:relative}.trend-monitor-actions .box-monitor{margin:0;border:0;padding:0}.trend-monitor-actions .box-monitor>summary{white-space:nowrap;font-size:12px;cursor:pointer;color:#294556}.trend-monitor-actions .box-monitor>summary span{display:none}.trend-monitor-actions .box-monitor[open]>form{position:absolute;z-index:5;right:0;top:100%;width:min(560px,100%);box-sizing:border-box;max-height:60vh;overflow:auto;padding:16px;background:white;border:1px solid #dce3e9;border-radius:10px;box-shadow:0 8px 24px #15233022}.trend-monitor-actions .box-monitor .box-fields{grid-template-columns:repeat(2,minmax(0,1fr))}

.trend-monitor-actions>label,.trend-monitor-actions .box-monitor>summary{font-family:inherit;font-size:12px;font-weight:400;line-height:1.5;color:#294556}

/* Live chart remounts must not move the browser scroll anchor down the list. */
html,body{overflow-anchor:none}.trend-inline .trend-surface{min-height:1px}.stock-help,.stock-metrics{margin:10px 0;border-top:1px solid #e0e8ed;padding-top:10px}.stock-help>summary,.stock-metrics>summary{cursor:pointer;font-size:12px;color:#607887;line-height:1.7}.trade-history .trend-surface svg{min-width:0}

/* Compact stock chrome; preserve the existing chart surface and card width. */
:is(#signalList,#watchList) .signal-header{gap:8px;margin-bottom:6px}
:is(#signalList,#watchList) .signal-icon{width:28px;height:28px;min-width:28px;font-size:15px}
:is(#signalList,#watchList) .signal-title h3{margin:0 0 3px;line-height:1.4;font-size:13px}
:is(#signalList,#watchList) .signal-title p{margin:3px 0;line-height:1.4;font-size:11px}
:is(#signalList,#watchList) .signal-title .source-note{font-size:10px;margin-top:2px}
:is(#signalList,#watchList) .signal-position-controls{gap:5px}
:is(#signalList,#watchList) .signal-position-actions button{padding:5px 7px;min-height:28px}
:is(#signalList,#watchList) .stock-note{margin:2px 0;display:block}
:is(#signalList,#watchList) .stock-note textarea{min-height:24px;height:24px;padding:2px 4px;line-height:18px;font-size:11px}
:is(#signalList,#watchList) .stock-note textarea:focus{height:54px}
:is(#signalList,#watchList) .stock-note-status:empty{display:none}
:is(#signalList,#watchList) .stock-reason{margin:5px 0;font-size:12px;color:#607887}
:is(#signalList,#watchList) .stock-reason summary{cursor:pointer}
:is(#signalList,#watchList) .stock-reason .reason{margin:6px 0;font-size:12px;line-height:1.6}
:is(#signalList,#watchList) .trade-history{margin:8px 0}
:is(#signalList,#watchList) .signal-view-heading{gap:8px;flex-wrap:wrap;justify-content:flex-start}
:is(#signalList,#watchList) .signal-view-heading strong{font-size:13px}
:is(#signalList,#watchList) .signal-view-heading>label{margin-left:auto;font-size:11px}
:is(#signalList,#watchList) .signal-view-heading select{padding:4px;min-height:28px;font-size:11px}
:is(#signalList,#watchList) .signal-view-heading .trend-open{margin:0;padding:3px 7px;min-height:28px;font-size:11px}
:is(#signalList,#watchList) .trade-history>details,.stock-metrics{margin-top:6px;padding-top:6px}
.trend-inline{padding-top:4px;padding-bottom:0}
.trend-inline .trend-toolbar{gap:5px 10px}
.trend-inline .trend-toolbar>label{display:flex;align-items:center;gap:6px;font-size:11px}
.trend-inline .trend-toolbar select{width:auto;max-width:160px;min-height:30px;padding:4px 6px;font-size:11px;margin:0}
.trend-inline .trend-toolbar>span{display:none}
.trend-inline .trend-monitor-actions{gap:8px}
.trend-inline .trend-monitor-actions>label,.trend-inline .trend-monitor-actions .box-monitor>summary{font-size:11px}
.trend-inline .trend-quote{font-size:11px;line-height:1.6;margin:6px 0}
.trend-inline .trend-controls{margin-top:7px;gap:6px}
.trend-inline .trend-controls button{min-height:30px;min-width:32px;padding:3px 7px;font-size:16px}
.trend-inline .trend-controls [data-trend=latest]{font-size:11px}
.trend-help{font-size:11px;color:#718291;margin:6px 0 0}.trend-help>summary{cursor:pointer;font-size:11px!important;font-weight:400!important}.trend-help .trend-hint{margin:5px 0}

:is(#signalList,#watchList) .signal-view-heading[hidden]{display:none}:is(#signalList,#watchList) details>summary{font-family:inherit;font-size:12px!important;font-weight:400!important;line-height:1.7;color:#607887}.form-message{overflow-wrap:anywhere;white-space:normal}#positionDialog small,#watchDialog small{overflow-wrap:anywhere}
