html.stock-mode,body.stock-mode{background:#ffffff;color:#191f28}
body.stock-mode>.header,body.stock-mode main>footer,body.stock-mode #banner{display:none}
body.stock-mode main{max-width:none;padding:0}
.stock-shell{max-width:900px;margin:auto;padding-bottom:130px;background:#ffffff;min-height:100dvh;color:#191f28}
.stock-topbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:12px;height:64px;padding:8px 20px;background:#fffffff7}
.stock-icon-button{width:44px;height:44px;min-height:44px;padding:10px;background:transparent;border-radius:12px;flex-shrink:0}
.stock-icon-button img{width:24px;height:24px;filter:none}
.stock-icon-button.selected img{filter:invert(40%) sepia(88%) saturate(2281%) hue-rotate(325deg)}
.stock-icon-button.notify img{filter:invert(77%) sepia(78%) saturate(1182%) hue-rotate(341deg)}
.stock-compact-title{flex:1;min-width:0;opacity:0;line-height:1.35;text-align:center;transition:opacity .15s}
.stock-topbar.compact .stock-compact-title{opacity:1}
.stock-compact-title strong{display:block;font-size:14px;font-weight:500;color:#6b7684;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stock-compact-title span{color:#3182f6;font-size:15px;font-weight:700}
.stock-hero{padding:20px 24px 28px}
.stock-name-row{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.stock-name-row h1{font-size:24px;font-weight:750;letter-spacing:-.8px}
.stock-ticker{background:#f2f4f6;border-radius:8px;padding:3px 8px;color:#6b7684;font-size:12px}
.stock-price{font-size:38px;font-weight:760;line-height:1.3;letter-spacing:-1.5px;margin-bottom:8px}
.stock-hero p{font-size:14px}
.stock-context{font-size:11px!important;color:#6b7684;margin-top:13px}
.stock-shell .up{color:#f04452}.stock-shell .down{color:#3182f6}
.stock-tabs{position:sticky;top:64px;z-index:4;display:flex;background:#fffffff7;border-bottom:1px solid #e5e8eb;padding:0 20px}
.stock-tabs button{flex:1;border-radius:0;background:transparent;color:#6b7684;font-size:17px;padding:16px 8px;min-height:60px;position:relative}
.stock-tabs button.active{color:#191f28}
.stock-tabs button.active::after{content:'';position:absolute;left:12px;right:12px;bottom:-1px;height:3px;border-radius:3px;background:#3182f6}
.stock-chart-section,.stock-info-section{scroll-margin-top:124px}
.stock-chart-tools{display:flex;align-items:center;justify-content:space-between;padding:16px 24px 8px;color:#3182f6;font-size:14px}
.stock-chart-tools .stock-icon-button{width:36px;height:36px;min-height:36px;padding:7px}
.stock-chart-tools img{width:22px;height:22px}
.stock-chart-legend{display:flex;gap:12px;padding:0 24px;color:#6b7684;font-size:11px}
.stock-chart-legend span:last-child{color:#6b7684}
.stock-chart-box{position:relative;background:#ffffff;margin:12px 0 0}
.stock-chart-box:fullscreen{padding-top:16px;height:100%;display:flex;align-items:stretch}
.stock-candles{width:100%;height:440px;min-width:0}
.stock-chart-box:fullscreen .stock-candles{height:100%;flex:1}
.stock-chart-empty{position:absolute;inset:0;display:grid;place-content:center;text-align:center;padding:30px;background:#fffffff5;color:#6b7684;font-size:14px;pointer-events:none;z-index:2}
.stock-chart-empty[hidden]{display:none}
.stock-timeframes{display:flex;justify-content:space-between;gap:10px;padding:20px 24px 12px}
.stock-timeframes button{background:transparent;color:#6b7684;min-height:44px;padding:8px 16px;font-size:14px}
.stock-timeframes button.active{background:#f2f4f6;color:#3182f6}
.stock-chart-caption{padding:0 24px 22px;color:#6b7684;font-size:11px;line-height:1.7}
.stock-info-section{border-top:14px solid #f2f4f6}
.stock-section-block{padding:30px 24px;border-bottom:14px solid #f2f4f6}
.stock-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}
.stock-section-heading h2{font-size:21px;letter-spacing:-.5px}
.stock-section-heading>span{font-size:12px;color:#6b7684}
.stock-range{margin:8px 0 28px}
.stock-range-track{height:8px;border-radius:10px;background:#f2f4f6;position:relative;margin:0 6px 12px}
.stock-range-track i{position:absolute;top:-3px;width:14px;height:14px;border-radius:50%;background:#6b7684;transform:translateX(-50%)}
.stock-range-labels{display:flex;justify-content:space-between;gap:12px;color:#6b7684;font-size:13px;line-height:1.6}
.stock-range-labels>div:last-child{text-align:right}.stock-range-labels strong{display:block;font-size:17px;font-weight:550}
.stock-range-note{font-size:11px;color:#6b7684;margin-top:13px}
.stock-quote-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px 26px;margin:0}
.stock-quote-grid>div{display:flex;justify-content:space-between;gap:10px;min-width:0;font-size:14px}
.stock-quote-grid dt{color:#6b7684;white-space:nowrap}.stock-quote-grid dd{margin:0;text-align:right;overflow-wrap:anywhere}
.stock-news-item{padding:22px 0;border-bottom:1px solid #e5e8eb}
.stock-news-item:first-child{padding-top:0}.stock-news-item:last-child{border-bottom:0;padding-bottom:0}
.stock-news-item h3{font-size:17px;line-height:1.55;letter-spacing:-.3px;font-weight:650}
.stock-news-item p{color:#6b7684;font-size:14px;line-height:1.8}
.stock-news-item .stock-news-time{font-size:12px;color:#6b7684;margin:12px 0}
.stock-empty{font-size:14px;color:#6b7684;padding:20px 0;line-height:1.8}
.stock-company-identity{display:flex;align-items:center;gap:14px;margin:26px 0 18px}
.stock-company-mark{display:grid;place-items:center;background:#e8f3ff;color:#3182f6;font-size:18px;font-weight:800;border-radius:15px;width:52px;height:52px;flex-shrink:0}
.stock-company-identity h3{font-size:20px;font-weight:550}.stock-company-identity p{color:#6b7684;font-size:12px;margin-top:3px}
.stock-company-description{font-size:16px;line-height:1.85;color:#6b7684}
.stock-sector{display:inline-block;margin-top:24px;padding:16px 24px;border-radius:18px;background:#f2f4f6;color:#6b7684;font-size:15px}
.stock-company-note{margin-top:20px;font-size:12px;color:#6b7684;line-height:1.8}
.stock-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.stock-metrics>div{background:#f2f4f6;padding:20px 10px;border-radius:15px;text-align:center;min-width:0}
.stock-metrics span{display:block;color:#6b7684;font-size:12px;margin-bottom:5px}
.stock-metrics strong{font-size:17px;font-weight:650;overflow-wrap:anywhere}
.stock-order-footer{position:fixed;bottom:0;left:50%;transform:translateX(-50%);z-index:7;width:min(100%,900px);padding:12px 20px calc(14px + env(safe-area-inset-bottom));background:#fffffff5;border-top:1px solid #e5e8eb}
.stock-order-footer p{font-size:11px;color:#6b7684;margin-bottom:10px;text-align:center}
.stock-order-actions{display:flex;gap:10px}.stock-order-actions button{flex:1;min-height:54px;font-size:17px;border-radius:15px}
dialog.stock-order-dialog{background:#ffffff;color:#191f28;position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,500px);max-width:500px;max-height:92dvh;border-radius:24px 24px 0 0;padding:24px 24px calc(24px + env(safe-area-inset-bottom))}
.stock-order-dialog .section-head{margin-bottom:12px}.stock-order-dialog .section-head h2{font-size:21px}
.stock-order-dialog .stock-order-price{color:#6b7684;font-size:14px;margin-bottom:22px}
.stock-order-tabs{display:flex;background:#f2f4f6;border-radius:12px;padding:4px;margin-bottom:20px}
.stock-order-tabs button{flex:1;color:#6b7684;background:transparent;padding:10px;min-height:44px}
.stock-order-tabs #order-tab-buy.active{color:#f04452;background:#fff0f1}.stock-order-tabs #order-tab-sell.active{color:#3182f6;background:#e8f3ff}
.stock-order-dialog .trade-form{background:transparent;padding:0;margin:0}
.stock-order-dialog input{background:#f2f4f6;border-color:#e5e8eb;color:#191f28;font-size:18px}
.stock-order-dialog .quantity-row{flex-wrap:nowrap}.stock-order-dialog .quantity-row input{min-width:0}
.stock-order-dialog .quantity-row button{background:#f2f4f6;color:#6b7684;flex:0 0 auto;min-width:86px}
.stock-order-dialog .stock-order-balance{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:#6b7684;margin-bottom:12px}
.stock-order-dialog .estimate{display:block;font-size:13px;color:#6b7684;line-height:1.8;margin:16px 0}
.stock-order-dialog #stock-order-submit{width:100%;font-size:16px;min-height:52px}
.stock-order-dialog .stock-order-policy{font-size:11px;color:#6b7684;line-height:1.8;margin-top:14px}
.stock-order-dialog #stock-order-check{width:100%;margin-top:12px;background:#f2f4f6;color:#191f28}
body.stock-mode #confirm-dialog,body.stock-mode #login-dialog{background:#ffffff;color:#191f28}
body.stock-mode #confirm-dialog .secondary,body.stock-mode #login-dialog .secondary{background:#f2f4f6;color:#191f28}
body.stock-mode #login-dialog input{background:#f2f4f6;color:#191f28;border-color:#e5e8eb}
@media(min-width:900px){.stock-shell{border-left:1px solid #e5e8eb;border-right:1px solid #e5e8eb}.stock-hero{padding-left:36px;padding-right:36px}.stock-topbar{padding-left:28px;padding-right:28px}.stock-section-block{padding:36px}.stock-candles{height:490px}}
@media(max-width:480px){.stock-topbar{gap:6px;padding:8px 12px}.stock-hero{padding-left:22px;padding-right:22px}.stock-quote-grid{gap:18px 22px;font-size:13px}.stock-quote-grid>div{flex-wrap:wrap;gap:3px}.stock-quote-grid dd{width:100%;text-align:left;font-size:16px}.stock-metrics strong{font-size:15px}.stock-range-labels strong{font-size:16px}.stock-timeframes{gap:4px}.stock-timeframes button{padding:8px 14px}}
@media(prefers-reduced-motion:reduce){.stock-compact-title{transition:none}}
/* Match the reference's compact header so the chart controls stay above orders. */
.stock-topbar{height:52px;background:#ffffff}
.stock-hero{padding:8px 22px 16px}
.stock-name-row{gap:8px;margin-bottom:4px;flex-wrap:wrap}
.stock-name-row h1{font-size:21px}
.stock-price{font-size:34px;margin-bottom:6px}
.stock-context{margin-top:0;font-size:10px!important}
.stock-hero>p{font-size:13px}
.stock-tabs{top:52px;background:#ffffff}
.stock-tabs button{min-height:52px;padding:12px 8px}
.stock-chart-section,.stock-info-section{scroll-margin-top:104px}
.stock-chart-tools{padding:12px 22px 4px}
.stock-chart-legend{padding:0 22px}
.stock-candles{height:clamp(220px,calc(100dvh - 460px),490px)}
.stock-volume-label{position:absolute;left:10px;top:81%;font-size:10px;color:#6b7684;pointer-events:none}
.stock-chart-caption{font-size:10px;padding-bottom:16px}
.stock-topbar{height:48px}
.stock-hero{padding-top:6px;padding-bottom:12px}
.stock-name-row h1{font-size:20px;line-height:1.4}
.stock-price{font-size:32px;line-height:1.25}
.stock-tabs{top:48px}
.stock-tabs button{min-height:48px;padding-top:10px;padding-bottom:10px}
.stock-chart-section,.stock-info-section{scroll-margin-top:96px}
.stock-candles{height:clamp(220px,calc(100dvh - 500px - env(safe-area-inset-bottom)),490px)}

/* Original design: light canvas, white content cards. */
html.stock-mode,body.stock-mode{background:#f2f4f6}.stock-shell{background:#f2f4f6}.stock-hero,.stock-chart-section,.stock-section-block{background:#fff}.stock-section-block{border-radius:18px;margin:12px 12px 0;border-bottom:0}.stock-info-section{border-top:0}.stock-tabs button.active{color:#3182f6}.stock-icon-button:hover{background:#f2f4f6}
