/* Mobile polish v4: full-row cards, uniform headers, safe scrolling, readable outcomes. */
@media(max-width:820px){
  .hh-dashboard-board{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;max-width:100%!important}
  .hh-layout-panel,.hh-mobile-v4-panel{grid-column:1/-1!important;width:100%!important;max-width:100%!important;min-width:0!important;justify-self:stretch!important;scroll-margin-top:calc(env(safe-area-inset-top) + 58px)!important}
  .hh-layout-panel>.panel-head.hh-mobile-uniform-head,.hh-layout-panel>.panel-head.hh-mobile-v4-head{
    grid-template-columns:minmax(0,1fr) auto 42px!important;
    min-height:64px!important;height:64px!important;padding:0 10px 0 12px!important;gap:8px!important;
  }
  .hh-layout-panel>.panel-head.hh-mobile-uniform-head h2,.hh-layout-panel>.panel-head.hh-mobile-v4-head h2{
    font-size:18px!important;line-height:1.05!important;min-width:0!important;max-width:none!important;
  }
  .hh-mobile-section-title{overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important;min-width:0!important}
  .hh-mobile-section-icon{width:32px!important;height:32px!important;flex-basis:32px!important}
  .hh-mobile-collapse{width:42px!important;height:42px!important;border-radius:10px!important;align-self:center!important;justify-self:end!important}
  .hh-mobile-head-status{max-width:112px!important;font-size:9px!important;padding:5px 7px!important;white-space:nowrap!important}
  .hh-plan-settled-v2>.panel-head .hh-mobile-head-status{max-width:104px!important}
  .hh-plan-settled-v2>.panel-head h2{font-size:18px!important}
  .hh-user-outcome-note{margin-top:6px!important;padding:5px 7px!important;border-radius:7px!important;background:#eaf4e8!important;color:#315c46!important;font-weight:750!important}

  #hhRecurringOutcomeDialog{width:min(92vw,430px)!important;max-width:430px!important;border:0!important;padding:0!important;border-radius:16px!important;background:#f8edd7!important;color:#182019!important;box-shadow:0 24px 80px rgba(0,0,0,.32)!important}
  #hhRecurringOutcomeDialog::backdrop{background:rgba(5,19,14,.55)!important;backdrop-filter:blur(2px)!important}
  .hh-outcome-card{padding:0!important;margin:0!important}
  .hh-outcome-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:16px 16px 12px!important;background:linear-gradient(145deg,#0c2a1f,#123829)!important;color:#f5e5b9!important;border-bottom:2px solid #b99045!important}
  .hh-outcome-head small{display:block!important;font:700 10px/1.2 system-ui,sans-serif!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:#d7c58e!important}
  .hh-outcome-head h2{margin:4px 0 0!important;font:800 24px/1.05 var(--display,Baskerville,Georgia,serif)!important;color:#f8e8bd!important}
  .hh-outcome-head>button{width:38px!important;height:38px!important;border:1px solid #806b44!important;border-radius:10px!important;background:#153a2b!important;color:#f5e5b9!important;font-size:26px!important;line-height:1!important;padding:0!important}
  .hh-outcome-context{margin:0!important;padding:12px 16px 4px!important;color:#687064!important;font-size:12px!important}
  .hh-outcome-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important;padding:12px 14px 16px!important}
  .hh-outcome-grid button{min-height:76px!important;padding:10px!important;text-align:left!important;border:1px solid #d6bf91!important;border-radius:11px!important;background:#fff8e8!important;color:#1c271f!important;box-shadow:inset 0 1px 0 #fff!important}
  .hh-outcome-grid button b{display:block!important;font-size:13px!important;margin-bottom:4px!important;color:#1e4d39!important}
  .hh-outcome-grid button span{display:block!important;font-size:10px!important;line-height:1.25!important;color:#6e6d61!important}

  .hh-mobile-row.warn{border-color:#dfc071!important;background:#fff8e6!important}
  .hh-bill-row .hh-mobile-row-side{min-width:78px!important}
  .hh-bill-row .hh-edit-bill{min-width:70px!important}

  /* The top chrome should never collide with a section reached by nav. */
  .hh-layout-panel:target{scroll-margin-top:calc(env(safe-area-inset-top) + 64px)!important}
}
