
/* ── Header（移动端）模块：移动头部、抽屉、语言/用户底部弹层、下载提示 ── */
@media (max-width: 1024px), (hover: none) {
  .mobile-header {
    box-sizing: border-box;
    position: fixed;
    z-index: 1030;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 16px 21px 16px 20px;
    background: #fff;
    color: #101828;
  }

  .mobile-header-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0 8.81px;
    color: inherit;
    text-decoration: none;
  }

  .mobile-header-logo img {
    display: block;
    width: 75.4px;
    height: 32px;
    object-fit: contain;
  }

  .mobile-header-actions,
  .mobile-menu-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    min-width: 0;
  }

  .mobile-header-actions {
    flex: 1 0 0;
  }

  .mobile-header-login,
  .mobile-header-user-avatar,
  .mobile-header-menu-btn,
  .mobile-menu-close-btn,
  .mobile-menu-item,
  .mobile-menu-download-btn,
  .mobile-language-option,
  .mobile-language-cancel,
  .mobile-download-copy-btn {
    box-sizing: border-box;
    margin: 0;
    border: 0;
    font: inherit;
    cursor: pointer;
  }

  .mobile-header-login {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 0;
    background: transparent;
    color: #101828;
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    white-space: nowrap;
  }

  .mobile-header-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: -6px;
    padding: 6px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #101828;
  }

  .mobile-header-user-avatar img,
  .mobile-header-user-avatar-fallback {
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
  }

  .mobile-header-user-avatar img {
    object-fit: cover;
  }

  .mobile-header-user-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #734e2b;
    color: #fff;
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
  }

  .mobile-header-menu-btn,
  .mobile-menu-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: -10px;
    padding: 10px;
    background: transparent;
    color: #101828;
  }

  .mobile-header-menu-btn svg,
  .mobile-menu-close-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
  }

  .mobile-menu-backdrop,
  .mobile-language-backdrop,
  .mobile-user-backdrop,
  .mobile-download-backdrop {
    position: fixed;
    z-index: 1040;
    inset: 0;
    display: block;
    visibility: hidden;
    background: rgba(16, 24, 40, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .mobile-menu-backdrop.is-open,
  .mobile-language-backdrop.is-open,
  .mobile-user-backdrop.is-open,
  .mobile-download-backdrop.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-panel,
  .mobile-download-notice {
    position: fixed;
    z-index: 1050;
    inset: 0;
    display: flex;
    visibility: hidden;
    flex-direction: column;
    overflow: auto;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .mobile-menu-panel.is-open,
  .mobile-download-notice.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-menu-header,
  .mobile-download-header {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 64px;
    height: 64px;
    padding: 14px 20px;
    background: #fff;
  }

  .mobile-menu-header {
    border-bottom: 0.5px solid #e5e7eb;
  }

  .mobile-menu-nav {
    display: flex;
    flex-direction: column;
    padding-left: 20px;
  }

  .mobile-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 62px;
    padding: 18px 20px 18px 0;
    border-bottom: 0.5px solid #e5e7eb;
    background: #fff;
    color: #101828;
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 26px;
    text-align: left;
    text-decoration: none;
  }

  .mobile-menu-item svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: #6a7282;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
  }

  .mobile-menu-item-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
  }

  .mobile-menu-footer {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
    padding: 32px 48px max(32px, env(safe-area-inset-bottom));
    border-top: 0.5px solid #e5e7eb;
  }

  .mobile-menu-download-btn,
  .mobile-download-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 49px;
    padding: 12px 24px;
    border-radius: 14px;
    background: #101828;
    color: #fff;
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
  }

  .mobile-language-backdrop {
    z-index: 1070;
  }

  .mobile-user-backdrop {
    z-index: 1070;
  }

  .mobile-language-sheet {
    position: fixed;
    z-index: 1080;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    visibility: hidden;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: #f3f4f6;
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .mobile-language-sheet.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-user-sheet {
    position: fixed;
    z-index: 1080;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    visibility: hidden;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: #f3f4f6;
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .mobile-user-sheet.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-language-options {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
  }

  .mobile-language-option,
  .mobile-language-cancel,
  .mobile-user-logout,
  .mobile-user-cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    padding: 16px;
    background: #fff;
    color: #101828;
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    text-align: center;
  }

  .mobile-language-option:not(:last-child) {
    border-bottom: 0.5px solid #e5e7eb;
  }

  .mobile-language-option.is-active {
    font-weight: 600;
  }

  .mobile-language-cancel {
    min-height: 48px;
    margin-top: 8px;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  }

  .mobile-user-logout,
  .mobile-user-cancel {
    box-sizing: border-box;
    margin: 0;
    border: 0;
    font: inherit;
    cursor: pointer;
  }

  .mobile-user-logout {
    min-height: 56px;
    border-bottom: 0.5px solid #e5e7eb;
    color: #b42318;
  }

  .mobile-user-cancel {
    min-height: 48px;
    margin-top: 8px;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  }

  .mobile-download-notice {
    z-index: 1060;
    background: #fdf8f3;
  }

  .mobile-download-header {
    flex: 0 0 64px;
  }

  .mobile-download-content {
    box-sizing: border-box;
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: center;
    padding: 56px 48px max(48px, env(safe-area-inset-bottom));
  }

  .mobile-download-illustration {
    position: relative;
    width: 323px;
    max-width: 100%;
    height: 248px;
    flex: 0 0 248px;
  }

  .mobile-download-device-composition {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 323px;
    max-width: 100%;
    aspect-ratio: 323 / 248;
    transform: translate(-50%, -50%);
  }

  .mobile-download-device-composition img {
    position: absolute;
    display: block;
    max-width: none;
  }

  .mobile-download-imac-frame {
    top: 0;
    left: 0;
    z-index: 1;
    width: 91.365015%;
    height: 99.019355%;
  }

  .mobile-download-imac-screen {
    top: 4.588710%;
    left: 3.241486%;
    z-index: 2;
    width: 84.905882%;
    height: 62.250806%;
    object-fit: cover;
  }

  .mobile-download-phone-ellipse {
    top: 96.055883%;
    left: 66.482508%;
    z-index: 3;
    width: 33.372136%;
    height: 3.232185%;
  }

  .mobile-download-phone-base-shadow {
    top: 92.399899%;
    left: 71.316207%;
    z-index: 3;
    width: 23.706594%;
    height: 6.294556%;
  }

  .mobile-download-phone-shadow {
    top: 23.840000%;
    left: 68.144582%;
    z-index: 4;
    width: 30.047368%;
    height: 76.049194%;
  }

  .mobile-download-phone-frame {
    top: 24.862903%;
    left: 69.291022%;
    z-index: 5;
    width: 27.755604%;
    height: 73.064516%;
  }

  .mobile-download-phone-display {
    position: absolute;
    top: 26.802419%;
    left: 70.925697%;
    z-index: 6;
    width: 24.490093%;
    height: 69.066532%;
    border-radius: 12.5% / 5.8%;
    background: #fff;
  }

  .mobile-download-phone-border {
    top: 26.757661%;
    left: 70.860310%;
    z-index: 7;
    width: 24.620867%;
    height: 69.236694%;
  }

  .mobile-download-phone-unavailable {
    top: 53.415323%;
    left: 77.226006%;
    z-index: 8;
    width: 12.016533%;
    height: 15.650565%;
  }

  .mobile-download-phone-camera {
    top: 27.469758%;
    left: 81.223684%;
    z-index: 9;
    width: 3.938700%;
    height: 0.599746%;
  }

  .mobile-download-copy-block {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    margin-top: 32px;
  }

  .mobile-download-text {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .mobile-download-text h2,
  .mobile-download-text p {
    margin: 0;
  }

  .mobile-download-text h2 {
    color: #101828;
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: normal;
  }

  .mobile-download-text p {
    color: #6a7282;
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
  }

  .mobile-download-platform-name {
    color: #734E2B;
  }

  .mobile-download-copy-btn {
    gap: 10px;
  }

  .mobile-download-copy-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .mobile-header button:focus-visible,
  .mobile-menu-panel button:focus-visible,
  .mobile-menu-panel a:focus-visible,
  .mobile-language-sheet button:focus-visible,
  .mobile-user-sheet button:focus-visible,
  .mobile-download-notice button:focus-visible {
    outline: 2px solid #734e2b;
    outline-offset: 2px;
  }

  [dir="rtl"] .mobile-header,
  [dir="rtl"] .mobile-menu-header,
  [dir="rtl"] .mobile-download-header {
    flex-direction: row;
  }

  [dir="rtl"] .mobile-menu-nav {
    padding-right: 20px;
    padding-left: 0;
  }

  [dir="rtl"] .mobile-menu-item {
    padding-right: 0;
    padding-left: 20px;
    text-align: right;
  }

  [dir="rtl"] .mobile-menu-item svg {
    transform: scaleX(-1);
  }

  [dir="rtl"] .mobile-menu-item-value {
    flex-direction: row;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu-backdrop,
  .mobile-language-backdrop,
  .mobile-user-backdrop,
  .mobile-download-backdrop,
  .mobile-menu-panel,
  .mobile-language-sheet,
  .mobile-user-sheet,
  .mobile-download-notice {
    transition: none;
  }
}
