@media(max-width:760px){
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body{font-size:14px}
  .page{padding:9px 10px calc(82px + env(safe-area-inset-bottom))}
  .page-head{margin-bottom:14px}
  .page h1{font-size:23px;line-height:1.05;margin:2px 0 0;letter-spacing:-.025em}
  .page-head .lede{display:none}
  .eyebrow{font-size:8px;letter-spacing:.11em}
  .pill{font-size:9px;padding:3px 6px}

  .mobile-top{margin-bottom:8px;gap:7px}
  .mobile-top .brand-mark{width:29px;height:29px;font-size:11px}
  .mobile-top strong{font-size:15px;line-height:1}
  .mobile-top .small{display:none}

  /* Home: app-style scan view. Desktop layout is untouched. */
  .home-dashboard{padding-top:8px}
  .home-mobile-attention{margin:0 0 17px}
  .home-mobile-attention-head{display:flex;align-items:end;justify-content:space-between;gap:10px;margin:0 2px 8px}
  .home-mobile-attention-head .eyebrow{display:none}
  .home-mobile-attention-head h2{margin:0;font-size:20px;line-height:1.08;letter-spacing:-.015em}
  .home-mobile-attention-head>span{color:var(--muted);font-size:10px;white-space:nowrap;padding-bottom:1px}
  .home-attention-list{display:grid;gap:5px}
  .home-attention-list .home-item{background:rgba(18,25,22,.94)}
  .home-item{padding:9px 10px;gap:8px;border-radius:11px;align-items:center;box-shadow:none}
  .home-item.compact{padding:9px 10px}
  .home-item-main{min-width:0}
  .home-item-meta{font-size:7.5px;gap:5px;letter-spacing:.045em}
  .home-item-meta span+span:before{margin-right:5px}
  .home-item-title{font-size:13px;line-height:1.22;margin-top:3px}
  .home-item-detail{display:none}
  .home-done{min-height:34px;min-width:52px;padding:6px 9px;font-size:10px;border-radius:999px}

  .home-mobile-week{margin:0 0 14px}
  .home-mobile-section-title{display:flex;align-items:center;justify-content:space-between;margin:0 2px 6px}
  .home-mobile-section-title h2{margin:0;font-size:15px}
  .home-mobile-section-title span{font-size:9px;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:2px 6px}
  .home-mobile-timeline{border-top:1px solid var(--line)}
  .home-mobile-week-row{display:grid;grid-template-columns:58px minmax(0,1fr) auto;gap:8px;align-items:center;padding:9px 1px;border-bottom:1px solid rgba(73,88,80,.42)}
  .home-mobile-week-date{font-size:9px;line-height:1.2;text-transform:uppercase;letter-spacing:.05em;color:var(--accent)}
  .home-mobile-week-main{min-width:0}
  .home-mobile-week-main .home-item-title{font-size:13px;margin-top:2px}

  .home-mobile-folds{display:grid;gap:7px;margin:0 0 14px}
  .home-mobile-fold{border:1px solid var(--line);border-radius:11px;background:rgba(18,25,22,.65);overflow:hidden}
  .home-mobile-fold summary{list-style:none;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:10px 11px;cursor:pointer;font-weight:760;font-size:13px}
  .home-mobile-fold summary::-webkit-details-marker{display:none}
  .home-mobile-fold-count{font-size:9px;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:2px 6px;font-weight:500}
  .home-mobile-fold-chevron{color:var(--muted);font-size:15px;line-height:1;transition:transform .15s ease}
  .home-mobile-fold[open] .home-mobile-fold-chevron{transform:rotate(180deg)}
  .home-mobile-fold-body{display:grid;gap:5px;padding:0 7px 7px}
  .home-mobile-fold-body .home-item{background:#111815}

  .home-status-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:0}
  .home-status-card{padding:9px 10px;border-radius:11px;min-height:76px;box-shadow:none}
  .home-status-card strong{font-size:12px;line-height:1.18;margin-top:7px}
  .home-status-card p{display:none}
  .home-status-top{align-items:flex-start}
  .home-status-top .eyebrow{font-size:8px}
  .home-status-top .pill{font-size:8.5px;padding:3px 6px}


  .card{padding:13px;border-radius:13px}
  .card p{font-size:12px;line-height:1.4}
  .btn{font-size:12px;padding:9px 10px}
  .toolbar{gap:7px;margin-bottom:11px}
  .week-title{font-size:13px}

  .meal-grid{gap:7px}
  .meal-day{min-height:0;padding:10px;border-radius:12px}
  .meal-dow{font-size:16px;margin-bottom:7px}
  .meal-date{font-size:10px}
  .mealbox{padding:8px}
  .mealbox select{font-size:12px}
  .reason{min-height:0;font-size:10px;line-height:1.35;margin:6px 1px}
  .hint{display:none}
  .summary-bar{padding:10px;gap:9px}

  .food-tabs{gap:4px;margin-bottom:10px;padding-bottom:6px}
  .food-tab{padding:7px 8px;font-size:11px}
  .food-flow-note{display:none}
  .stock-overview{padding:12px;border-radius:13px}
  .stock-progress-copy h2{font-size:19px}
  .stock-progress-copy p,.stock-readiness span{font-size:10px}
  .stock-group-head{padding:9px 10px}
  .stock-item{padding:9px 10px;gap:7px}
  .stock-copy strong{font-size:12px}
  .stock-copy span{font-size:9px}
  .stock-choice{padding:7px 8px;font-size:10px}

  .plan-list{gap:9px}
  .plan{border-radius:13px}
  .plan-head{padding:11px}
  .plan-title{font-size:16px;line-height:1.22}
  .plan-summary{font-size:11px;line-height:1.38;margin-top:6px}
  .plan-sections{padding:3px 8px 8px}
  .plan-section{padding:10px;border-radius:10px;margin-top:6px}
  .section-headline{font-size:14px}
  .details{font-size:11px;line-height:1.38;margin-top:6px}
  .note,.latest{font-size:10px}

  .shopping-hero,.shopping-overview,.runner-card{padding:13px}
  .shopping-hero h2,.shopping-overview h2{font-size:18px}
  .shopping-hero p,.shopping-overview p,.runner-boundary,.runner-progress span{font-size:11px}
  .shopping-item{padding:9px 10px}
  .shopping-name,.runner-name{font-size:12px}
  .shopping-meta,.shopping-product,.runner-meta{font-size:9px}

  .toast{right:11px;left:11px;bottom:calc(70px + env(safe-area-inset-bottom));max-width:none;font-size:12px;padding:9px 11px}

  /* Tap-for-detail bottom sheet */
  .home-item-openable{-webkit-tap-highlight-color:transparent}
  .home-item-openable:active{background:#18231e}
  .home-detail-backdrop{place-items:end center;padding:0;background:rgba(3,7,5,.68)}
  .home-detail-sheet{width:100%;max-height:min(82vh,760px);border-radius:20px 20px 0 0;border-left:0;border-right:0;border-bottom:0;padding:12px 16px calc(18px + env(safe-area-inset-bottom));animation:homeSheetUp .18s ease-out}
  .home-detail-handle{display:block;width:42px;height:4px;border-radius:999px;background:#405148;margin:0 auto 13px}
  .home-detail-close{top:15px;right:14px;width:32px;height:32px;font-size:20px}
  .home-detail-sheet h2{font-size:20px;line-height:1.18;margin:5px 40px 13px 0}
  .home-detail-facts{gap:6px;margin-bottom:13px}
  .home-detail-fact{padding:6px 8px;border-radius:9px}
  .home-detail-fact strong{font-size:10px}
  .home-detail-copy{font-size:13px;line-height:1.55}
}

@keyframes homeSheetUp{from{transform:translateY(18px);opacity:.65}to{transform:translateY(0);opacity:1}}

@media(max-width:420px){
  .page{padding-left:9px;padding-right:9px}
  .page h1{font-size:22px}
  .home-mobile-attention-head h2{font-size:19px}
  .home-item-title{font-size:12.5px}
  .home-status-card strong{font-size:11.5px}
}


/* Settings mobile */
@media(max-width:760px){
  .settings-shell{gap:9px}.settings-panel{border-radius:13px}.settings-panel-head{padding:12px;gap:10px;align-items:center}.settings-panel-head h2{font-size:17px;margin-top:2px}.settings-panel-head p{font-size:10px}.settings-panel-head .btn{flex:0 0 auto;padding:8px 9px}
  .settings-summary{padding:9px 12px}.settings-search-row{padding:9px 12px;gap:7px}.settings-search-row input{padding:9px 10px;font-size:11px}.settings-search-row span{font-size:9px}.settings-editor{padding:12px}.settings-form-grid{grid-template-columns:1fr}.settings-field.wide{grid-column:auto}.settings-form-actions{justify-content:stretch}.settings-form-actions .btn{flex:1}
  .settings-item{grid-template-columns:1fr;padding:11px 12px;gap:8px}.settings-item-actions{justify-content:flex-start}.settings-item-actions .btn{flex:1}.settings-help{padding:10px 12px}
}
