/* Mobile layout only; desktop layout and recharge state remain unchanged. */
@media (max-width: 960px) {
  .user-page .recharge-workspace {
    align-items: stretch;
    min-width: 0;
  }
  .user-page .recharge-workspace > .workflow-panel,
  .user-page .recharge-workspace .confirmation-panel {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    align-self: stretch;
  }
  .user-page #mobile-submit-dock { display: none !important; }
}

@media (max-width: 640px) {
  .user-page .site-header { position: relative; }
  .user-page .shell { width: calc(100% - 24px); padding: 20px 0 32px; }
  .user-page .hero { margin-bottom: 16px; }
  .user-page .hero h1 { font-size: 23px; line-height: 1.4; }
  .user-page .hero p { font-size: 12px; line-height: 1.6; }

  .user-page .service-hub { padding: 14px !important; margin-bottom: 16px; }
  .user-page .service-hub-heading { margin-bottom: 12px; }
  .user-page .service-hub-heading .eyebrow,
  .user-page .service-hub-heading p { display: none; }
  .user-page .service-hub-heading h2 { margin: 0; font-size: 16px; }
  .user-page .service-hub .service-tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .user-page .service-hub .service-tool,
  .user-page .service-hub .service-tool.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 88px;
    padding: 10px 4px;
    text-align: center;
  }
  .user-page .service-hub .service-tool-icon { width: 32px; height: 32px; border-radius: 10px; }
  .user-page .service-hub .service-tool-icon svg { width: 21px; height: 21px; }
  .user-page .service-hub .service-tool-copy b { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
  .user-page .service-hub .service-tool-copy small,
  .user-page .service-hub .service-tool > i { display: none; }

  .user-page #tool-recharge { padding: 16px 12px; }
  .user-page .service-entry-heading { gap: 8px; margin-bottom: 14px; }
  .user-page .service-entry-heading h2 { font-size: 20px; }
  .user-page #tool-recharge .service-entry-heading p { font-size: 13px; }
  .user-page .service-entry-heading .auto-card-badge { font-size: 11px; padding: 5px 7px; }
  .user-page .auto-card-gateway { padding: 12px; }
  .user-page .auto-card-support { font-size: 11px; }
  .user-page .auto-card-support span:last-child { display: none; }
  .user-page .workflow-panel,
  .user-page .confirmation-panel { padding: 14px 12px; }
  .user-page .workflow-heading { gap: 10px; padding-bottom: 12px; }
  .user-page .workflow-heading h2 { font-size: 17px; }
  .user-page .workflow-heading p { font-size: 12px; line-height: 1.6; }
  .user-page .flow-fields { margin-top: 12px; padding-top: 0; border-top: 0; }
  .user-page .flow-title { padding: 4px 0 10px; gap: 10px; border: 0; background: transparent; box-shadow: none; }
  .user-page .flow-title > div { min-width: 0; }
  .user-page .flow-title b { font-size: 15px; }
  .user-page .flow-title small { font-size: 12px; line-height: 1.6; }
  .user-page .field-section-label b { font-size: 14px; }
  .user-page .field-section-label small { font-size: 12px; }
  /* Gemini has already verified the editable card in the gateway above. */
  .user-page.zihhuang-active #chatgpt-fields > .field-section-label,
  .user-page.zihhuang-active #chatgpt-fields > label[for=card-code],
  .user-page.zihhuang-active #chatgpt-fields > .inline:has(#card-code) { display: none; }
  .user-page label { font-size: 14px; }
  .user-page input:not([type=checkbox]):not([type=radio]),
  .user-page textarea,
  .user-page select,
  .user-page #zihhuang-fields input:not([type=checkbox]),
  .user-page #zihhuang-fields textarea,
  .user-page #zihhuang-fields select,
  .user-page .auto-card-entry input {
    min-width: 0;
    max-width: 100%;
    font-size: 16px;
    line-height: 1.5;
  }
  .user-page #zihhuang-fields textarea { min-height: 150px; }
  .user-page #zh-auto-hint { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
  .user-page .session-shortcut-card { padding: 14px 12px; }
  .user-page .session-shortcut-head { gap: 8px; }
  .user-page .session-shortcut-link { min-height: 44px; }
  .user-page .confirmation-panel .primary { min-height: 48px; }
  /* Keep the real action beside the account review instead of covering fields. */
  .user-page #mobile-submit-dock { display: none !important; }
  .user-page .recharge-workspace,
  .user-page .confirmation-panel,
  .user-page input,
  .user-page textarea { scroll-margin-block: 16px; }
}
