/* Shared phone shell. Existing desktop layouts and DOM state stay intact. */
.mobile-brandbar,nav.mobile-primary-nav,.mobile-page-heading,.mobile-trade-tabs,.mobile-research-hub{display:none}
#research-workspace{max-width:1120px;padding:24px 0 32px}
#research-workspace-title{margin:10px 0 16px;font-size:26px;font-weight:600}
#research-workspace-status:empty{display:none}
.research-workspace-back{display:inline-flex;align-items:center;min-height:44px;color:#ccf578;font-size:14px}
body[data-screen=research-detail] main>:is(.topbar,.heading,.notice,.watch-panel,.connection-panel,.workspace-grid,.history-panel,footer),
body[data-screen=research] main>:is(.notice,.watch-panel,.connection-panel,.workspace-grid,.history-panel,footer){display:none}
@media(max-width:760px){
  html{scroll-padding-top:80px}
  body{padding-bottom:calc(82px + env(safe-area-inset-bottom,0px))}
  .mobile-brandbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px;padding:15px 18px;background:#101819;border-bottom:1px solid #2d3b31}
  .mobile-brand{display:flex;align-items:center;gap:9px;font:650 21px/1.3 system-ui,sans-serif;letter-spacing:-.5px;color:#edf2e9;text-decoration:none}
  .mobile-brand-logo{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#ccf578;color:#172410;font-weight:750;font-size:21px}
  .mobile-brand-caption{font:11px/1.5 system-ui,sans-serif;color:#9caaa0}
  nav.mobile-primary-nav{position:fixed;inset:auto 0 0;top:auto;z-index:30;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;max-width:none;width:100%;margin:0;padding:7px 12px calc(8px + env(safe-area-inset-bottom,0px));background:#101819;border-top:1px solid #2d3b31}
  nav.mobile-primary-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:54px;padding:6px 4px;border-radius:9px;background:transparent;color:#9caaa0;text-decoration:none;text-align:center;font:12px/1.4 system-ui,sans-serif;white-space:nowrap}
  nav.mobile-primary-nav a[aria-current=page]{background:#253322;color:#ccf578}
  nav.mobile-primary-nav svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  body[data-app-page=home] .sidebar,body[data-app-page=home] .topbar,body[data-app-page=home] main>.heading,body[data-app-page=home] main>.notice,body[data-app-page=home] main>footer{display:none}
  body[data-app-page=home] .mobile-page-heading{display:block;padding:24px 18px 12px}
  body[data-screen=research-detail] .mobile-page-heading{display:none}
  .mobile-page-heading h1{font-size:24px;line-height:1.4;font-weight:600;margin:0;letter-spacing:-.5px}
  .mobile-page-heading p{color:#9caaa0;font-size:12px;line-height:1.7;margin:5px 0 0}
  body[data-app-page=home] .watch-panel,body[data-app-page=home] .connection-panel,body[data-app-page=home] .trade-panel,body[data-app-page=home] .history-panel,body[data-app-page=home] .market-panel{display:none}
  html[data-mobile-screen=market] .watch-panel,html[data-mobile-screen=market] .market-panel,html[data-mobile-screen=trade] .trade-panel,html[data-mobile-screen=history] .history-panel,html[data-mobile-screen=account] .connection-panel{display:block}
  html[data-mobile-screen=account] .workspace-grid,html[data-mobile-screen=history] .workspace-grid,html[data-mobile-screen=research] .workspace-grid{display:none}
  html[data-mobile-screen=trade] body[data-app-page=home] main>.notice:not(.research-entry){display:flex;margin-bottom:16px}
  html[data-mobile-screen=history] body[data-app-page=home] main>.heading{display:block;padding:0 18px 14px}
  html[data-mobile-screen=history] body[data-app-page=home] main>.heading>div{display:none}
  html[data-mobile-screen=trade] .mobile-trade-tabs,html[data-mobile-screen=history] .mobile-trade-tabs{display:flex;gap:5px;margin:5px 18px 18px;padding:5px;border-radius:9px;background:#192321}
  .mobile-trade-tabs a{flex:1;text-align:center;min-height:44px;padding:10px 6px;border-radius:6px;color:#9caaa0;font-size:13px}
  .mobile-trade-tabs a[aria-current=page]{color:#edf2e9;background:#253322}
  html[data-mobile-screen=research] .mobile-research-hub{display:block;margin:10px 18px 24px}
  .mobile-research-menu{background:#192321;border:1px solid #2d3b31;border-radius:14px;padding:0 16px}
  .mobile-research-menu a{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:80px;padding:15px 0;color:#edf2e9}
  .mobile-research-menu a+a{border-top:1px solid #2d3b31}
  .mobile-research-menu strong{display:block;font-size:15px;font-weight:500}
  .mobile-research-menu small{display:block;color:#9caaa0;font-size:12px;line-height:1.7;margin-top:4px}
  .mobile-research-menu a>span:last-child{font-size:20px;color:#9caaa0}
  .mobile-research-hub>p{font-size:12px;color:#9caaa0;line-height:1.8;margin-top:16px}
  body[data-app-page=home] .watch-panel{margin:10px 0 20px;background:#192321}
  body[data-app-page=home] .watch-top,body[data-app-page=home] .watch-columns{padding-inline:18px}
  body[data-app-page=home] .watch-row{padding-block:16px}
  body[data-app-page=home] .watch-row[aria-pressed=true]{background:#253322}
  body[data-app-page=home] .watch-change{background:transparent;padding:8px 0;font-size:14px}
  body[data-app-page=home] .watch-change.up{color:#58d4ad}body[data-app-page=home] .watch-change.down{color:#f58e9d}
  body[data-app-page=home] .connection-panel,body[data-app-page=home] .history-panel{margin-top:0}
  body[data-app-page=research]>header,body[data-app-page=strategy]>header{display:none}
  body[data-app-page=research]>main>nav[aria-label="研究导航"]{top:64px}
  body[data-app-page=research] section[id],body[data-app-page=research] .factor-pane{scroll-margin-top:calc(var(--research-nav-offset,84px) + 64px)}
  body[data-app-page=strategy]>main{padding-top:18px}
  body[data-app-page=strategy] section{scroll-margin-top:80px}
  #research-workspace{padding:14px 18px 24px}
  #research-workspace-title{font-size:24px;margin:2px 0 14px}
}
@media(min-width:761px){
  body[data-screen=research] .mobile-research-hub{display:block;max-width:580px}
  body[data-screen=research] .mobile-page-heading{display:block;padding:28px 0 14px}
  .mobile-research-menu a{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0;border-bottom:1px solid #2d3b31}
  .mobile-research-menu strong,.mobile-research-menu small{display:block}
  .mobile-research-menu small,.mobile-research-hub>p{color:#9caaa0;font-size:12px}
}

@media(max-width:760px){html,body{width:100%;max-width:100%;overflow-x:clip}main,#research-workspace{box-sizing:border-box;min-width:0;max-width:100%;width:100%}input,select,textarea{box-sizing:border-box;max-width:100%;min-width:0;font-size:16px!important}.market-query label{min-width:0;max-width:100%}.market-query input[type=date]{display:block;width:100%;min-width:0;max-width:100%;padding-inline:8px;-webkit-appearance:none;appearance:none;text-align:left}.market-query input[type=date]::-webkit-date-and-time-value{text-align:left;min-width:0}.market-results{width:100%;max-width:100%;min-width:0;overflow-x:auto;touch-action:pan-x pan-y}.market-results table{width:max-content;min-width:100%}}

@media(max-width:760px){#research-workspace{padding-inline:8px!important;max-width:100%;width:100%;margin-inline:0}.research-content{min-width:0;max-width:100%;width:100%}}

@media(max-width:760px){#research-workspace{padding-inline:0!important}#research-workspace-title,.research-workspace-back{margin-inline:12px}}

@media(max-width:760px){#research-workspace{padding-inline:4px!important}#research-workspace-title,.research-workspace-back{margin-inline:6px}}

@media(max-width:760px){:root{--mobile-edge:4px;--mobile-card-pad:10px;--mobile-card-radius:12px;--mobile-card-border:#29453d}body[data-app-page=home]>main{box-sizing:border-box;width:100%;max-width:100%;margin:0;padding-inline:var(--mobile-edge)!important}.mobile-brandbar{box-sizing:border-box;width:calc(100% - 8px);margin-inline:4px;padding-inline:10px;border:1px solid var(--mobile-card-border);border-radius:12px}nav.mobile-primary-nav{box-sizing:border-box;left:4px;right:4px;width:auto;padding-inline:10px;border:1px solid var(--mobile-card-border);border-radius:12px 12px 0 0}body[data-app-page=home] .mobile-page-heading,body[data-app-page=home] main>.heading,body[data-app-page=home] .mobile-research-hub,body[data-app-page=home] main .panel,body[data-app-page=home] .mobile-trade-tabs{box-sizing:border-box;width:100%;max-width:none;min-width:0;margin-inline:0!important;padding-inline:10px!important;border:1px solid var(--mobile-card-border);border-radius:12px}body[data-app-page=home] .workspace-grid{width:100%;min-width:0;margin-inline:0;padding-inline:0}#research-workspace{padding-inline:0!important;min-width:0;width:100%}#research-workspace-title,.research-workspace-back{margin-inline:0;padding-inline:10px;box-sizing:border-box}#research-workspace-title{border:1px solid var(--mobile-card-border);border-radius:12px;padding-block:10px}body[data-app-page=research]>main,body[data-app-page=strategy]>main{padding-inline:4px!important;box-sizing:border-box;width:100%;max-width:none}}

@media(max-width:760px){.mobile-brandbar,nav.mobile-primary-nav,body[data-app-page=home] .mobile-page-heading,body[data-app-page=home] main>.heading,body[data-app-page=home] .mobile-trade-tabs,#research-workspace-title{border:0;border-radius:0;box-shadow:none}}

@media(max-width:760px){:root{--mobile-edge:0px}body[data-app-page=home]>main,body[data-app-page=research]>main,body[data-app-page=strategy]>main,#research-workspace{padding-inline:0!important;margin-inline:0;width:100%;max-width:100%}.mobile-brandbar,nav.mobile-primary-nav{width:100%;margin-inline:0;left:0;right:0;padding-inline:10px;border:0;border-radius:0}.mobile-brandbar{border-bottom:1px solid #2d3b31}nav.mobile-primary-nav{border-top:1px solid #2d3b31}body[data-app-page=home] main .panel,body[data-app-page=home] .mobile-research-hub{border:0;border-radius:0;box-shadow:none;background:transparent;margin-inline:0!important;padding-inline:10px!important;width:100%;max-width:100%}}

@media(max-width:760px){body[data-app-page=home] main .panel,body[data-app-page=home] .mobile-research-hub{border-radius:12px;box-shadow:inset 0 0 0 1px #29453d}}

@media(max-width:760px){:root{--mobile-edge:12px;--mobile-card-pad:7px}body[data-app-page=home]>main,body[data-app-page=research]>main,body[data-app-page=strategy]>main{padding-inline:var(--mobile-edge)!important;box-sizing:border-box;width:100%;max-width:100%}#research-workspace{padding-inline:0!important;box-sizing:border-box;width:100%}.mobile-brandbar{width:calc(100% - 24px);margin-inline:12px;padding-inline:7px}nav.mobile-primary-nav{left:12px;right:12px;width:auto;padding-inline:7px}body[data-app-page=home] main .panel,body[data-app-page=home] .mobile-research-hub,body[data-app-page=home] .mobile-page-heading,body[data-app-page=home] main>.heading,body[data-app-page=home] .mobile-trade-tabs{padding-inline:7px!important}#research-workspace-title,.research-workspace-back{padding-inline:7px}}
