/* Groc 2.1 — premium consistency and responsive touch controls.
   Layered over the approved 2.0 skin; no modifications to store pricing or RPCs. */
:root { --g21-forest:#25583f; --g21-border:#e4eae2; --g21-ivory:#f8f8f4; }
/* Correct 2.0's cramped, illegible To Buy heading actions. */
.groc2-tobuy {overflow:visible!important;position:relative;border-radius:22px!important}
.groc2-tobuy>.dashboard-section-heading {position:relative;z-index:3;gap:11px!important;min-width:0;border-radius:21px 21px 0 0!important;flex-wrap:nowrap!important}
.groc2-tobuy>.dashboard-section-heading>div:first-child{min-width:0;flex:1}
.groc2-tobuy .groc-to-buy-toggle {gap:8px!important;min-width:0;font-size:clamp(23px,6vw,30px)!important}
.groc2-tobuy .groc-to-buy-count{font-size:12px!important;min-width:31px;height:31px;flex:0 0 auto}
.groc2-tobuy .groc21-heading-actions{display:flex!important;flex-wrap:nowrap!important;gap:8px!important;flex:0 0 auto;position:relative;align-items:center}
.groc2-tobuy .groc21-heading-actions .groc21-add-button{min-height:38px!important;min-width:76px!important;border-radius:12px!important;background:#e5f2e8!important;color:#1e4e38!important;border:0!important;box-shadow:none!important;font-size:13px!important;font-weight:750!important;padding:0 11px!important;gap:6px!important;white-space:nowrap!important}
.groc2-tobuy .groc21-overflow-wrap{position:relative;flex:none}
.groc2-tobuy .groc21-overflow-toggle{height:38px;width:38px;border-radius:12px;border:1px solid #ffffff44;background:#ffffff16;color:white;font-size:27px;line-height:1;cursor:pointer;display:grid;place-items:center;padding:0 0 7px}
.groc21-overflow-menu{position:absolute;z-index:200;right:0;top:calc(100% + 8px);background:#fffefa;border:1px solid #e4eae2;border-radius:13px;padding:7px;box-shadow:0 12px 30px #1f432b34;min-width:160px}
.groc21-overflow-menu .groc21-clear-action{color:#995b57!important;background:transparent!important;display:flex;gap:9px;width:100%;align-items:center;text-align:left;padding:10px 11px;border:0;border-radius:9px;font-weight:700;cursor:pointer;font-size:13px}
.groc21-overflow-menu .groc21-clear-action:active{background:#f9eae6!important}
/* Compact but readable To Buy rows, proper stepper hit areas and no clipped store badges. */
.groc2-tobuy .dashboard-list-controls{padding:3px 11px 8px!important}
.groc2-tobuy .dashboard-list-card{padding:0!important;overflow:visible!important}
.groc2-tobuy .dashboard-list-item{display:grid!important;grid-template-columns:minmax(0,1fr) 115px 31px!important;align-items:center!important;min-width:0;gap:8px!important;padding:11px 1px!important;min-height:62px!important}
.groc2-tobuy .dashboard-list-item-main{min-width:0;gap:3px!important;overflow:visible}
.groc2-tobuy .dashboard-list-item-main>strong{white-space:normal!important;overflow:hidden!important;display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-overflow:ellipsis;font-weight:735!important;font-size:13.5px!important;line-height:1.35!important;overflow-wrap:anywhere;max-width:100%}
.groc2-tobuy .dashboard-list-item-subline{gap:7px!important;flex-wrap:wrap!important;min-width:0;margin-top:4px!important}
.groc2-tobuy .dashboard-list-item-subline>span:first-child{font-size:11px!important;line-height:1.2!important;white-space:normal}
.groc21-store-label{display:inline-flex!important;max-width:84px;min-height:19px;align-items:center;color:#586b60!important;background:#edf2eb;border:1px solid #e3eae1;border-radius:6px;font-weight:740!important;font-size:9px!important;letter-spacing:.01em;padding:1px 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.groc2-tobuy .dashboard-quantity-control{grid-area:auto!important;min-width:0;max-width:none;width:115px!important;height:40px!important;min-height:40px!important;grid-template-columns:35px 31px 35px!important;gap:3px!important;padding:1px 3px!important;margin:0!important;border-radius:13px!important;background:#f3f7f1!important;border:1px solid #dfe8dc!important;box-shadow:none!important;position:relative;z-index:1}
.groc2-tobuy .dashboard-quantity-control button{position:relative;z-index:2;display:grid!important;place-items:center!important;width:35px!important;height:36px!important;min-height:36px!important;min-width:35px!important;padding:0!important;border:0!important;border-radius:10px!important;background:transparent!important;color:#22543c!important;cursor:pointer!important;touch-action:manipulation!important;pointer-events:auto!important;transform:none!important}
.groc2-tobuy .dashboard-quantity-control button:active{background:#d4e8d7!important}
.groc2-tobuy .dashboard-quantity-control strong{font-size:15px!important;font-variant-numeric:tabular-nums;line-height:1.2;text-align:center!important;pointer-events:none}
.groc2-tobuy .g14-delete-item{grid-area:auto!important;width:31px!important;height:36px!important;min-width:31px!important;min-height:36px!important;display:grid;place-items:center;font-size:19px!important;color:#9c625e!important;background:transparent!important;border:0!important;box-shadow:none!important;transform:none!important;padding:0!important;z-index:1;touch-action:manipulation!important}
.groc2-tobuy .dashboard-list-footer-v2{padding:8px 4px 6px!important;margin:0!important}
.groc2-tobuy .dashboard-list-footer-v2>span{font-size:11px!important;color:#8b988f!important}
/* Native-feeling bottom navigation: one thin surface, precise icons, calm active pill. */
.bottom-nav-glass.bottom-nav-six,.bottom-nav.bottom-nav-glass.bottom-nav-six {height:64px!important;max-width:540px!important;width:calc(100vw - 22px)!important;min-width:0!important;padding:5px!important;border-radius:22px!important;background:#fffefa!important;border:1px solid #e2e9e0!important;box-shadow:0 7px 25px #19483418!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;gap:2px!important;bottom:max(8px,env(safe-area-inset-bottom))!important}
.bottom-nav-six .bottom-nav-item{border-radius:16px!important;flex:1 1 0!important;height:53px!important;min-height:53px!important;min-width:0!important;padding:4px 0!important;gap:3px!important;font-size:10px!important;font-weight:650!important;color:#839287!important;line-height:1!important;transition:background-color 120ms ease,color 120ms ease!important;transform:none!important}
.bottom-nav-six .bottom-nav-item .bottom-nav-icon-shell{height:23px;min-height:23px;display:grid;place-items:center}
.bottom-nav-six .bottom-nav-item svg{height:19px!important;width:19px!important;stroke-width:2!important}
.bottom-nav-glass .bottom-nav-item.active{background:#e5f0e5!important;color:#21553e!important;box-shadow:none!important}
.bottom-nav-six .bottom-nav-item:active{background:#e9f2e9!important;transform:none!important}
/* Consistent sections: the old theme's large vertical gaps made short tasks scroll excessively. */
.dashboard-content-section{scroll-margin-top:8px}
.dashboard-quick-add-section{margin-top:5px!important;margin-bottom:8px!important}
.dashboard-section-heading{margin-bottom:9px!important;row-gap:4px!important}
.dashboard-section-heading h2{font-size:20px!important;line-height:1.25!important}
.dashboard-recipe-section{margin-top:9px!important;margin-bottom:10px!important}
.dashboard-recipe-url{gap:8px!important;margin-top:9px!important}
.dashboard-recipe-url input{min-height:44px!important;height:44px!important;font-size:14px!important;border-radius:13px!important}
.dashboard-recipe-url button{min-height:44px!important;border-radius:13px!important;font-size:12px!important;padding:8px 13px!important}
.dashboard-category-strip{margin-bottom:7px!important}
/* Product grids, consistent imagery and crisp legible details. */
.library-product-row,.store-browser-result,.store-browser-card,.quick-add-card-v3{transition:background-color 120ms ease,border-color 120ms ease,opacity 120ms ease!important}
.library-product-row{padding:10px!important;min-height:77px!important}
.library-row-copy h3,.library-row-copy strong{white-space:normal;line-height:1.32}
.store-browser-result img,.library-row-image img,.quick-add-image-v3 img{object-fit:contain!important}
:root:not([data-theme="dark"]) .shopping-compact-list-m10{box-shadow:0 3px 12px #20482f0b!important}
/* Prevent every tap from shrinking its button and moving the surrounding content. */
button:active:not(:disabled),.bottom-nav-item:active{transform:none!important}
button{transition:background-color .12s ease,color .12s ease,opacity .12s ease!important}
button:not(:disabled):active{opacity:.88}
/* Avoid painting hidden offscreen product rows, without applying contain to fixed menus. */
.library-product-row,.store-browser-result{content-visibility:auto;contain-intrinsic-size:auto 92px}
@media (max-width:390px){
 .groc2-tobuy>.dashboard-section-heading{padding:13px 10px!important;gap:5px!important}
 .groc2-tobuy .groc21-heading-actions{gap:5px!important}
 .groc2-tobuy .groc21-heading-actions .groc21-add-button{min-width:58px!important;padding:0 8px!important;font-size:12px!important}
 .groc2-tobuy .groc21-overflow-toggle{width:34px;height:38px}
 .groc2-tobuy .dashboard-list-item{grid-template-columns:minmax(0,1fr) 105px 28px!important;gap:5px!important}
 .groc2-tobuy .dashboard-quantity-control{width:105px!important;grid-template-columns:32px 29px 32px!important;padding:1px 2px!important;gap:3px!important}
 .groc2-tobuy .dashboard-quantity-control button{width:32px!important;min-width:32px!important}
 .groc2-tobuy .g14-delete-item{width:28px!important;min-width:28px!important}
 .bottom-nav-six .bottom-nav-item{font-size:9px!important}
}
@media (prefers-reduced-motion:reduce){
 .bottom-nav-six .bottom-nav-item,.library-product-row,.store-browser-result{transition:none!important}
}
:root[data-theme="dark"] .bottom-nav-glass.bottom-nav-six{background:#1c2c22!important;border-color:#3d5947!important}
:root[data-theme="dark"] .groc2-tobuy .dashboard-quantity-control{background:#293b2e!important;border-color:#47644d!important}
:root[data-theme="dark"] .groc2-tobuy .dashboard-quantity-control button{color:#e5eee4!important}
