/* Launch readiness overrides 1.7 */
.page-heading,
.workspace {
  width: min(var(--workspace-width), calc(100% - 32px));
  max-width: var(--workspace-width);
}

body[data-page="forum"] .page-heading { display: none; }
body[data-page="forum"] .workspace { padding-top: 16px; }

.modal-card {
  width: min(520px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
}

.wechat-login-benefits {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.wechat-login-benefits span {
  padding: 12px;
  border: 1px solid #dfe5f5;
  border-radius: 6px;
  background: #f7f9ff;
  text-align: left;
}

.wechat-login-benefits b,
.wechat-login-benefits small { display: block; }
.wechat-login-benefits b { color: #131722; font-size: 12px; }
.wechat-login-benefits small { margin-top: 4px; color: #787b86; font-size: 9px; line-height: 1.5; }

@media (max-width: 900px) {
  .page-heading,
  .workspace { width: min(100% - 20px, var(--workspace-width)); }
}

@media (max-width: 700px) {
  :root { --mobile-nav-height: 66px; }

  html { background: #f4f6fa; }
  body {
    padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    background: #f4f6fa;
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
  }

  button,
  input,
  select,
  textarea { touch-action: manipulation; }

  .site-header {
    height: 56px;
    border-bottom-color: #e5e7ec;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: none;
  }

  .header-inner {
    width: 100%;
    height: 56px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .brand { min-width: 0; gap: 9px; }
  .brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 16px;
  }
  .brand-copy strong { font-size: 15px; }
  .brand-copy small,
  .header-search,
  .header-actions .points-chip { display: none; }

  .header-actions { margin-left: auto; gap: 4px; }
  .notification-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
  }
  .notification-button span { display: none; }
  .user-button {
    width: 40px;
    height: 40px;
    padding: 4px;
    justify-content: center;
  }
  .user-button > span { width: 32px; height: 32px; }
  .user-button > div,
  .user-button > i { display: none; }
  .role-menu {
    position: fixed;
    top: 52px;
    right: 10px;
    width: min(230px, calc(100vw - 20px));
    padding: 7px;
    border-radius: 10px;
    box-shadow: 0 14px 38px rgba(19, 23, 34, .18);
  }
  .role-menu button { min-height: 43px; padding: 10px 12px; font-size: 13px; }

  #nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    margin: 0;
    padding: 6px 8px env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    gap: 4px;
    overflow: visible;
    border-top: 1px solid #dfe1e6;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -6px 22px rgba(19, 23, 34, .07);
    backdrop-filter: blur(16px);
    z-index: 90;
  }

  #nav .nav-item {
    min-width: 0;
    min-height: 52px;
    padding: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #6a6d78;
    font-size: 12px;
    font-weight: 600;
  }
  #nav .nav-item:hover { background: transparent; }
  #nav .nav-item.active { color: #2962ff; background: #eef2ff; }
  #nav .nav-item.active::after { display: none; }
  #nav .staff-only,
  #nav .owner-only { display: none !important; }

  .risk-ticker {
    top: 56px;
    height: 30px;
    border-bottom-color: #f0cfd2;
    color: #a1454d;
    background: #fff4f5;
  }
  .risk-track { gap: 30px; font-size: 10px; line-height: 30px; }
  .risk-track span { padding-left: 18px; }

  .main { min-height: calc(100dvh - 86px); }
  .page-heading,
  .workspace { width: calc(100% - 20px); }
  .page-heading {
    min-height: 72px;
    padding: 15px 2px 11px;
    align-items: center;
  }
  .page-heading h1 { font-size: 22px; line-height: 1.25; }
  .page-heading p { max-width: 250px; margin-top: 4px; font-size: 12px; line-height: 1.45; }
  .heading-ask { min-height: 42px; padding: 0 13px; font-size: 13px; }

  body[data-page="home"] .page-heading,
  body[data-page="forum"] .page-heading,
  body[data-page="qmt"] .page-heading,
  body[data-page="ptrade"] .page-heading { display: none; }
  body[data-page="home"] .workspace,
  body[data-page="forum"] .workspace,
  body[data-page="qmt"] .workspace,
  body[data-page="ptrade"] .workspace { padding-top: 10px; }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding-bottom: 18px;
  }
  .content { min-width: 0; }
  .wallet-aside { display: none; }

  .card,
  .forum-head,
  .form-card,
  .draft-panel,
  .profile-center,
  .vip-reserve,
  .topic-detail-page,
  .platform-hero {
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(19, 23, 34, .05);
  }

  .welcome.welcome-premium {
    padding: 22px 18px 19px;
    border-radius: 12px;
  }
  .welcome.welcome-premium .eyebrow { font-size: 11px; }
  .welcome.welcome-premium h2 {
    margin-top: 10px;
    font-size: 26px;
    line-height: 1.22;
    letter-spacing: -.55px;
  }
  .welcome.welcome-premium p { margin-top: 10px; font-size: 13px; line-height: 1.7; }
  .welcome.welcome-premium .welcome-actions {
    width: 100%;
    margin-top: 17px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .welcome.welcome-premium .welcome-actions .button {
    min-width: 0;
    min-height: 46px;
    padding: 0 8px;
    font-size: 13px;
  }
  .hero-trust {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .hero-trust span {
    min-width: 0;
    padding: 7px 4px;
    overflow: hidden;
    font-size: 10px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .software-hub { margin-top: 10px; padding: 13px; }
  .software-hub .home-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .product-card {
    min-height: 116px;
    padding: 14px 9px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    border-radius: 9px;
    text-align: center;
  }
  .product-card-copy > span { font-size: 10px; }
  .product-card-copy h3 { margin-top: 5px; font-size: 14px; line-height: 1.35; }
  .product-card-copy p,
  .product-enter { display: none; }
  .search-large { margin-top: 10px; }
  .search-large input {
    height: 48px;
    padding: 0 103px 0 13px;
    font-size: 15px;
  }
  .search-large .button { top: 4px; right: 4px; height: 40px; padding: 0 12px; font-size: 12px; }

  .guest-limit-tip {
    margin-top: 10px;
    padding: 14px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
  }
  .guest-limit-tip b { font-size: 14px; }
  .guest-limit-tip span { margin-top: 3px; font-size: 12px; line-height: 1.55; }
  .guest-limit-tip .wechat-entry { grid-column: 1 / -1; width: 100%; min-height: 44px; }

  .forum-head,
  .form-card,
  .draft-panel,
  .platform-hero,
  .topic-detail-page { padding: 16px; }
  .forum-head h2,
  .form-card h2 { font-size: 20px; }
  .forum-head p,
  .form-card > p { margin: 6px 0 15px; font-size: 12px; line-height: 1.6; }
  .toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }
  .toolbar input { grid-column: 1 / -1; }
  .toolbar input,
  .toolbar select { width: 100%; height: 46px; font-size: 16px; }
  .toolbar .button { min-height: 46px; font-size: 13px; }

  .forum-tabs {
    margin: 9px 0;
    padding: 4px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    border-radius: 9px;
  }
  .forum-tab,
  .forum-tab.active,
  .forum-tab.qmt.active,
  .forum-tab.ptrade.active,
  .forum-tab.general.active {
    min-width: 0;
    min-height: 50px;
    padding: 6px 3px;
    justify-content: center;
    gap: 5px;
    border-radius: 7px;
  }
  .forum-tab-mark { width: 24px; height: 24px; flex: 0 0 24px; }
  .forum-tab b { font-size: 11px; }
  .forum-tab small { display: none; }

  .topic-list { border-radius: 10px; }
  .topic-row {
    display: block;
    padding: 15px 14px 13px 17px;
  }
  .topic-row::before { top: 15px; bottom: 15px; width: 3px; }
  .topic-tags { gap: 5px; }
  .tag { padding: 4px 6px; font-size: 10px; }
  .platform-tag { height: 24px; }
  .platform-tag strong { font-size: 10px; }
  .topic-row h4 {
    margin: 10px 0 6px;
    display: -webkit-box;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.45;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .topic-summary {
    margin-bottom: 9px;
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.6;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .topic-service-state {
    width: 100%;
    margin-top: 9px;
    padding: 8px 10px;
  }
  .topic-service-state b { font-size: 11px; }
  .topic-service-state small { font-size: 10px; }
  .topic-bottom { margin-top: 9px; padding-top: 9px; font-size: 10px; }
  .reward { font-size: 12px; }

  .platform-hero { align-items: flex-start; }
  .platform-hero h2 { font-size: 22px; }
  .platform-hero p { font-size: 13px; }
  .platform-hero .button { min-height: 44px; flex: 0 0 auto; }
  .qmt-sub-grid { grid-template-columns: 1fr; }
  .qmt-sub-card,
  .big-qmt-card,
  .qmt-data-card { padding: 16px; border-radius: 9px; }
  .qmt-sub-card b { font-size: 15px; }
  .qmt-sub-card p { font-size: 12px; }

  .form-grid { grid-template-columns: 1fr; gap: 15px; }
  .field.full { grid-column: auto; }
  .field label { margin-bottom: 7px; font-size: 13px; }
  .field input,
  .field select,
  .field textarea,
  .form-input { min-height: 48px; font-size: 16px; }
  .field textarea { min-height: 124px; }
  .field-help { font-size: 11px; }
  .ask-form-heading { align-items: stretch; }
  .ask-form-heading p { font-size: 12px; }
  .ask-quality { padding: 12px; }
  .code-toggle { min-height: 54px; }
  .form-actions { gap: 8px; }
  .form-actions .button { min-height: 46px; flex: 1; }

  .profile-center { padding: 15px; align-items: flex-start; }
  .profile-actions { width: 100%; justify-content: flex-start; }
  .profile-actions .button { min-height: 44px; flex: 1; }
  .mine-summary,
  .mine-summary.refined { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mine-summary.refined .summary-card { min-height: 88px; padding: 14px; }
  .transaction-row,
  .consultation-row,
  .account-row,
  .application-row,
  .trash-row { padding: 13px; }
  .service-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-timeline { grid-template-columns: 1fr; }

  .topic-back { min-height: 42px; font-size: 13px; }
  .detail-title { font-size: 23px; line-height: 1.35; }
  .detail-meta { font-size: 11px; line-height: 1.6; }
  .answer-card,
  .answer-review,
  .claim-status,
  .service-timeline,
  .question-actions { padding: 13px; }
  .customer-message-form textarea { min-height: 108px; font-size: 16px; }

  .floating-doc {
    top: auto;
    right: 10px;
    bottom: calc(var(--mobile-nav-height) + 12px + env(safe-area-inset-bottom));
    width: 42px;
    min-height: 42px;
    padding: 6px;
    border-radius: 9px;
    opacity: .94;
    transform: none;
  }
  .floating-doc:hover { transform: none; }
  .floating-doc span { width: 28px; height: 28px; }
  .floating-doc b { display: none; }

  .modal {
    padding: 0;
    align-items: flex-end;
  }
  .modal-card,
  .modal-card:has(.wechat-login-panel) {
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    margin: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px rgba(19, 23, 34, .2);
  }
  .modal-card:has(.wechat-login-panel) .modal-close {
    top: 13px;
    right: 13px;
    width: 36px;
    height: 36px;
  }
  .wechat-login-panel {
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  }
  .wechat-login-brand { padding-right: 38px; }
  .wechat-login-brand > span { width: 38px; height: 38px; }
  .wechat-login-brand b { font-size: 14px; }
  .wechat-login-brand small { font-size: 10px; }
  .qr-kicker { margin-top: 22px; }
  .wechat-login-panel h2 { margin-top: 8px; font-size: 24px; }
  .wechat-login-panel > p { font-size: 13px; line-height: 1.7; }
  .wechat-qr-guide { margin-top: 16px; padding: 11px 5px; }
  .wechat-qr-guide span { font-size: 10px; }
  .wechat-login-benefits { margin-top: 15px; }
  .wechat-login-benefits span { padding: 11px; }
  .wechat-login-benefits b { font-size: 13px; }
  .wechat-login-benefits small { font-size: 10px; }
  .wechat-qr-status { font-size: 11px; }
  .wechat-agreement { margin: 15px 0 12px; min-height: 34px; }
  .agreement-check { font-size: 12px; line-height: 1.65; }
  .agreement-check input { width: 20px; height: 20px; flex: 0 0 20px; }
  .wechat-login-button { min-height: 54px; border-radius: 9px; }
  .wechat-login-button b { font-size: 15px; }
  .wechat-login-button small { font-size: 10px; }
  .account-login-toggle,
  .guest-continue { min-height: 44px; font-size: 13px; }
}

@media (max-width: 370px) {
  .welcome.welcome-premium h2 { font-size: 23px; }
  .welcome.welcome-premium .welcome-actions { grid-template-columns: 1fr; }
  .forum-tab { flex-direction: column; }
  .forum-tab-mark { width: 22px; height: 22px; flex-basis: 22px; }
  .detail-title { font-size: 21px; }
}

/* Pre-launch visual polish 1.8 */
:root {
  --workspace-width: 1320px;
  --launch-surface: #ffffff;
  --launch-canvas: #f5f7fb;
  --launch-line: #e3e6ed;
  --launch-shadow: 0 4px 18px rgba(19, 23, 34, .045);
}

body { background: var(--launch-canvas); }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(41, 98, 255, .22);
  outline-offset: 2px;
}

@media (min-width: 701px) {
  .site-header {
    height: 60px;
    border-bottom-color: var(--launch-line);
    box-shadow: 0 1px 0 rgba(19, 23, 34, .02);
  }

  .header-inner {
    height: 60px;
    padding: 0 20px;
    gap: 14px;
  }

  .brand { min-width: 148px; gap: 10px; }
  .brand-logo { width: 36px; height: 36px; border-radius: 9px; font-size: 17px; }
  .brand-copy strong { font-size: 15px; letter-spacing: -.15px; }
  .brand-copy small { margin-top: 2px; font-size: 10px; }

  .header-search {
    width: clamp(210px, 21vw, 286px);
    height: 36px;
    flex-basis: 286px;
    padding: 0 10px 0 14px;
    border-radius: 8px;
    font-size: 12px;
  }
  .header-search kbd { padding: 3px 7px; font-size: 9px; }

  .nav-item { padding: 0 13px; font-size: 13px; }
  .nav-item.active::after { right: 13px; left: 13px; height: 3px; border-radius: 3px 3px 0 0; }
  .points-chip,
  .notification-button { height: 36px; border-radius: 8px; }
  .user-button { height: 42px; border-radius: 8px; }

  .risk-ticker { top: 60px; height: 30px; }
  .risk-track { font-size: 10.5px; line-height: 30px; }
  .main { min-height: calc(100vh - 90px); }

  .page-heading,
  .workspace { width: min(var(--workspace-width), calc(100% - 40px)); }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 276px;
    gap: 14px;
    padding-bottom: 54px;
  }
  body[data-page="home"] .workspace,
  body[data-page="forum"] .workspace { padding-top: 16px; }
  .wallet-aside { top: 104px; gap: 12px; }

  .card,
  .welcome.welcome-premium,
  .forum-head,
  .form-card,
  .draft-panel,
  .profile-center,
  .vip-reserve,
  .topic-detail-page,
  .platform-hero {
    border-color: var(--launch-line);
    border-radius: 10px;
    box-shadow: var(--launch-shadow);
  }

  .button { height: 38px; padding: 0 16px; border-radius: 8px; font-size: 12px; }

  .welcome.welcome-premium { padding: 34px 36px 31px; }
  .welcome.welcome-premium::before { height: 3px; }
  .hero-kicker { font-size: 11px; }
  .welcome.welcome-premium h2 {
    margin-top: 14px;
    font-size: clamp(34px, 3vw, 42px);
    letter-spacing: -1.2px;
  }
  .welcome.welcome-premium p {
    max-width: 760px;
    margin-top: 13px;
    font-size: 13.5px;
    line-height: 1.72;
  }
  .welcome.welcome-premium .welcome-actions { margin-top: 21px; gap: 9px; }
  .welcome.welcome-premium .welcome-actions .button { height: 40px; padding: 0 18px; }
  .hero-trust { margin-top: 18px; gap: 7px; }
  .hero-trust span { padding: 7px 10px; border-radius: 7px; font-size: 10.5px; }

  .software-hub { margin-top: 14px; padding: 18px; }
  .product-section-head { margin-bottom: 13px; }
  .product-section-head h3 { margin-top: 4px; font-size: 17px; }
  .product-section-head > span { font-size: 10px; }
  .software-hub .home-product-grid { gap: 10px; }
  .product-card {
    min-height: 92px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 13px;
    padding: 14px 15px;
    border-radius: 8px;
  }
  .product-visual { width: 46px; height: 46px; border-radius: 8px; }
  .product-card-copy > span { font-size: 10px; }
  .product-card-copy h3 { margin: 3px 0 4px; font-size: 14px; }
  .product-card-copy p { font-size: 10.5px; line-height: 1.55; }
  .product-enter { padding: 7px 9px; border-radius: 6px; font-size: 10px; }
  .search-large { margin-top: 11px; }
  .search-large input { height: 44px; padding-left: 14px; border-radius: 8px; font-size: 11.5px; }
  .search-large button { top: 3px; right: 3px; height: 38px; }

  .section-head { margin: 21px 3px 10px; }
  .section-head h3 { font-size: 17px; }
  .section-head p { margin-top: 4px; font-size: 10.5px; }
  .section-head button { font-size: 11px; }

  .topic-list { border-radius: 10px; }
  .topic-row {
    grid-template-columns: minmax(0, 1fr) 220px;
    column-gap: 20px;
    padding: 16px 17px 14px 20px;
  }
  .topic-row::before { top: 15px; bottom: 15px; width: 3px; }
  .topic-row h4 { margin: 9px 0 5px; font-size: 15.5px; line-height: 1.42; }
  .topic-summary { font-size: 11.5px; line-height: 1.6; }
  .topic-service-state { margin-top: 8px; padding: 9px 10px; border-radius: 8px; }
  .topic-service-state > span { width: 28px; height: 28px; }
  .topic-service-state b { font-size: 10.5px; }
  .topic-service-state small { margin-top: 2px; font-size: 9px; }
  .topic-bottom { margin-top: 10px; padding-top: 9px; font-size: 10px; }
  .tag { padding: 4px 7px; border-radius: 5px; font-size: 9px; }
  .platform-tag { height: 23px; border-radius: 5px; }
  .platform-tag i { width: 17px; height: 17px; border-radius: 4px; }
  .reward { font-size: 11px; }

  .wallet-card,
  .guest-wallet,
  .aside-list,
  .certification-aside,
  .consultation-aside { padding: 18px; border-radius: 10px; }
  .wallet-label { font-size: 10px; }
  .wallet-balance { font-size: 30px; }
  .wallet-tip,
  .aside-list p,
  .certification-aside > p,
  .consultation-aside > p { font-size: 10.5px; line-height: 1.65; }
  .aside-title,
  .guest-wallet-title { font-size: 14px; }
  .wallet-card .button { margin-top: 15px; }

  .forum-head { padding: 22px; }
  .forum-head h2,
  .form-card h2 { font-size: 20px; }
  .forum-head p,
  .form-card > p { margin: 6px 0 16px; font-size: 11.5px; line-height: 1.65; }
  .toolbar { gap: 8px; }
  .toolbar input,
  .toolbar select { height: 40px; border-radius: 7px; font-size: 11.5px; }
  .forum-tabs { margin: 10px 0; padding: 5px; border-radius: 9px; }
  .forum-tab,
  .forum-tab.active,
  .forum-tab.qmt.active,
  .forum-tab.ptrade.active,
  .forum-tab.general.active { min-height: 48px; padding: 7px 10px; border-radius: 7px; }
  .forum-tab-mark { width: 29px; height: 29px; border-radius: 6px; }
  .forum-tab b { font-size: 11.5px; }
  .forum-tab small { margin-top: 2px; font-size: 9px; }

  .floating-doc {
    top: auto;
    right: 16px;
    bottom: 18px;
    width: 58px;
    min-height: 58px;
    padding: 7px 5px;
    border-radius: 10px;
    transform: none;
  }
  .floating-doc:hover { transform: translateY(-2px); }
  .floating-doc b { font-size: 9px; }
}

@media (max-width: 700px) {
  body { background: var(--launch-canvas); }
  .page-heading,
  .workspace { width: calc(100% - 16px); }
  .workspace { gap: 11px; }

  .risk-ticker { height: 31px; }
  .risk-track { font-size: 9.5px; line-height: 31px; }

  .welcome.welcome-premium { padding: 20px 16px 17px; border-radius: 12px; }
  .welcome.welcome-premium h2 {
    margin-top: 9px;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: -.5px;
    text-wrap: balance;
  }
  .welcome.welcome-premium p { margin-top: 9px; font-size: 12.5px; line-height: 1.65; }
  .welcome.welcome-premium .welcome-actions { margin-top: 15px; }
  .hero-trust { margin-top: 13px; }
  .hero-trust span {
    min-height: 42px;
    padding: 7px 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 7px;
    font-size: 9px;
    line-height: 1.35;
    text-overflow: clip;
    white-space: normal;
  }
  .hero-trust b { display: block; margin-bottom: 2px; font-size: 10.5px; }

  .software-hub { margin-top: 11px; padding: 14px; border-radius: 12px; }
  .product-section-head { margin-bottom: 10px; }
  .product-section-head h3 { font-size: 16px; }
  .product-card { min-height: 112px; padding: 13px 8px; border-radius: 10px; }
  .product-card-copy h3 { font-size: 14.5px; }
  .search-large { margin-top: 10px; }
  .search-large input { height: 46px; font-size: 14px; }
  .search-large .button { height: 38px; border-radius: 7px; }

  .section-head { margin: 18px 1px 9px; }
  .section-head h3 { font-size: 17px; }
  .section-head p { font-size: 10px; line-height: 1.45; }
  .section-head button { font-size: 11px; }

  .forum-head { padding: 16px 14px; border-radius: 12px; }
  .forum-head h2 { font-size: 21px; }
  .forum-head p { margin: 5px 0 13px; font-size: 12px; line-height: 1.6; }
  .toolbar { gap: 7px; }
  .toolbar input,
  .toolbar select { height: 44px; font-size: 15px; border-radius: 8px; }
  .toolbar .button { min-height: 44px; border-radius: 8px; }
  .forum-tabs { margin: 9px 0; border-radius: 11px; }
  .forum-tab,
  .forum-tab.active,
  .forum-tab.qmt.active,
  .forum-tab.ptrade.active,
  .forum-tab.general.active { min-height: 48px; border-radius: 8px; }

  .topic-list { border-radius: 12px; }
  .topic-row { padding: 14px 13px 12px 17px; }
  .topic-row::before { top: 14px; bottom: 14px; }
  .topic-row h4 { margin: 9px 0 5px; font-size: 15.5px; line-height: 1.42; }
  .topic-summary { margin-bottom: 6px; font-size: 11.5px; line-height: 1.55; }
  .topic-service-state {
    width: auto;
    margin: 8px 0 0;
    padding: 0;
    display: inline-flex;
    border: 0;
    background: transparent;
  }
  .topic-service-state > span { width: 24px; height: 24px; }
  .topic-service-state b { font-size: 10.5px; }
  .topic-service-state small { display: none; }
  .topic-bottom { margin-top: 8px; padding-top: 8px; }

  .auth-gate {
    padding: 30px 18px;
    border-radius: 12px;
    background: #fff;
  }
  .auth-gate-icon { width: 58px; height: 58px; border-radius: 16px; box-shadow: none; }
  .auth-gate-kicker { margin-bottom: 9px; font-size: 10px; }
  .auth-gate h2 { max-width: 280px; margin: 0 auto; font-size: 24px; line-height: 1.35; }
  .auth-gate p { margin: 10px auto 18px; font-size: 12.5px; line-height: 1.65; }
  .auth-gate-actions { margin-top: 18px; gap: 8px; }
  .auth-gate-actions .button { min-height: 44px; }

  .floating-doc {
    right: -1px;
    bottom: calc(var(--mobile-nav-height) + 10px + env(safe-area-inset-bottom));
    width: 38px;
    min-height: 42px;
    padding: 5px;
    border-radius: 10px 0 0 10px;
    box-shadow: 0 5px 16px rgba(19, 23, 34, .12);
  }
  .floating-doc span { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .risk-track { animation: none !important; transform: none !important; }
}

/* Mobile visual refinement 1.9 */
.mobile-only,
.mobile-version,
.mobile-home-profile,
.mobile-discovery-nav,
.mobile-product-name,
.mobile-hero-actions { display: none; }

@media (max-width: 700px) {
  body { background: #f3f6fb; }
  body[data-page="home"],
  body[data-page="qmt"],
  body[data-page="ptrade"] { padding-bottom: 18px; }
  body[data-page="home"] #nav,
  body[data-page="qmt"] #nav,
  body[data-page="ptrade"] #nav { display: none; }

  .desktop-only { display: none !important; }
  .mobile-only { display: inline; }

  .site-header,
  .header-inner { height: 58px; }
  .header-inner { position: relative; justify-content: center; padding: 0 12px; }
  .brand {
    position: absolute;
    left: 50%;
    gap: 0;
    transform: translateX(-50%);
  }
  .brand-logo { display: none; }
  .brand-copy strong { font-size: 16px; letter-spacing: -.2px; white-space: nowrap; }
  .header-actions { position: absolute; right: 11px; margin-left: 0; }

  .risk-ticker {
    position: relative;
    top: auto;
    width: calc(100% - 16px);
    height: auto;
    min-height: 62px;
    margin: 9px auto 0;
    padding: 10px 12px;
    align-items: flex-start;
    border: 1px solid #efc7ca;
    border-radius: 11px;
    color: #bd6268;
    background: #fff5f5;
    box-shadow: none;
  }
  .risk-track {
    min-width: 0;
    animation: none;
    white-space: normal;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.65;
  }
  .risk-track span { padding: 0; }
  .risk-track span:not(:first-child) { display: none; }

  .main { min-height: auto; }
  body[data-page="home"] .workspace,
  body[data-page="qmt"] .workspace,
  body[data-page="ptrade"] .workspace { padding-top: 10px; }
  .workspace { width: calc(100% - 16px); }

  .welcome.welcome-premium {
    padding: 18px 16px 17px;
    border-color: #d9e7fa;
    border-radius: 13px;
    background: #edf5ff;
    box-shadow: none;
  }
  .welcome.welcome-premium::before,
  .welcome.welcome-premium::after { display: none; }
  .welcome-copy { width: 100%; }
  .hero-kicker {
    padding: 0;
    color: #2962ff;
    background: transparent;
    font-size: 11.5px;
    font-weight: 800;
  }
  .hero-kicker i { display: none; }
  .mobile-version {
    position: absolute;
    top: 18px;
    right: 16px;
    padding: 4px 9px;
    display: inline-flex;
    border-radius: 999px;
    color: #2962ff;
    background: rgba(255, 255, 255, .86);
    font-size: 10px;
    font-weight: 800;
  }
  .welcome.welcome-premium h2 {
    margin-top: 9px;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: -.55px;
  }
  .mobile-hero-summary {
    margin-top: 5px !important;
    display: block !important;
    color: #738198 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
  }
  .desktop-hero-actions { display: none !important; }
  .mobile-hero-actions {
    width: 100%;
    margin-top: 14px !important;
    display: grid !important;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.45fr) !important;
    gap: 10px !important;
  }
  .mobile-hero-actions .button {
    min-height: 44px !important;
    border: 0;
    border-radius: 9px;
    color: #fff;
    font-size: 13.5px !important;
    font-weight: 750;
  }
  .mobile-service-button {
    background: #c85f68;
    box-shadow: 0 5px 12px rgba(200, 95, 104, .13);
  }
  .hero-trust { display: none; }

  .mobile-home-profile {
    min-height: 110px;
    margin-top: 10px;
    padding: 13px;
    display: grid;
    grid-template-columns: minmax(118px, .85fr) minmax(0, 1.65fr);
    gap: 13px;
    align-items: center;
    border-color: #e7ebf2;
    border-radius: 13px;
    box-shadow: none;
  }
  .mobile-profile-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .mobile-profile-avatar {
    width: 49px;
    height: 49px;
    flex: 0 0 49px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 3px solid #e3efff;
    border-radius: 14px;
    color: #fff;
    background: #2e3c57;
    font-size: 14px;
    font-weight: 800;
  }
  .mobile-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .mobile-profile-identity strong,
  .mobile-profile-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-profile-identity strong { color: #172033; font-size: 15px; }
  .mobile-profile-identity small { max-width: 105px; margin-top: 4px; color: #8792a5; font-size: 10px; }
  .mobile-profile-level { min-width: 0; padding-left: 13px; border-left: 1px solid #e7ebf2; }
  .mobile-level-heading { display: flex; align-items: baseline; gap: 5px; }
  .mobile-level-heading b { color: #2962ff; font-size: 17px; }
  .mobile-level-heading strong { color: #34405a; font-size: 12px; }
  .mobile-level-heading button { margin-left: auto; color: #2962ff; font-size: 10px; font-weight: 700; }
  .mobile-level-stats {
    margin-top: 9px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mobile-level-stats span { text-align: center; border-right: 1px solid #edf0f5; }
  .mobile-level-stats span:last-child { border-right: 0; }
  .mobile-level-stats b,
  .mobile-level-stats small { display: block; }
  .mobile-level-stats b { color: #26334c; font-size: 11px; }
  .mobile-level-stats small { margin-top: 2px; color: #9aa4b4; font-size: 8.5px; }
  .mobile-level-progress { height: 4px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: #e8edf5; }
  .mobile-level-progress i { height: 100%; display: block; border-radius: inherit; background: #2962ff; }

  .mobile-discovery-nav {
    margin-top: 10px;
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    border: 1px solid #e6eaf1;
    border-radius: 12px;
    background: #f9fbff;
  }
  .mobile-discovery-item {
    min-width: 0;
    min-height: 45px;
    padding: 0 4px;
    border: 0;
    border-radius: 9px;
    color: #68758b;
    background: transparent;
    font-size: 12.5px;
    font-weight: 700;
  }
  .mobile-discovery-item.active { color: #2962ff; background: #fff; box-shadow: 0 4px 12px rgba(44, 62, 94, .06); }

  .software-hub {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .software-hub .product-section-head,
  .software-hub .search-large { display: none; }
  .software-hub .home-product-grid { gap: 10px; }
  .software-hub .product-card {
    min-height: 152px;
    padding: 20px 10px 17px;
    gap: 13px;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(28, 45, 78, .035);
  }
  .software-hub .qmt-product { border-left: 3px solid #2962ff; }
  .software-hub .ptrade-product { border-left: 3px solid #f28b22; }
  .software-hub .product-card-copy { display: none; }
  .mobile-product-name { display: block; color: #172033; font-size: 20px; letter-spacing: -.3px; }
  .product-visual { width: 49px; height: 49px; border-radius: 13px; }

  .home-question-head { margin: 17px 2px 9px; }
  .home-question-head h3 { font-size: 18px; }
  .home-question-head p { display: none; }
  .home-question-head button { color: #2962ff; font-size: 12px; font-weight: 750; }
  body[data-page="home"] .topic-list {
    display: grid;
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  body[data-page="home"] .topic-row {
    padding: 15px 14px 13px 16px;
    border: 1px solid #e7ebf2;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(28, 45, 78, .035);
  }
  body[data-page="home"] .topic-row::before { top: 15px; bottom: 15px; left: 0; }
  body[data-page="home"] .topic-row + .topic-row { border-top: 1px solid #e7ebf2; }
  body[data-page="home"] .topic-row h4 { margin: 11px 0 6px; font-size: 16px; line-height: 1.45; }
  body[data-page="home"] .topic-summary { color: #7c889c; font-size: 12px; line-height: 1.6; }
  body[data-page="home"] .topic-service-state { display: none; }
  body[data-page="home"] .topic-bottom { color: #a0a8b6; border-top: 0; }
  body[data-page="home"] .reward { color: #2962ff; }

  .platform-hero {
    padding: 18px 16px;
    border-color: #dce8fa;
    border-radius: 13px;
    background: #edf5ff;
    box-shadow: none;
  }
  .platform-hero.ptrade { border-color: #f5dfca; background: #fff8ef; }
  .platform-hero h2 { margin-top: 6px; font-size: 21px; }
  .platform-hero p { margin-top: 6px; font-size: 12px; line-height: 1.6; }
  .platform-hero .button { min-height: 42px; border-radius: 9px; }
  body[data-page="qmt"] .guest-limit-tip,
  body[data-page="ptrade"] .guest-limit-tip {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    padding: 14px;
    border-radius: 12px;
    background: #fff;
  }
  body[data-page="qmt"] .guest-limit-tip .wechat-entry,
  body[data-page="ptrade"] .guest-limit-tip .wechat-entry {
    grid-column: 1 / -1;
    min-height: 42px;
    border-radius: 9px;
  }
  .qmt-sub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .qmt-sub-card,
  .big-qmt-card,
  .qmt-data-card { min-height: 112px; padding: 14px; border-radius: 12px; }
  .qmt-sub-card b { font-size: 14px; }
  .qmt-sub-card p { margin-top: 6px; font-size: 10.5px; line-height: 1.55; }

  .floating-doc {
    top: 62%;
    right: 0;
    bottom: auto;
    width: 68px;
    min-height: 84px;
    padding: 8px 5px;
    border-radius: 12px 0 0 12px;
    transform: translateY(-50%);
    box-shadow: 0 8px 22px rgba(38, 55, 88, .14);
  }
  .floating-doc:hover { transform: translateY(-50%); }
  .floating-doc span { width: 36px; height: 36px; border-radius: 10px; font-size: 17px; }
  .floating-doc b { margin-top: 5px; display: block; font-size: 10px; }
  body[data-page="home"] .floating-doc { top: clamp(540px, 76%, 640px); }
  body[data-page="qmt"] .floating-doc,
  body[data-page="ptrade"] .floating-doc { top: clamp(360px, 52%, 470px); }
}

@media (max-width: 410px) {
  .welcome.welcome-premium h2 { font-size: 22px; }
  .platform-hero { gap: 8px; }
  .platform-hero h2 { font-size: 19px; line-height: 1.28; }
  .platform-hero .button { padding: 0 12px; font-size: 12px; }
  .mobile-home-profile { grid-template-columns: 118px minmax(0, 1fr); gap: 9px; padding: 12px 10px; }
  .mobile-profile-avatar { width: 44px; height: 44px; flex-basis: 44px; }
  .mobile-profile-identity { gap: 7px; }
  .mobile-profile-identity strong { font-size: 13px; }
  .mobile-profile-identity small { max-width: 73px; font-size: 8.5px; }
  .mobile-profile-level { padding-left: 9px; }
  .mobile-level-heading b { font-size: 15px; }
  .mobile-level-heading strong { font-size: 10px; }
  .mobile-level-heading button { font-size: 9px; }
  .mobile-level-stats b { font-size: 10px; }
  .mobile-level-stats small { font-size: 8px; }
  .mobile-discovery-item { font-size: 11.5px; }
  .software-hub .product-card { min-height: 138px; }
  .mobile-product-name { font-size: 18px; }
}

/* Simplified WeChat login */
.modal-card:has(.simple-login-panel) {
  width: min(420px, calc(100vw - 28px));
  border-radius: 16px;
}

.simple-login-panel { padding: 30px 32px 27px; }

.simple-login-panel .wechat-login-brand {
  padding: 0;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  text-align: center;
}

.simple-login-panel .wechat-login-brand > span {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  font-size: 20px;
}

.simple-login-panel .wechat-login-brand b { font-size: 16px; }
.simple-login-panel .wechat-login-brand small { display: none; }
.simple-login-panel .qr-kicker { margin-top: 18px; }
.simple-login-panel h2 { margin: 8px 0 7px; font-size: 23px; letter-spacing: -.35px; }
.simple-login-panel > p { max-width: 300px; font-size: 12px; line-height: 1.65; }
.simple-login-panel .wechat-login-message { margin-top: 14px; }

.simple-login-panel .wechat-agreement {
  margin: 22px 0 13px;
  padding: 11px 12px;
  border-radius: 9px;
  background: #f7f8fb;
}

.simple-login-panel .wechat-login-button {
  min-height: 50px;
  border-radius: 10px;
  background: #2962ff;
  box-shadow: none;
}

.simple-login-panel .wechat-login-button:hover {
  background: #1f55ed;
  box-shadow: none;
  transform: none;
}

.simple-login-panel .wechat-login-button b { font-size: 14px; }
.simple-login-panel .wechat-login-button small { font-size: 9px; }

.simple-login-panel .wechat-qr-status {
  margin: 12px 0 0;
  padding: 0;
  color: #8a93a3;
  background: transparent;
  font-size: 9px;
  line-height: 1.55;
}

.simple-login-panel .wechat-qr-status.active,
.simple-login-panel .wechat-qr-status.warning { background: transparent; }

.simple-login-secondary {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #c0c5ce;
}

.simple-login-secondary .account-login-toggle,
.simple-login-secondary .guest-continue {
  width: auto;
  height: auto;
  min-height: 30px;
  margin: 0;
  padding: 4px 2px;
  border-radius: 0;
  color: #6b7485;
  background: transparent;
  font-size: 11px;
}

.simple-login-secondary .account-login-toggle:hover,
.simple-login-secondary .guest-continue:hover {
  color: #2962ff;
  background: transparent;
}

@media (max-width: 760px) {
  .modal-card:has(.simple-login-panel) {
    width: 100%;
    border-radius: 18px 18px 0 0;
  }

  .simple-login-panel {
    padding: 25px 22px calc(22px + env(safe-area-inset-bottom));
  }

  .simple-login-panel .wechat-login-brand { padding: 0; }
  .simple-login-panel .wechat-login-brand > span { width: 50px; height: 50px; }
  .simple-login-panel .qr-kicker { margin-top: 16px; }
  .simple-login-panel h2 { margin-top: 7px; font-size: 22px; }
  .simple-login-panel > p { font-size: 12px; line-height: 1.6; }
  .simple-login-panel .wechat-agreement { margin-top: 19px; font-size: 11px; }
  .simple-login-panel .wechat-login-button { min-height: 50px; }
}
