/* Groc 2.0 — Premium Minimal
   Design refresh only: M16.17.6 user data, RPCs and integrations unchanged.
   High-cost full-surface blur replaced with flat premium cards; transitions limited to
   compositor properties and touch feedback. */
:root:not([data-theme="dark"]){
 --bg:#f7f6f2; --surface:#fffefa; --accent:#8bae95; --accent-soft:#dce9de;
 --accent-deep:#285740; --text:#243b31; --text-muted:#75857b;
 --header-dark:#183e30;--header-dark-soft:#285a43;--header-text:#243b31;
 --header-muted:#71877a;--sage:#d7e7d9;--mint:#e5f0e7;
 --glass-bg:#fffefa;--glass-bg-strong:#fffefa;--glass-border:#e6eae4;
 --shadow-soft:0 4px 16px #264d3d0b;--shadow-card:0 5px 21px #264d3d0b;
 --groc2-deep:#20543d;--groc2-ivory:#f7f6f2;--groc2-edge:#e5e9e2;
 --groc2-card:#fffefa;--groc2-mint:#e3efe5;--groc2-text:#243b31;
}
:root[data-theme="dark"]{
 --groc2-deep:#bedcc6;--groc2-ivory:#121c16;--groc2-edge:#35473b;
 --groc2-card:#202c24;--groc2-mint:#273d30;--groc2-text:#e0ebe2;
}
html{scroll-behavior:auto!important;-webkit-text-size-adjust:100%}
body{overscroll-behavior-y:contain;color:var(--text);background:var(--bg)}
#root{isolation:isolate}
button, [role="button"],a,summary{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
button,select,input,textarea{font-family:inherit}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible{outline:2px solid #6ea583;outline-offset:2px}
/* Remove expensive whole-screen filters and lingering animation-induced jumps. */
:root:not([data-theme="dark"]) .glass-panel,
:root:not([data-theme="dark"]) .store-browser-card,
:root:not([data-theme="dark"]) .store-browser-result,
:root:not([data-theme="dark"]) .m12-stats-card,
:root:not([data-theme="dark"]) .settings-card,
:root:not([data-theme="dark"]) .library-search,
:root:not([data-theme="dark"]) .dashboard-search,
:root:not([data-theme="dark"]) .shopping-progress-count,
:root:not([data-theme="dark"]) .shopping-money-row,
:root:not([data-theme="dark"]) .dashboard-quantity-control,
:root:not([data-theme="dark"]) .shopping-quantity-control,
:root:not([data-theme="dark"]) .quantity-stepper,
:root:not([data-theme="dark"]) .g14-delete-item{
 -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
 background:#fffefa!important;border:1px solid #e6eae4!important;
 box-shadow:0 3px 15px #264d3d08!important;
}
:root:not([data-theme="dark"]) .glass-panel,
:root:not([data-theme="dark"]) .store-browser-card,
:root:not([data-theme="dark"]) .m12-stats-card,
:root:not([data-theme="dark"]) .settings-card{border-radius:21px!important}
/* App shell typography and rhythm. */
:root{--ui-radius:20px;--ui-title:28px;--ui-section-title:18px;--app-font-size-body:14px}
.dashboard-page,.library-page,.store-browser-page,.shopping-page-m10,.m12-stats-page,.m15-settings{color:var(--text)}
.eyebrow{font-size:10px!important;font-weight:800!important;letter-spacing:.115em!important;color:#708f7a!important}
.dashboard-content-section,.library-page,.m12-stats-page{scroll-margin-top:18px}
h1,h2,h3{letter-spacing:-.035em}
/* Home — greeting on ivory, calm search, compact category shortcuts. */
:root:not([data-theme="dark"]) .dashboard-hero{
 background:#f7f6f2!important;color:#243b31!important;box-shadow:none!important;
 border-radius:0!important;margin:0!important;padding:22px 19px 23px!important;
}
:root:not([data-theme="dark"]) .dashboard-greeting>span{
 color:#6c8375!important;font-size:13px!important;font-weight:640!important;
}
:root:not([data-theme="dark"]) .dashboard-greeting h1{
 color:#1f3f30!important;font-size:clamp(27px,7vw,33px)!important;
 font-weight:780!important;letter-spacing:-.045em!important;line-height:1.12!important;
}
:root:not([data-theme="dark"]) .dashboard-avatar{
 border-radius:50%!important;background:#deeadf!important;border:3px solid #fff!important;
 color:#1d523b!important;box-shadow:0 3px 12px #264d3d1b!important;
 width:50px!important;height:50px!important;flex-basis:50px!important;
}
:root:not([data-theme="dark"]) .dashboard-search{
 background:#fffefa!important;color:#75887c!important;border:1px solid #e2e7df!important;
 height:48px!important;padding:0 15px!important;margin-top:18px!important;
 border-radius:15px!important;box-shadow:0 4px 14px #244c3810!important;
 -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
}
.dashboard-category-strip{margin:0 14px 16px!important;padding:3px 2px 9px!important;gap:12px!important;scroll-behavior:auto!important}
:root:not([data-theme="dark"]) .dashboard-category-icon{
 border-radius:17px!important;border:1px solid #e9eee7!important;background:#fffefa!important;
 box-shadow:0 3px 11px #284b3710!important;
 -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
}
.dashboard-category-shortcut.active .dashboard-category-icon{outline:2px solid #8eb49b;outline-offset:1px}
.dashboard-category-shortcut small{font-weight:650!important;font-size:11px!important}
/* To Buy — contrasting forest green header, premium white list beneath. */
.groc2-tobuy{margin:0 14px 15px;padding:0!important;border-radius:21px;background:var(--groc2-card);border:1px solid var(--groc2-edge);box-shadow:0 5px 20px #1f493709;overflow:hidden}
:root:not([data-theme="dark"]) .groc2-tobuy>.dashboard-section-heading{
 background:linear-gradient(120deg,#194b35,#327350)!important;
 border:0!important;margin:0!important;padding:16px 17px!important;
 border-radius:19px 19px 0 0;color:#fff!important;
}
:root:not([data-theme="dark"]) .groc2-tobuy>.dashboard-section-heading .eyebrow{color:#c8e3d1!important}
:root:not([data-theme="dark"]) .groc2-tobuy>.dashboard-section-heading h2,
:root:not([data-theme="dark"]) .groc2-tobuy>.dashboard-section-heading h2 button,
:root:not([data-theme="dark"]) .groc2-tobuy>.dashboard-section-heading h2 svg{color:#fff!important}
:root:not([data-theme="dark"]) .groc2-tobuy .groc-to-buy-count{
 color:#1e573d!important;background:#e1f2e5!important;border:1px solid #e1f2e5!important;
}
.groc2-tobuy .dashboard-list-controls{padding:11px!important;margin:0!important;min-width:0}
:root:not([data-theme="dark"]) .groc2-tobuy .dashboard-list-card{
 border:0!important;background:#fffefa!important;box-shadow:none!important;border-radius:0!important;
}
.groc2-tobuy .dashboard-list-item{min-height:58px!important;padding:10px 6px!important;gap:8px!important}
:root:not([data-theme="dark"]) .groc2-tobuy .dashboard-list-item+.dashboard-list-item{border-top:1px solid #f0f0eb!important}
.groc2-tobuy .dashboard-list-item-main strong{font-size:13px!important;font-weight:720!important;letter-spacing:-.01em}
.groc2-tobuy .dashboard-list-footer-v2{padding:12px 5px 5px!important;gap:6px}
:root:not([data-theme="dark"]) .groc2-tobuy .dashboard-start-shopping-v2{
 background:#235941!important;box-shadow:0 6px 15px #1b56302a!important;
 border-radius:13px!important;font-weight:740!important;min-height:47px!important;
 width:100%!important;max-width:100%!important;color:white!important;
}
/* Quick Add: 3 compact cards per row with large clean photos. */
.dashboard-quick-add-section{margin:8px 14px 16px!important;padding:0!important}
.dashboard-quick-add-section .dashboard-section-heading h2,.dashboard-section-heading h2{
 font-size:19px!important;font-weight:770!important;letter-spacing:-.035em!important;
}
.quick-add-grid-v3{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important}
:root:not([data-theme="dark"]) .quick-add-card-v3{
 background:#fffefa!important;border:1px solid #e8ebe5!important;border-radius:17px!important;
 box-shadow:0 4px 16px #234b360b!important;
}
.quick-add-card-v3{height:172px!important;grid-template-rows:79px minmax(39px,auto) 32px!important;padding:7px!important;gap:4px!important}
:root:not([data-theme="dark"]) .quick-add-image-v3{
 background:#f4f5ef!important;border-radius:12px!important;height:79px!important;
}
.quick-add-image-v3 img{max-width:80%!important;max-height:84%!important;object-fit:contain!important;transform:none!important}
.quick-add-card-copy-v3 strong{font-size:11.5px!important;font-weight:720!important;line-height:1.3!important}
:root:not([data-theme="dark"]) .quick-add-stepper-v3{background:#f3f7f2!important;border:1px solid #e6ede5!important;border-radius:11px!important}
:root:not([data-theme="dark"]) .quick-add-stepper-v3 button{color:#235941!important}
:root:not([data-theme="dark"]) .quick-add-card-v3.selected{border-color:#9fc9a9!important;background:#f6fcf6!important}
/* Recipe import, Library: premium controls and compact cards. */
:root:not([data-theme="dark"]) .dashboard-recipe-section,
:root:not([data-theme="dark"]) .dashboard-recipe-content{
 border-color:#e9ece6!important;box-shadow:none!important;
}
.library-header{padding-top:max(23px,env(safe-area-inset-top))!important;padding-left:17px!important;padding-right:17px!important}
.library-header h1{color:var(--groc2-text)!important;margin-bottom:13px!important}
:root:not([data-theme="dark"]) .library-search{
 border-radius:15px!important;box-shadow:0 3px 14px #244c3810!important;padding:12px 14px!important;
}
.library-filter-shell{margin-top:13px!important}
.library-filter-row-v2>button{border-radius:13px!important;transition:background-color .12s ease,color .12s ease!important}
.library-product-list{gap:9px!important}
:root:not([data-theme="dark"]) .product-card-v2,
:root:not([data-theme="dark"]) .library-product-row{
 background:#fffefa!important;border:1px solid #e6eae3!important;border-radius:17px!important;
 box-shadow:0 3px 14px #264d3d09!important;
}
.library-product-row{min-height:80px!important;gap:10px!important;padding:9px!important}
:root:not([data-theme="dark"]) .library-row-image,
:root:not([data-theme="dark"]) .product-card-v2-image{
 background:#f3f5ef!important;border-radius:12px!important;
}
.library-row-copy h3,.library-row-copy strong{font-size:13px!important;font-weight:730!important}
/* Shop: one orderly list, calm row states and sticky header. */
:root:not([data-theme="dark"]) .shopping-sticky-header-m10{
 background:#f7f6f2!important;border-bottom:1px solid #e8ebe5!important;
 -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
 box-shadow:0 2px 10px #264d3d0a!important;
}
:root:not([data-theme="dark"]) .shopping-sticky-header-m10 h1,
:root:not([data-theme="dark"]) .shopping-sticky-header-m10 strong,
:root:not([data-theme="dark"]) .shopping-sticky-header-m10 p{color:#264a37!important}
:root:not([data-theme="dark"]) .shopping-compact-list-m10{
 background:#fffefa!important;border:1px solid #e9ede7!important;border-radius:17px!important;
 box-shadow:0 3px 14px #264d3d09!important;
}
.shopping-row-v4{min-height:65px!important;padding:8px 9px!important;transition:opacity .12s ease,background-color .12s ease!important}
:root:not([data-theme="dark"]) .shopping-row-v4.purchased{background:#f4f6f0!important;opacity:.7}
.shopping-row-v4>button{touch-action:manipulation}
/* Store: reduce blur/compositing on catalogue tiles, improve clarity. */
.store-browser-page{padding-top:12px!important}
:root:not([data-theme="dark"]) .store-browser-card,
:root:not([data-theme="dark"]) .store-browser-result{
 border:1px solid #e6eae3!important;background:#fffefa!important;
 box-shadow:0 3px 15px #264d3d0a!important;border-radius:18px!important;
}
.store-browser-card{gap:10px!important}
:root:not([data-theme="dark"]) .store-browser-search{border:1px solid #e5eae4!important;border-radius:14px!important;background:#f9faf6!important}
:root:not([data-theme="dark"]) .store-browser-result-image{background:#f5f6f1!important;border-radius:13px!important}
.store-browser-result-image img{object-fit:contain!important}
:root:not([data-theme="dark"]) .store-browser-add-button,
:root:not([data-theme="dark"]) .store-browser-basket-button{background:#235941!important;color:white!important;border-radius:12px!important}
/* Stats: compact polished dashboards and readable charts. */
.m12-stats-page{padding:23px 16px 113px!important}
.m12-stats-header{margin-bottom:13px!important}
.m12-stats-header h1{color:var(--groc2-text)!important}
:root:not([data-theme="dark"]) .m12-stats-card{
 background:#fffefa!important;border:1px solid #e6eae3!important;
 box-shadow:0 3px 14px #264d3d0a!important;border-radius:19px!important;
}
.m12-summary-card{padding:14px!important}
:root:not([data-theme="dark"]) .m12-summary-icon{color:#21543a!important;background:#e7f1e8!important;border-radius:12px!important}
:root:not([data-theme="dark"]) .m176-chart-modal{background:#fffefa!important;border-radius:21px!important}
:root:not([data-theme="dark"]) .m176-total strong{color:#285b41!important}
:root:not([data-theme="dark"]) .m176-bar{fill:#9bc7aa!important}
:root:not([data-theme="dark"]) .m176-bar.active{fill:#275c42!important}
/* Settings: calm structured rows instead of stacked glass layers. */
:root:not([data-theme="dark"]) .settings-card{
 background:#fffefa!important;border-radius:18px!important;
 border:1px solid #e5eae3!important;box-shadow:0 3px 15px #264d3d09!important;
}
:root:not([data-theme="dark"]) .settings-row-icon{color:#2c6147!important;background:#edf5ed!important;border-radius:12px!important}
.settings-row{min-height:59px!important}
/* Ingredient review, both Recipe and Drunken. */
:root:not([data-theme="dark"]) .dg-modal,
:root:not([data-theme="dark"]) .recipe-review-dialog{
 background:#fffefa!important;border-radius:22px!important;
 box-shadow:0 22px 60px #1e3d2d2c!important;
}
:root:not([data-theme="dark"]) .dg-row{
 background:#fffefa!important;border:1px solid #e8ede5!important;border-radius:14px!important;
}
:root:not([data-theme="dark"]) .dg-header,
:root:not([data-theme="dark"]) .dg-footer{background:#fffefa!important}
/* Navigation: visually solid, floating but no 30px backdrop blur. */
.bottom-nav-glass,.bottom-nav.bottom-nav-glass{
 -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
 background:#fffefa!important;border:1px solid #e4eae2!important;
 box-shadow:0 7px 26px #1e44301c!important;
 border-radius:22px!important;height:67px!important;
}
.bottom-nav-item{border-radius:15px!important;transition:background-color .11s ease,color .11s ease!important}
.bottom-nav-glass .bottom-nav-item.active{background:#e2efe5!important;box-shadow:none!important;color:#24583f!important}
.bottom-nav-glass .bottom-nav-item:not(.active){color:#819088!important}
/* Common premium actions / tactile controls — no sweeping transitions. */
:root:not([data-theme="dark"]) .app-button:not(.secondary),
:root:not([data-theme="dark"]) .recipe-add-button,
:root:not([data-theme="dark"]) .shopping-finish-button{
 background:#235941!important;color:#fff!important;border-radius:13px!important;
 box-shadow:0 4px 12px #23594120!important;
}
button{transition:background-color .13s ease,color .13s ease,opacity .13s ease!important}
.dashboard-start-shopping-v2,.bottom-nav-item,.quick-add-card-v3,.store-browser-basket-button,.store-browser-add-button{
 transition:background-color .13s ease,color .13s ease,opacity .13s ease,transform .12s ease!important;
}
button:active:not(:disabled),.bottom-nav-item:active{transform:scale(.975)}
button:disabled{cursor:default;opacity:.65}
/* Image-first UI: no costly paint effects on catalogue scroll. */
.quick-add-card-v3 img,.library-product-row img,.store-browser-result img,.shopping-row-v4 img{image-rendering:auto}
@media(max-width:520px){
 .groc2-tobuy{margin:0 12px 13px}
 .dashboard-hero{padding-left:15px!important;padding-right:15px!important}
 .dashboard-content-section{padding:0 12px}
 .dashboard-quick-add-section{margin-left:12px!important;margin-right:12px!important}
 .library-header{padding-left:15px!important;padding-right:15px!important}
 .quick-add-grid-v3{gap:7px!important}
 .quick-add-card-v3{height:164px!important;grid-template-rows:74px minmax(37px,auto) 31px!important;padding:6px!important}
 .quick-add-image-v3{height:74px!important}
 .quick-add-card-copy-v3 strong{font-size:11px!important}
 .bottom-nav-glass,.bottom-nav.bottom-nav-glass{width:calc(100vw - 18px)!important;bottom:max(7px,env(safe-area-inset-bottom))!important}
}
@media(max-width:360px){.quick-add-card-copy-v3 strong{font-size:10.5px!important}}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}

:root:not([data-theme="dark"]) .dashboard-search input{color:#243b31!important;background:transparent!important;font-weight:550!important}
:root:not([data-theme="dark"]) .dashboard-search input::placeholder{color:#83958a!important;opacity:1!important}
/* Shop keeps a strong forest-green header so all existing counters and buttons stay legible. */
:root:not([data-theme="dark"]) .shopping-sticky-header-m10{background:linear-gradient(130deg,#194a34,#275c41)!important;border-bottom:0!important;box-shadow:0 4px 15px #264d3d15!important}
:root:not([data-theme="dark"]) .shopping-sticky-header-m10 h1,
:root:not([data-theme="dark"]) .shopping-sticky-header-m10 strong,
:root:not([data-theme="dark"]) .shopping-sticky-header-m10 p{color:#fff!important}
:root:not([data-theme="dark"]) .shopping-sticky-header-m10 .shopping-money-row *,
:root:not([data-theme="dark"]) .shopping-sticky-header-m10 .shopping-progress-count *{color:#214631!important}
/* Retain proper contrast for users who prefer dark mode. */
:root[data-theme="dark"] .bottom-nav-glass,:root[data-theme="dark"] .bottom-nav.bottom-nav-glass{background:#1c2c22!important;border-color:#3d5947!important}
:root[data-theme="dark"] .bottom-nav-glass .bottom-nav-item.active{background:#294734!important;color:#dceede!important}
:root[data-theme="dark"] .bottom-nav-glass .bottom-nav-item:not(.active){color:#a9b8ac!important}
:root[data-theme="dark"] .groc2-tobuy{background:#1e2c22;border-color:#385442}
:root[data-theme="dark"] .groc2-tobuy .dashboard-section-heading{color:#edf5e9}
