/* v337 — keep cold-start work frame-friendly and make desktop a real mobile shell. */
body[data-mobile-runtime-release="337"][data-quest-priority="action"][data-quest-mission="analyst"]
  .buy-btn[data-type="analyst"][data-id="intern"].quest-focus {
  position: relative;
  z-index: 90;
  outline: 4px solid #ffc42d !important;
  outline-offset: 3px !important;
  box-shadow:
    0 0 0 4px rgb(255 196 45 / 28%),
    0 0 24px rgb(255 196 45 / 62%) !important;
}

body[data-mobile-runtime-release="337"][data-quest-mission="analyst"]
  .analyst-row:has(.buy-btn[data-id="intern"].quest-focus) {
  overflow: visible !important;
}

@media (min-width: 700px) {
  html { background: #e5e8eb; }

  body[data-mobile-runtime-release="337"] {
    width: 390px;
    max-width: 390px;
    min-height: min(844px, 100dvh);
    height: min(844px, 100dvh);
  }

  body[data-mobile-runtime-release="337"] :is(#app, #topbar, #main-screen) {
    width: 390px !important;
    max-width: 390px !important;
  }

  body[data-mobile-runtime-release="337"] #topbar { display: block !important; }
  body[data-mobile-runtime-release="337"] .asset-glance { margin-left: 10px !important; }

  body[data-mobile-runtime-release="337"] #avatar-scene {
    box-sizing: border-box;
    width: 390px !important;
    height: min(427px, max(260px, calc(100dvh - 416px))) !important;
    margin: 0 !important;
    padding: 18px 12px 8px !important;
  }

  body[data-mobile-runtime-release="337"] #main-screen {
    min-height: 0 !important;
    padding: 0 0 max(8px, env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
  }

  body[data-mobile-runtime-release="337"] #panel-home { gap: 6px !important; }

  body[data-mobile-runtime-release="337"] #action-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 8px 8px 0 !important;
  }

  body[data-mobile-runtime-release="337"] #panel-home #action-buttons button,
  body[data-mobile-runtime-release="337"] #panel-home #action-buttons button.action-primary {
    min-height: 75px !important;
    height: 75px !important;
    padding: 5px 2px !important;
  }

  body[data-mobile-runtime-release="337"] #home-feature-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: auto !important;
    margin: 0 8px !important;
    padding: 0 !important;
  }

  body[data-mobile-runtime-release="337"] #home-feature-nav .home-feature-btn {
    grid-template-rows: 26px 16px !important;
    min-height: 52px !important;
    height: 52px !important;
    padding: 5px 2px !important;
  }

  body[data-mobile-runtime-release="337"] #home-feature-nav .home-feature-btn .nav-icon {
    width: 32px !important;
    height: 32px !important;
  }

  body[data-mobile-runtime-release="337"] #home-feature-nav .home-feature-btn .nav-label {
    font-size: 14px !important;
    line-height: 17px !important;
  }

  body[data-mobile-runtime-release="337"] :is(.modal:not(#splash), .feature-panel-backdrop) {
    top: 0 !important;
    bottom: auto !important;
    width: 390px !important;
    max-width: 390px !important;
    height: min(844px, 100dvh) !important;
  }

  body[data-mobile-runtime-release="337"] .feature-panel-backdrop { padding-top: 76px !important; }

  body[data-mobile-runtime-release="337"] .feature-panel-shell {
    width: 390px !important;
    max-width: 390px !important;
    height: calc(100dvh - 76px) !important;
    max-height: 768px !important;
    grid-template-rows: 56px 52px minmax(0, 1fr) !important;
  }

  body[data-mobile-runtime-release="337"] .feature-panel-shell:has(.starter-mini-coach:not(.hidden)) {
    grid-template-rows: 56px 52px 84px minmax(0, 1fr) !important;
  }

  body[data-mobile-runtime-release="337"] .feature-panel-nav {
    position: relative;
    z-index: 4;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 4px 8px !important;
    border-bottom: 1px solid #e5e8eb !important;
    background: #f2f4f6 !important;
  }

  body[data-mobile-runtime-release="337"] .feature-panel-nav .feature-switch-btn {
    display: inline-flex !important;
    min-width: 0 !important;
    min-height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1px !important;
    padding: 0 7px !important;
    border: 0 !important;
    border-radius: 8px !important;
    color: #6b7684 !important;
    background: #fff !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  body[data-mobile-runtime-release="337"] .feature-panel-nav .feature-switch-btn.active {
    color: #3182f6 !important;
    background: #edf5ff !important;
  }

  body[data-mobile-runtime-release="337"] .feature-panel-nav .feature-switch-btn .nav-icon {
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    color: currentcolor !important;
    background-color: currentcolor !important;
  }

  body[data-mobile-runtime-release="337"] #feature-panel-scroll { padding: 12px 20px 28px !important; }

  body[data-mobile-runtime-release="337"][data-first-buy-density-release="325"]
    #first-buy-modal .tutorial-scene-shell {
    --first-buy-actor-bottom: clamp(14px, calc(5px + 2.7vw), 24px);
  }

  body[data-mobile-runtime-release="337"][data-first-buy-density-release="325"]
    #first-buy-modal .tutorial-ant-speech[data-speech-layout="centered-safe"] {
    top: var(--tutorial-speech-top, 8px) !important;
  }

  body[data-mobile-runtime-release="337"][data-first-buy-density-release="325"]
    #first-buy-modal .story-image-actor {
    left: 36.5% !important;
    width: 27% !important;
  }

  body[data-mobile-runtime-release="337"] #stock-list {
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  body[data-mobile-runtime-release="337"] #stock-list .stock-card {
    width: 100% !important;
    min-width: 0 !important;
  }

  body[data-mobile-runtime-release="337"] #stock-list .stock-card-head {
    --stock-card-min-h: 76px;
    --stock-pad-block: 11px;
    --stock-pad-inline: 7.6px;
    --stock-logo-w: 72px;
    --stock-content-h: 48px;
    --stock-price-w: 95.6px;
    --stock-gap: 5.6px;
    --stock-title-h: 20px;
    --stock-sub-h: 13px;
    --stock-meta-h: 15px;
    --stock-name-size: 13.06px;
    --stock-sub-size: 10.8px;
    --stock-price-size: 16.5px;
    --stock-change-size: 13.5px;
    grid-template-columns: var(--stock-logo-w) minmax(0, 1fr) var(--stock-price-w) 10px !important;
    padding: var(--stock-pad-block) var(--stock-pad-inline) !important;
  }

  body[data-mobile-runtime-release="337"] #stock-list .stock-card :is(.stock-logo, .stock-logo.is-expanded) {
    width: var(--stock-logo-w) !important;
    height: auto !important;
    aspect-ratio: 3 / 2 !important;
  }

  body[data-mobile-runtime-release="337"] #stock-list .stock-price-block { min-width: 0 !important; }

  body[data-mobile-runtime-release="337"] #stock-list .sparkline-wrap {
    height: clamp(126px, 19dvh, 154px) !important;
    min-height: clamp(126px, 19dvh, 154px) !important;
  }
}
