/* New mobile controls have no desktop footprint. Existing desktop styles are untouched. */
.mobile-menu-toggle,.mobile-menu{display:none}
@media(max-width:700px){
  .header{height:64px;min-height:64px;padding:0 12px;gap:8px;flex-wrap:nowrap;position:sticky;top:0;z-index:30}
  .header .brand{font-size:20px;gap:5px;min-width:0;flex-shrink:0}
  .header nav,.header .simple-mode-toggle{display:none}
  .header-actions{gap:4px;margin-left:auto;min-width:0}
  .header .eye-care-toggle{width:44px;min-width:44px;min-height:44px;padding:0;flex:none}
  .header .eye-care-toggle svg{display:block;width:19px;height:19px}
  .header .eye-care-toggle span{display:none}
  .header #account{width:52px;min-height:44px;padding:4px 6px;font-size:0;line-height:1.35;white-space:normal}
  .header #account::before{content:'账号';font-size:13px}
  .mobile-menu-toggle{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;border:1px solid var(--line);border-radius:8px;background:var(--white);color:var(--ink)}
  body.mobile-menu-open{position:fixed;top:var(--mobile-menu-scroll-top);left:0;width:100%;overflow:hidden}
  .mobile-menu[open]{display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;margin:0;width:min(320px,calc(100vw - 32px));max-width:none;height:100vh;height:100dvh;max-height:none;padding:0;border:0;border-right:1px solid var(--line);border-radius:0;background:var(--white);color:var(--ink)}
  .mobile-menu::backdrop{background:#24312666}
  .mobile-menu-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);flex:none}
  .mobile-menu-heading strong{font-size:18px;font-weight:600}
  .mobile-menu-heading button{width:44px;height:44px;font-size:26px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink)}
  .mobile-menu-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:12px 16px 24px}
  .mobile-primary-nav{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding-bottom:16px;border-bottom:1px solid var(--line)}
  .mobile-primary-nav a{display:flex;align-items:center;min-height:44px;padding:8px;border-radius:8px;font-size:14px;color:var(--ink)}
  .mobile-primary-nav a.active{background:var(--catalog-soft);font-weight:600}
  .mobile-tool-list{display:grid;gap:4px;margin:18px 0}
  .mobile-menu h3{font-size:13px;font-weight:600;margin:0 0 10px}
  .mobile-tool-list button{display:flex;align-items:center;gap:12px;min-height:44px;padding:10px;border:0;border-radius:8px;text-align:left;font-size:15px;color:var(--ink);background:transparent}
  .mobile-tool-list button>span{font-size:22px;width:24px;text-align:center}
  .mobile-tool-list button[aria-pressed=true]{background:var(--catalog-soft)}
  .mobile-recent{border-top:1px solid var(--line);padding-top:18px}
  .mobile-recent h3 small{font-size:11px;font-weight:400;color:var(--muted)}
  .mobile-recent .history-item{min-height:52px;padding:10px 0;gap:8px}
  .mobile-recent .history-item>span:nth-child(2){min-width:0;overflow-wrap:anywhere;font-size:13px;line-height:1.65}
  .mobile-recent .history-item small{font-size:11px;line-height:1.7}
  .mobile-menu .empty-history{font-size:12px;line-height:1.8}
  #mobile-find-task{margin-top:18px}
  #mobile-find-task label{font-size:12px;color:var(--muted)}
  #mobile-find-task>div{display:flex;gap:8px;margin-top:8px}
  #mobile-task-id{min-width:0;width:100%;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);padding:8px 10px}
  #mobile-find-task button{flex:none;min-width:64px;border:1px solid var(--line);border-radius:8px;padding:8px;color:var(--ink);background:var(--paper)}
  .mobile-menu-settings{display:grid;gap:6px;border-top:1px solid var(--line);padding-top:18px;margin-top:20px}
  .mobile-menu-settings button{min-height:44px;text-align:left;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font-size:13px}
  input,textarea,select{font-size:16px!important;max-width:100%;min-width:0}
  input:not([type=checkbox]):not([type=radio]),select,button,.button,summary{min-height:44px}
  .text-button,.quiet-link{display:inline-flex;align-items:center;min-height:44px}
  .discovery-layout,.simple-discovery,.studio-layout{grid-template-columns:minmax(0,1fr)}
  .discovery-sidebar,.simple-discovery .discovery-sidebar,.studio-sidebar{display:none}
  .simple-content,.discovery-content{padding:24px 16px;min-width:0}
  .simple-start{margin:32px auto 24px}
  .simple-start h1{font-size:27px;line-height:1.4;margin:14px 0 12px}
  .simple-start>p{font-size:13px;line-height:1.85}
  .simple-search{gap:8px;padding:6px 6px 6px 12px;margin-top:24px}
  .simple-search input{width:0;min-width:0;padding:10px 0}
  .simple-search button{padding:10px 12px;font-size:13px}
  .simple-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:18px}
  .simple-shortcuts button{width:100%;min-width:0;min-height:44px;padding:10px 8px;justify-content:center;font-size:13px}
  .simple-shortcuts button>span{font-size:19px}
  .simple-suggestions{gap:8px;margin:18px 0;font-size:12px}
  .simple-suggestions button{padding:8px 10px}
  .simple-start .simple-help{font-size:12px;text-align:left;line-height:1.85}
  .simple-bottom-note{font-size:11px;line-height:1.85}
  .simple-start.has-creator{margin-top:8px;margin-bottom:20px}
  .simple-start.has-creator h1{font-size:25px}
  .simple-creator{scroll-margin-top:80px}
  .simple-creator-heading{align-items:flex-start;gap:10px}
  .simple-creator-heading>div{min-width:0;gap:8px}
  .simple-creator-heading h2{font-size:21px}
  .simple-creator-heading .text-button{flex:none}
  .studio-main{padding:24px 16px 36px;min-width:0}
  .workspace-balance{gap:8px 14px;flex-wrap:wrap;align-items:center;font-size:12px}
  .workspace-top{align-items:flex-start;gap:12px;flex-wrap:wrap}
  .workspace-top h1{font-size:26px;line-height:1.4}
  .create-grid{grid-template-columns:minmax(0,1fr)}
  .blank-viewport{display:none}
  .prompt-card,.simple-creator .prompt-card{padding:18px 14px;min-width:0;display:flex;flex-direction:column}
  .creation-switch{width:100%;gap:3px}
  .creation-switch button{font-size:12px;padding:8px 3px;gap:4px;min-width:0}
  .creation-subtabs{display:flex;flex-wrap:wrap;gap:6px}
  .creation-subtabs button{padding:8px;font-size:12px;min-width:0}
  .integrated-polish{gap:8px;min-width:0}
  .integrated-polish p{font-size:12px;line-height:1.8}
  .presentation-options{grid-template-columns:minmax(0,1fr);gap:14px}
  .modeler-choice,.creative-output,.image-resolution,.image-count-choice{min-width:0;max-width:100%}
  .image-resolution-choice,.concept-scale{min-height:44px;align-items:center}
  .reference-upload{order:10;min-width:0;width:100%}
  .reference-upload input[type=file]{width:100%;padding:10px 8px}
  .reference-preview{max-width:100%;min-width:0;gap:9px;align-items:flex-start}
  .reference-preview>div{flex:1;min-width:0;max-width:100%}
  .reference-preview strong,.reference-preview strong span,.reference-preview small{overflow-wrap:anywhere;word-break:break-word;white-space:normal}
  .reference-preview img{width:48px;height:48px;flex:0 0 48px;object-fit:cover}
  .reference-preview>button{width:44px;min-width:44px;flex:none;padding:6px;font-size:20px}
  .prompt-card>.sr-only,.prompt-card>textarea{order:20}
  .prompt-card>textarea,.simple-creator .prompt-card textarea{width:100%;min-height:155px;line-height:1.85}
  .prompt-card>.prompt-bottom,.prompt-card>.example-label,.prompt-card>.prompt-examples,.prompt-card>.creative-advice{order:21}
  .prompt-bottom{font-size:11px;gap:10px;flex-wrap:wrap}
  .prompt-examples{display:flex;flex-wrap:wrap;gap:6px}
  .prompt-examples button{font-size:12px;padding:8px 10px}
  .prompt-card>.quote-view,.prompt-card>.submit-area,.prompt-card>#create-error{order:30}
  .quote-view{padding:15px 12px;overflow-wrap:anywhere}
  .quote-view>small,.retention-reminder{font-size:12px;line-height:1.85}
  .submit-area{display:flex;flex-direction:column;align-items:stretch;gap:14px}
  .submit-area>p{font-size:12px;line-height:1.8}
  .submit-area .button{width:100%;white-space:normal;font-size:14px;justify-content:center}
  .capability-note{font-size:12px;line-height:1.85}
  .task-view{padding:18px 14px;min-width:0}
  .task-header,.task-actions{gap:10px;flex-wrap:wrap}
  .task-result h2{font-size:24px;line-height:1.45}
  .task-result p{font-size:13px;line-height:1.85}
  .task-result .button,.payment-card .button,.task-recovered-result .button,.image-results .button{width:100%;white-space:normal;justify-content:center;min-height:44px;font-size:14px;gap:10px}
  .result-retention{padding:16px 12px;gap:10px;min-width:0}
  .result-retention strong{font-size:13px;line-height:1.7}
  .result-retention p,.result-retention small{font-size:12px;line-height:1.85}
  .task-billing>dl{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .task-billing dd,.payment-amount strong{overflow-wrap:anywhere}
  .task-recovered-result{padding:16px 12px;gap:14px}
  .credits-grid{grid-template-columns:minmax(0,1fr);gap:18px}
  .credits-heading{align-items:flex-start;gap:12px;flex-direction:column}
  .credits-page{padding-left:16px;padding-right:16px}
  .balance-card,.ledger-card,.redeem-card,.pricing-card{min-width:0;padding:20px 16px}
  .account-email,.ledger-list li>span{overflow-wrap:anywhere;min-width:0}
  .balance-card .text-button,.balance-card summary{color:inherit}
  .phone-settings summary{display:flex;align-items:center;font-size:13px}
  #auth-dialog{width:calc(100vw - 24px);max-width:420px;padding:28px 20px;border-radius:14px}
  #auth-dialog .close-dialog{min-width:44px;min-height:44px}
  .footer{padding:20px 16px;gap:12px;font-size:11px;flex-wrap:wrap}
  .footer a{min-height:44px;display:inline-flex;align-items:center}
}
