/* Resource page only. The early page gate requires a phone-sized coarse pointer
   screen; desktop-view.js keeps its original parser/defer path on desktop. */
@media (max-width: 1024px) and (pointer: coarse) {
  html.resource-mobile { text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
  html.resource-mobile,
  html.resource-mobile body.resource-page { overflow-x: visible; }
  html.resource-mobile .resource-page::before { content: none; }
  html.resource-mobile .resource-shell {
    width: auto;
    max-width: none;
    margin-left: max(16px, env(safe-area-inset-left));
    margin-right: max(16px, env(safe-area-inset-right));
  }
  html.resource-mobile .resource-page .site-header {
    position: sticky; top: 0; z-index: 50; display: block;
    padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
    background: var(--resource-paper); border-bottom: 1px solid var(--resource-line);
  }
  html.resource-mobile .site-header .navigation {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: nowrap; gap: 3px; width: 100%; min-height: 44px;
  }
  html.resource-mobile .site-header :is(.wordmark, .nav-links, .language-switch, .nav-download) {
    position: static; inset: auto; mix-blend-mode: normal;
  }
  html.resource-mobile .site-header .wordmark {
    display: block; width: max-content; margin: 0 auto; font-size: 23px; line-height: 36px; color: #090909;
  }
  html.resource-mobile .site-header .language-switch {
    display: contents; color: var(--resource-ink);
  }
  html.resource-mobile .site-header .language-switch button { min-width: 26px; }
  html.resource-mobile .site-header .language-switch button[aria-pressed="true"] { color: var(--resource-ink); }
  html.resource-mobile .site-header .nav-download {
    min-width: 32px;
  }
  html.resource-mobile .site-header .nav-links {
    display: contents;
    min-width: 0; min-height: 0; color: var(--resource-ink);
  }
  html.resource-mobile .site-header .navigation .nav-links a,
  html.resource-mobile .site-header .navigation .language-switch button,
  html.resource-mobile .site-header .navigation > :is(button, .resource-mobile-register) {
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto; min-height: 44px; padding: 0;
    border: 0; border-radius: 0; color: var(--resource-ink); background: transparent;
    white-space: nowrap; text-align: center; font: 650 14px/1.2 var(--sans); letter-spacing: 0; text-shadow: none;
  }
  html.resource-mobile[lang="en"] .site-header .navigation :is(a, button) { font-size: 13px; }
  html.resource-mobile .site-header .navigation .resource-mobile-register { min-width: 32px; }
  html.resource-mobile .site-header [aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
  html.resource-mobile .resource-page section[id],
  html.resource-mobile .resource-page section#download { scroll-margin-top: calc(var(--resource-mobile-header-height, 94px) + 16px); }
  html.resource-mobile .resource-plans { padding-top: 24px; }
  html.resource-mobile .resource-page .resource-section-heading h1 { font-size: 36px; overflow-wrap: break-word; }
  html.resource-mobile .resource-plans-heading { gap: 18px; }
  html.resource-mobile .resource-account-actions { flex-wrap: wrap; gap: 12px 20px; max-width: 100%; }
  html.resource-mobile .resource-account-actions a { min-height: 44px; display: inline-flex; align-items: center; font-size: 16px; }
  html.resource-mobile .resource-plans-lead { font-size: 15px; line-height: 1.7; margin: 18px 0 22px; }
  html.resource-mobile .resource-micro { font-size: 11px; }
  html.resource-mobile .resource-plan-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  html.resource-mobile .resource-plan { min-width: 0; padding: 0; }
  html.resource-mobile .resource-plan + .resource-plan { padding-top: 24px; border-top: 1px solid var(--resource-line); }
  html.resource-mobile .resource-plan h3 { font-size: 32px; margin-top: 12px; }
  html.resource-mobile .plan-status { font-size: 14px; line-height: 1.5; letter-spacing: .025em; }
  html.resource-mobile .resource-plan ul { padding-left: 20px; margin-bottom: 0; font-size: 15px; line-height: 1.8; }
  html.resource-mobile .resource-plan li { margin-bottom: 12px; overflow-wrap: break-word; }
  html.resource-mobile .resource-plan-footer { flex-direction: column; align-items: stretch; gap: 24px; margin-top: 32px; }
  html.resource-mobile .resource-plan-footer .resource-plans-note { margin: 0; font-size: 13px; line-height: 1.75; }
  html.resource-mobile .resource-development { flex-wrap: wrap; max-width: 100%; gap: 12px; }
  html.resource-mobile .resource-page .resource-contact-button { width: 100%; min-width: 0; min-height: 48px; }
  html.resource-mobile .resource-download-shell { width: auto; margin-inline: 16px; }
  html.resource-mobile .resource-connectors { padding-top: 64px; padding-bottom: 64px; }
  html.resource-mobile .resource-connectors-heading { display: block; margin-bottom: 28px; }
  html.resource-mobile .resource-connectors-heading h2 { font-size: 26px; }
  html.resource-mobile .resource-connectors-heading p { max-width: none; margin-top: 16px; }
  html.resource-mobile .resource-connector-links { grid-template-columns: minmax(0, 1fr); }
  html.resource-mobile .resource-connector-link { min-width: 0; min-height: 0; padding: 20px; gap: 16px; }
  html.resource-mobile .resource-connector-link:first-child { grid-column: auto; }
  html.resource-mobile .resource-connector-identity { gap: 12px; }
  html.resource-mobile .resource-connector-link strong { min-width: 0; font-size: 22px; overflow-wrap: break-word; }
  html.resource-mobile .resource-signoff > div { flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; }
  html.resource-mobile .resource-language button { font-size: 14px; min-width: 36px; min-height: 40px; }
  html.resource-mobile .resource-footer-column :is(a, button) { font-size: 14px; min-height: 36px; padding-block: 6px; }
  html.resource-mobile .resource-footer-brand p { font-size: 13px; }
  html.resource-mobile .resource-footer-bottom { flex-wrap: wrap; font-size: 12px; gap: 12px; }
  html.resource-mobile .resource-contact-dialog {
    width: calc(100% - 32px); max-width: calc(100% - 32px);
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
    padding: 32px 20px 24px; border-radius: 22px;
  }
  html.resource-mobile .resource-contact-dialog h2 { font-size: 24px; line-height: 1.45; }
  html.resource-mobile .resource-contact-dialog p { font-size: 15px; line-height: 1.7; }
  html.resource-mobile #contact-wechat-id { user-select: text; -webkit-user-select: text; overflow-wrap: anywhere; }
  html.resource-mobile #contact-copy { max-width: 100%; min-height: 44px; padding: 10px 16px; font-size: 15px; }
  html.resource-mobile #contact-copy-status { min-height: 1.7em; margin-bottom: 0; font-size: 14px; }
  @media (max-width: 360px) {
    html.resource-mobile .resource-page .site-header { padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
    html.resource-mobile .site-header .navigation { gap: 2.5px; }
    html.resource-mobile .site-header .navigation :is(a, button) { font-size: 13px; }
    html.resource-mobile[lang="en"] .resource-page .site-header { padding-left: max(6px, env(safe-area-inset-left)); padding-right: max(6px, env(safe-area-inset-right)); }
    html.resource-mobile[lang="en"] .site-header .navigation :is(a, button) { font-size: 12px; }
    html.resource-mobile[lang="en"] .site-header .navigation .language-switch button { min-width: 18px; }
    html.resource-mobile[lang="en"] .site-header .navigation .nav-download { min-width: 20px; }
    html.resource-mobile[lang="en"] .site-header .navigation .resource-mobile-register { min-width: 26px; }
  }
}
