/* Groc 2.2 — premium responsiveness & coherent compact components. */
:root{--g22-green:#24553E;--g22-edge:#e4e9e0;--g22-shadow:0 3px 14px #2b54400d}
/* Greeting and search occupy much less vertical space while staying readable. */
:root:not([data-theme="dark"]) .dashboard-hero{
 padding:12px 17px 11px!important;border:0!important;
}
:root:not([data-theme="dark"]) .dashboard-greeting>span{font-size:11px!important;line-height:1.35!important}
:root:not([data-theme="dark"]) .dashboard-greeting h1{
 font-size:clamp(24px,6.3vw,28px)!important;line-height:1.05!important;margin:2px 0 0!important
}
:root:not([data-theme="dark"]) .dashboard-avatar{width:43px!important;height:43px!important;flex-basis:43px!important}
:root:not([data-theme="dark"]) .dashboard-search{
 margin-top:10px!important;height:42px!important;border-radius:13px!important;box-shadow:none!important
}
.dashboard-category-strip{
 margin:0 11px 7px!important;padding:0 2px 3px!important;gap:9px!important;
}
.dashboard-category-shortcut{min-width:62px!important;gap:3px!important}
.dashboard-category-icon{width:52px!important;height:52px!important;min-height:52px!important}
.dashboard-category-icon img,.dashboard-category-icon svg{max-width:100%!important;max-height:100%!important}
.dashboard-category-shortcut small{font-size:10px!important;line-height:1.2!important}
/* Calm but distinct current list panel. Keep existing proven quantity controls untouched. */
.groc2-tobuy{margin:0 12px 10px!important;border-radius:19px!important}
.groc2-tobuy>.dashboard-section-heading{padding:12px 13px!important;border-radius:18px 18px 0 0!important}
.groc2-tobuy .groc-to-buy-toggle{font-size:clamp(22px,5.8vw,27px)!important}
.groc2-tobuy .groc-to-buy-count{font-size:11px!important;min-width:27px!important;height:27px!important}
.groc2-tobuy .eyebrow{font-size:9px!important;letter-spacing:.09em!important}
.groc2-tobuy .dashboard-list-footer-v2{padding:7px 4px!important}
/* No duplicate headings and giant separators for small shortcuts. */
.dashboard-quick-add-section{margin:10px 12px 12px!important}
.dashboard-shortcut-heading{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:12px!important}
.dashboard-shortcut-heading .eyebrow{display:none!important}
.dashboard-shortcut-heading h2{order:0!important;margin:0!important;flex:1!important;font-size:18px!important}
.dashboard-shortcut-heading .text-action{order:1!important;font-size:12px!important}
.dashboard-quick-add-content{margin:3px 0 0!important;padding:0!important}
.quick-add-grid-v3{gap:7px!important}
.quick-add-card-v3{height:146px!important;grid-template-rows:62px minmax(34px,auto) 33px!important;padding:6px!important;gap:3px!important}
.quick-add-image-v3{height:62px!important}
.quick-add-card-copy-v3 strong{font-size:11px!important;line-height:1.22!important;-webkit-line-clamp:2!important}
.quick-add-stepper-v3{min-height:34px!important;border-radius:10px!important;touch-action:manipulation}
.quick-add-stepper-v3 button{min-height:31px!important;min-width:30px!important;touch-action:manipulation!important}
/* Recipe is a secondary action: one compact header and streamlined URL input. */
.dashboard-recipe-section{margin:9px 12px 8px!important;padding:0!important}
.dashboard-recipe-section .eyebrow{display:none!important}
.dashboard-recipe-section .dashboard-section-heading{margin-bottom:6px!important}
.dashboard-recipe-url{margin-top:6px!important}
.dashboard-recipe-url input,.dashboard-recipe-url button{height:42px!important;min-height:42px!important}
/* Library: all +/− controls share touch targets and are visually identical to the approved To Buy rhythm. */
.quantity-stepper-v2,.quick-add-stepper-v3,.shopping-row-stepper-v3{
 box-shadow:none!important;transition:background-color .1s linear,border-color .1s linear!important;
}
.quantity-stepper-v2 button,.shopping-row-stepper-v3 button{
 position:relative;z-index:2;pointer-events:auto!important;touch-action:manipulation!important;
 min-width:32px!important;min-height:34px!important;display:grid!important;place-items:center!important;
 transform:none!important
}
.quantity-stepper-v2 strong,.quick-add-stepper-v3 strong,.shopping-row-stepper-v3 strong{font-variant-numeric:tabular-nums;min-width:15px;text-align:center}
.quantity-stepper-v2 button:active,.shopping-row-stepper-v3 button:active,.quick-add-stepper-v3 button:active{
 background:#e0eee3!important;opacity:1!important
}
.library-product-list{gap:7px!important}
.library-product-row{min-height:76px!important;padding:8px!important;box-shadow:var(--g22-shadow)!important}
.library-row-copy h3,.library-row-copy strong{line-height:1.3!important;overflow-wrap:anywhere}
.library-header{padding-top:max(16px,env(safe-area-inset-top))!important}
.library-header h1{margin-bottom:8px!important;font-size:26px!important}
/* Store images remain fully visible and never stretched. */
.store-browser-result,.store-browser-card{border-radius:16px!important;box-shadow:var(--g22-shadow)!important}
.store-browser-result img,.store-browser-card img{object-fit:contain!important}
/* Shop: no full row freeze during quantity RPC, and checked rows remain visible. */
.shopping-row-v4{min-height:63px!important;transition:background-color 100ms ease,opacity 100ms ease!important}
.shopping-row-stepper-v3{align-self:center}
/* Navigation: same icon grid across all sections; stable, slim, and one-hand friendly. */
.bottom-nav-glass.bottom-nav-six,.bottom-nav.bottom-nav-glass.bottom-nav-six{
 border-radius:19px!important;max-width:540px!important;height:61px!important;padding:4px!important;
 box-shadow:0 5px 22px #183e3017!important
}
.bottom-nav-six .bottom-nav-item{min-height:51px!important;height:51px!important;border-radius:14px!important;font-size:9.5px!important;gap:2px!important}
.bottom-nav-six .bottom-nav-item svg{width:20px!important;height:20px!important}
.bottom-nav-six .bottom-nav-item.active{background:#e4efe5!important;font-weight:800!important}
/* Sheets, dialogs and controls use one visual scale, with no wide-screen blur. */
.m15-modal-layer .glass-panel,.m15-modal-layer .product-modal,.recipe-review-dialog,.dg-modal{
 box-shadow:0 20px 48px #203f3020!important;
 -webkit-backdrop-filter:none!important;backdrop-filter:none!important
}
.m15-modal-layer button,.recipe-review-dialog button,.dg-modal button{touch-action:manipulation!important}
.m12-stats-card,.settings-card,.m15-settings .settings-panel{box-shadow:var(--g22-shadow)!important}
.groc22-save-error{font-size:12px!important;color:#a94b48;padding:8px 10px;margin:8px 0;border:1px solid #ebc5c3;border-radius:11px;background:#fff4f1}
/* Respect system motion settings and preserve legibility on compact devices. */
@media(max-width:390px){
 .dashboard-hero{padding-left:13px!important;padding-right:13px!important}
 .groc2-tobuy{margin-left:9px!important;margin-right:9px!important}
 .groc2-tobuy>.dashboard-section-heading{padding:11px 9px!important}
 .dashboard-category-strip{margin-left:9px!important;margin-right:9px!important}
 .dashboard-quick-add-section,.dashboard-recipe-section{margin-left:9px!important;margin-right:9px!important}
 .quick-add-grid-v3{gap:6px!important}
 .quick-add-card-v3{height:145px!important;padding:5px!important}
 .bottom-nav-six .bottom-nav-item{font-size:9px!important}
}
@media(prefers-reduced-motion:reduce){button,.bottom-nav-item,.shopping-row-v4,.library-product-row{transition:none!important}}
:root[data-theme="dark"] .quantity-stepper-v2 button:active,:root[data-theme="dark"] .shopping-row-stepper-v3 button:active{background:#375645!important}

/* Force the legacy two-row grid heading to a single compact line. */
.dashboard-shortcut-heading{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;min-height:0!important;height:auto!important;margin:0 0 8px!important;gap:8px!important}
.dashboard-shortcut-heading>h2{order:0!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;grid-area:auto!important;margin:0!important}
.dashboard-shortcut-heading>.text-action{order:1!important;flex:none!important;grid-area:auto!important;align-self:center!important;margin:0!important}
.dashboard-shortcut-heading>h2>.dashboard-quick-add-toggle{width:auto!important;display:inline-flex!important;gap:10px!important;align-items:center!important;padding:0!important}
/* Override the legacy 224px mobile minimum height (which otherwise defeats compact design). */
.quick-add-card-v3,.quick-add-card-v3.selected{height:170px!important;min-height:170px!important;grid-template-rows:59px minmax(56px,1fr) 33px!important;gap:3px!important;overflow:hidden!important}
:root .quick-add-card-v3 .quick-add-image-v3{height:59px!important;min-height:59px!important;max-height:59px!important;align-self:start!important}
.quick-add-card-copy-v3{min-height:0!important;max-height:60px!important;overflow:hidden!important;gap:2px!important;position:relative!important;z-index:2!important}
.quick-add-card-copy-v3 strong{font-size:11px!important;line-height:1.2!important;min-height:0!important}
.quick-add-stepper-v3{height:33px!important;min-height:33px!important;overflow:visible!important;padding:1px!important}
.quick-add-stepper-v3 button{min-height:29px!important;height:29px!important}
