/* Mobile treatments for authentication, the guide, and the download tool. */
@media (max-width: 800px) {
  body[data-auth-page] {
    --auth-canvas: #f6f7fb;
    --auth-ink: #172337;
    --auth-muted: #657187;
    --auth-line: #e7ebf3;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
  }

  .auth-topbar {
    min-height: 76px;
    gap: 12px;
    padding: max(12px, env(safe-area-inset-top)) 20px 12px;
    border: 0;
    background: var(--auth-canvas);
  }

  .auth-brand { min-height: 44px; gap: 8px; font-size: 24px; font-weight: 700; }
  .auth-brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  .auth-language { padding: 4px; border: 0; border-radius: 14px; background: #e9edf4; }
  .auth-language button { min-width: 44px; min-height: 44px; border-radius: 10px; font-size: 12px; }
  .auth-language button[aria-pressed="true"] { background: #fff; }

  .auth-shell {
    width: min(calc(100% - 40px), 600px);
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 8px 0 max(32px, env(safe-area-inset-bottom));
  }

  .auth-kicker { margin-bottom: 12px; gap: 8px; font: inherit; font-size: 12px; letter-spacing: 0; }
  .auth-kicker::before { width: 8px; height: 8px; border-radius: 2px; }
  .auth-intro h1 { font-size: 28px; line-height: 1.3; font-weight: 700; letter-spacing: -0.04em; }
  .auth-intro > p:last-child { margin-top: 12px; font-size: 14px; line-height: 1.6; }
  .auth-card, .callback-card { min-width: 0; padding: 24px 20px; border-radius: 24px; box-shadow: 0 6px 24px #243c6f04; }
  .auth-card h2 { font-size: 20px; font-weight: 700; }
  .auth-card-copy { margin-bottom: 20px; font-size: 14px; }
  .auth-mode { margin-bottom: 24px; border: 0; border-radius: 14px; background: #edf1ff; }
  .auth-mode button { min-height: 44px; border-radius: 10px; font-size: 14px; }
  .auth-field { margin-bottom: 20px; scroll-margin-block: 24px; }
  .auth-field label { font-size: 14px; }
  .auth-field input { min-height: 52px; border-radius: 14px; padding: 12px 16px; background: #fafbfe; font-size: 16px; }
  .auth-submit, .auth-google { min-height: 52px; padding: 12px 16px; border-radius: 16px; font-size: 16px; font-weight: 700; }
  .auth-submit { box-shadow: 0 6px 16px #234cea24, inset 0 1px #ffffff38; }
  .auth-links { gap: 8px 16px; }
  .auth-links a, .auth-links button { min-height: 44px; font-size: 14px; }
  .auth-divider { margin: 24px 0; font-size: 12px; letter-spacing: 0; }
  .auth-message { margin-top: 16px; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
  .auth-note { margin-top: 20px; font-size: 12px; }
  .callback-shell { min-height: calc(100dvh - 76px); padding: 24px 20px max(32px, env(safe-area-inset-bottom)); }
  .callback-card, .auth-recovery-card { width: min(100%, 600px); }
  .callback-card h1, .auth-recovery-card h1 { margin-bottom: 20px; font-family: inherit; font-size: 28px; font-weight: 700; line-height: 1.3; }
  .callback-login { min-height: 44px; justify-content: center; width: 100%; padding: 12px 16px; border-radius: 14px; background: #edf1ff; font-size: 14px; }

  .guide-main, .vd-page { width: min(calc(100% - 40px), 600px); padding-top: 16px; }
  .guide-heading { align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
  .guide-heading h1 { margin-bottom: 8px; font-size: 28px; line-height: 1.3; }
  .guide-heading p:last-child { font-size: 14px; line-height: 1.6; }
  .guide-home-link { min-height: 44px; gap: 8px; padding: 8px 12px; border-radius: 12px; background: #edf1ff; font-size: 14px; }
  .guide-start { overflow: hidden; grid-template-columns: minmax(0, 1fr); margin-bottom: 24px; border-radius: 24px; }
  .guide-start-title { display: block; padding: 20px; }
  .guide-start-title > span { font-size: 12px; }
  .guide-start h2 { margin: 8px 0 0; font-size: 20px; line-height: 1.4; }
  .guide-start ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; padding: 20px; }
  .guide-start li::before { margin-bottom: 8px; font-size: 12px; }
  .guide-start strong { font-size: 14px; }
  .guide-start li p { font-size: 12px; line-height: 1.6; }
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .guide-index { position: static; display: flex; flex-wrap: nowrap; gap: 8px; max-width: 100%; overflow-x: auto; padding: 0 0 8px; border: 0; scrollbar-width: thin; }
  .guide-index > p { display: none; }
  .guide-index a { flex: 0 0 auto; min-height: 44px; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 14px; }
  .guide-index a > span:first-child { flex-basis: auto; font-size: 12px; }
  .guide-index .guide-faq-link { margin: 0; padding: 12px; border: 1px solid var(--line); }
  .guide-index a:hover, .guide-index a:focus-visible { background: #edf1ff; border-color: var(--primary); }
  .guide-format { margin-bottom: 24px; font-size: 14px; line-height: 1.6; }
  .guide-format strong { font-size: 14px; }
  .guide-tool { padding: 20px; margin-bottom: 16px; border-radius: 24px; scroll-margin-top: 96px; }
  .guide-tool > header { align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; }
  .guide-tool-name { min-width: 0; gap: 12px; }
  .guide-number { width: 44px; height: 44px; border-radius: 14px; font-size: 16px; background: #edf1ff; }
  .guide-kind { font-size: 12px; letter-spacing: 0; }
  .guide-tool h2 { margin-top: 4px; font-size: 20px; line-height: 1.4; }
  .guide-open { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; padding: 8px 12px; border-radius: 12px; background: #edf1ff; font-size: 14px; }
  .guide-purpose { margin: 20px 0; font-size: 14px; line-height: 1.7; }
  .guide-material { gap: 8px 12px; padding: 12px 16px; border-radius: 14px; background: #fafbfe; }
  .guide-material span { font-size: 12px; letter-spacing: 0; }
  .guide-material strong { font-size: 14px; }
  .guide-steps { margin: 20px 0; padding-left: 20px; font-size: 14px; line-height: 1.8; }
  .guide-steps li { padding-left: 4px; margin-bottom: 12px; }
  .guide-tip { padding-top: 16px; font-size: 12px; line-height: 1.7; }
  .guide-download-rules { padding: 16px; border-radius: 14px; font-size: 14px; line-height: 1.7; }
  .guide-faq { margin-top: 32px; scroll-margin-top: 96px; }
  .guide-faq h2 { margin-bottom: 20px; font-size: 20px; }
  .guide-faq details { margin-bottom: 12px; padding: 0 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
  .guide-faq summary { min-height: 52px; padding: 16px 0; font-size: 14px; }
  .guide-faq details > div { padding: 0 0 16px; font-size: 14px; line-height: 1.7; }
  .guide-footer { flex-direction: column; gap: 12px; margin-top: 24px; padding-top: 20px; font-size: 12px; }
  .guide-footer a { display: inline-flex; align-items: center; min-height: 44px; }
  .guide-main p, .guide-main li, .guide-main strong { overflow-wrap: anywhere; }

  .vd-page-head { align-items: center; gap: 12px; margin-bottom: 24px; }
  .vd-page-head .eyebrow { margin-bottom: 8px; font-size: 12px; }
  .vd-page-head h1 { margin-bottom: 8px; font-size: 28px; line-height: 1.3; }
  .vd-page-head p:last-child { font-size: 14px; line-height: 1.6; }
  .vd-transfer { flex: 0 0 64px; height: 44px; }
  .vd-workbench { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .vd-input-panel, .vd-result-panel { border-radius: 24px; box-shadow: 0 6px 24px #243c6f04; }
  .vd-panel-head { min-height: 88px; padding: 20px; gap: 12px; }
  .vd-panel-head .panel-kicker { margin-bottom: 4px; font-size: 12px; }
  .vd-panel-head h2 { font-size: 20px; line-height: 1.4; }
  .vd-cost { padding: 8px; border-radius: 10px; font-size: 12px; }
  .vd-form { padding: 20px; }
  .vd-input-label { margin-bottom: 12px; font-size: 14px; }
  .vd-textarea { min-height: 144px; padding: 12px 16px; border-radius: 16px; background: #fafbfe; font-size: 16px; line-height: 1.6; scroll-margin-block: 24px; }
  .vd-input-meta { gap: 12px; margin-top: 8px; }
  .vd-input-meta p, #vd-input-count { font-size: 12px; line-height: 1.6; }
  .vd-submit-area { position: static; margin-top: 24px; }
  .vd-submit { min-height: 52px; padding: 12px 16px; border-radius: 16px; font-size: 16px; box-shadow: 0 6px 16px #234cea24, inset 0 1px #ffffff38; }
  .vd-price-note, .vd-repeat-note { margin-top: 12px; font-size: 12px; line-height: 1.7; }
  .vd-status { max-width: 45%; padding: 8px; border-radius: 10px; font-size: 12px; }
  .vd-result-body { min-height: 240px; padding: 24px 20px; }
  .vd-result-icon { width: 64px; height: 64px; margin-bottom: 20px; border-radius: 20px; background: #edf1ff; }
  .vd-result-icon svg { width: 40px; height: 40px; }
  .vd-result-body h3 { margin-bottom: 12px; font-size: 20px; line-height: 1.4; }
  .vd-result-copy { max-width: 100%; font-size: 14px; line-height: 1.7; }
  .vd-player { width: 100%; max-height: 400px; margin-top: 20px; border-radius: 16px; }
  .vd-cache-note, .vd-billing { margin-top: 16px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
  .vd-cache-retry { min-height: 44px; padding: 12px 16px; border-radius: 12px; font-size: 14px; }
  .vd-online-download { min-height: 44px; font-size: 14px; overflow-wrap: anywhere; }
  .vd-message { margin-top: 16px; padding: 12px 16px; border: 1px solid #f3c4cd; border-radius: 14px; font-size: 14px; line-height: 1.6; }
  .vd-file-details { width: 100%; margin-top: 24px; }
  .vd-file-details > div { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px 0; font-size: 12px; line-height: 1.6; }
  .vd-result-footer { align-items: stretch; flex-direction: column; gap: 16px; padding: 20px; }
  .vd-result-footer p { flex: auto; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
  .vd-download { justify-content: center; width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 16px; font-size: 16px; }
  .vd-signin { min-height: 44px; padding: 8px 12px; font-size: 14px; }
  .vd-recent { margin-top: 32px; }
  .vd-recent-head { align-items: flex-start; gap: 12px; margin-bottom: 16px; }
  .vd-recent-head h2 { margin-bottom: 8px; font-size: 20px; }
  .vd-recent-head p { max-width: none; font-size: 12px; line-height: 1.6; }
  .vd-recent-head button { min-height: 44px; padding: 12px; border-radius: 12px; font-size: 14px; }
  .vd-recent-empty { padding: 24px 20px; border-radius: 20px; background: #fff; font-size: 14px; }
  .vd-recent-list { gap: 12px; }
  .vd-recent-item { grid-template-columns: 24px minmax(0, 1fr) auto; min-height: 80px; gap: 8px; padding: 16px 12px; border-radius: 18px; }
  .vd-recent-file { font-size: 12px; }
  .vd-recent-name { font-size: 14px; }
  .vd-recent-meta { margin-top: 4px; font-size: 12px; }
  .vd-recent-state { max-width: 72px; font-size: 12px; overflow-wrap: anywhere; }
  .vd-list-error { padding: 12px 16px; border: 1px solid #f3c4cd; border-radius: 14px; background: #fff5f6; font-size: 14px; }
  .vd-rights-note { margin-top: 24px; font-size: 12px; line-height: 1.7; }

  body[data-auth-page] [hidden], .guide-main [hidden], .vd-page [hidden] { display: none !important; }
}
