/* Readable at normal browser zoom; progressively larger on wide desktop displays. */
.sidebar{width:270px;padding-left:20px;padding-right:20px}.page{margin-left:270px}
.sidebar .brand{font-size:25px;gap:9px}.mascot-brand{width:62px;height:62px}
.login-brand .mascot-brand{width:70px;height:70px}.footer-brand img{width:40px;height:40px}
.topbar{height:auto;min-height:86px;gap:20px;padding:16px 32px;flex-wrap:wrap}
.breadcrumb{flex:none;font-size:14px}.breadcrumb-message{flex:1;min-width:180px;text-align:right}
.breadcrumb-message h1{font-size:17px;line-height:1.4;margin:0;font-weight:650;letter-spacing:-.3px}
.breadcrumb-message p{font-size:14px;line-height:1.4;margin:3px 0 0;color:var(--muted)}
.top-actions{gap:14px}.top-date,.private-label{display:none}
main{padding-top:24px}.nav-item{font-size:16px}.profile strong{font-size:15px}
.meal-title strong{font-size:17px}.meal-title p{font-size:14px}.meal-calories{font-size:18px}
.meal .meal-icon.meal-mascot{width:128px;height:118px}.meal-breakfast .meal-icon.meal-mascot{width:168px;height:110px}
.calendar-companion img{width:128px;height:174px}.section-mascot{width:110px;height:110px}
.text-btn,.btn,.form-input{font-size:15px}.form-input{min-height:44px}.card-head h2,.section-title h2{font-size:20px}
.summary-foot,.data-note,.empty-meal,.energy-legend{font-size:14px;line-height:1.6}
.product-result-info strong{font-size:16px}.product-result-info small{font-size:14px}.product-result{min-height:76px}
@media(min-width:1920px){body{zoom:1.15}}
@media(min-width:2560px){body{zoom:1.35}}
@media(min-width:3200px){body{zoom:1.65}}
@media(max-width:1100px) and (min-width:901px){.sidebar{width:235px}.page{margin-left:235px}.sidebar .brand{font-size:21px}.mascot-brand{width:53px;height:53px}.breadcrumb-message p{display:none}}
@media(max-width:900px){
 .page{margin-left:0}.topbar{min-height:76px;padding:12px 20px;gap:10px}.breadcrumb-message{display:none}
 .breadcrumb::before{background-image:url('assets/monchito-face.webp');background-size:44px 44px;padding-left:50px;min-height:44px;display:inline-flex;align-items:center}
 main{padding-top:20px}.meal-title strong{font-size:15px}.meal-title p{font-size:12px}.meal-calories{font-size:15px}
 .meal .meal-icon.meal-mascot{width:90px;height:96px}.meal-breakfast .meal-icon.meal-mascot{width:115px;height:86px}
 .calendar-companion img{width:112px;height:146px}.summary-foot,.data-note,.empty-meal,.energy-legend{font-size:12px}
 .card-head h2,.section-title h2{font-size:18px}.text-btn{font-size:13px}.meal-header{gap:8px}
}
@media(max-width:480px){.meal-header{display:grid;grid-template-columns:100px minmax(0,1fr) auto}.meal-breakfast .meal-icon.meal-mascot{width:100px}.meal-header .add-round{grid-column:2 / 4;justify-self:end;min-height:40px;font-size:13px}.meal-calories{margin:0}.meal-title{min-width:0}.topbar{padding-inline:15px}.top-actions{gap:8px}}
/* Compact account controls and collapsible diary sections. */
.sync-indicator{display:flex;align-items:center;gap:8px;max-width:270px;font-size:13px}
#sync-state[data-state="syncing"]{font-size:0;width:16px;height:16px;border:2px solid var(--line);border-top-color:var(--green);border-radius:50%;animation:sync-spin .8s linear infinite;flex:none}
#sync-state[data-state="offline"],#sync-state[data-state="conflict"],#sync-state[data-state="unavailable"],#sync-state[data-state="pending"]{font-size:12px;color:var(--ink)}
@keyframes sync-spin{to{transform:rotate(360deg)}}
.logout-button{width:38px;height:38px;flex:none}.logout-button svg{width:22px;height:22px}
.right-column .nutrients-card{margin-top:0;padding:24px}.right-column .nutrients-card .card-head{align-items:start}.right-column .nutrients-card h2{font-size:19px;line-height:1.4}.right-column .micro-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:22px 0}.right-column .nutrients-card .soft-icon{display:none}
.meal-title.meal-toggle{background:none;border:0;color:inherit;text-align:left;padding:10px 0;cursor:pointer;flex:1;font:inherit;min-width:0}.meal-toggle:hover strong{color:var(--green)}.meal-toggle:focus-visible{outline:2px solid var(--green);outline-offset:5px;border-radius:4px}.meal-chevron{font-size:16px;margin-left:8px}.meal-toggle p{margin-bottom:0}.meal-body[hidden]{display:none}
@media(max-width:900px){.sync-indicator{max-width:150px;order:3}.sync-indicator:has(#sync-state[hidden]){display:none}.topbar .top-actions{margin-left:auto}.logout-button{width:34px;height:38px}}
@media(prefers-reduced-motion:reduce){#sync-state[data-state="syncing"]{animation:none;border-style:dotted}}
/* Keep text selection and keyboard focus; show an insertion caret only in editors. */
body{caret-color:transparent}input,textarea,[contenteditable="true"]{caret-color:auto}
.monchito-note{padding:16px 18px 20px;overflow:hidden}.monchito-note img{display:block;width:100%;height:130px;object-fit:contain;margin:0 auto 10px}.monchito-note strong{line-height:1.4}.monchito-note p{line-height:1.65;margin-bottom:0}
.monchito-quote{padding:24px;min-height:0;overflow:hidden}.monchito-quote img{display:block;width:100%;height:170px;object-fit:contain;margin:0 auto 14px}.monchito-quote h3{position:relative;margin:0 0 12px}.monchito-quote p{position:relative;margin:0;line-height:1.7}
.meal .meal-icon.meal-mascot{width:168px;height:146px;padding:8px;background:var(--surface-soft,#f3f1e8);border:1px solid var(--line);border-radius:22px;transform:none;overflow:hidden}
.meal .meal-mascot img{width:100%;height:100%;object-fit:contain}
.meal-breakfast .meal-icon.meal-mascot{height:146px}
@media(max-width:900px){.meal .meal-icon.meal-mascot{width:124px;height:120px;padding:6px;border-radius:18px}.meal-header{gap:12px}}
@media(max-width:480px){.meal-header{grid-template-columns:124px minmax(0,1fr) auto}.meal-title strong{font-size:14px}.meal-title p{font-size:12px}.meal-chevron{margin-left:2px}.meal-calories{font-size:14px}.meal .meal-icon.meal-mascot{width:124px;height:120px}.meal-header .add-round{grid-column:2 / 4}.meal{padding-left:14px;padding-right:14px}}
@media(max-width:360px){.meal-header{grid-template-columns:104px minmax(0,1fr) auto}.meal .meal-icon.meal-mascot{width:104px;height:108px}}
@media(max-height:850px) and (min-width:901px){.monchito-note img{height:90px}.monchito-note{padding:10px 14px}.monchito-note p{font-size:12px}.sidebar{overflow-y:auto}.side-bottom{margin-top:auto}}
/* Moderate desktop scale and content-sized search rows. */
@media(min-width:1920px){body{zoom:1.05}}
@media(min-width:2560px){body{zoom:1.15}}
@media(min-width:3200px){body{zoom:1.25}}
#search-results{display:block;overflow-y:auto;overflow-x:hidden;max-height:48vh}
#search-results .product-result{display:grid;grid-template-columns:48px minmax(0,1fr) minmax(90px,120px);gap:12px;align-items:center;height:auto;min-height:100px;flex-shrink:0;padding:15px 4px;overflow:visible}
#search-results .product-result-info{display:block;min-width:0}
#search-results .product-result-info strong{font-size:15px;line-height:1.45;white-space:normal;overflow-wrap:anywhere}
#search-results .product-result-info small{font-size:12px;line-height:1.6;white-space:normal;overflow-wrap:anywhere;margin-top:5px}
#search-results .product-result>span:last-child{font-size:13px;line-height:1.45;white-space:normal;max-width:none;min-width:0}
#search-results .food-thumb{width:46px;height:46px}.modal-tabs .pill{display:inline-flex;align-items:center;gap:7px;font-size:13px;line-height:1.4}.modal-tabs .pill svg{width:18px;height:18px;flex:none}
.meal .meal-icon.meal-mascot{padding:2px}.meal:not(.meal-breakfast) .meal-mascot img{object-fit:contain;transform:scale(1.05)}
@media(max-width:900px){body{zoom:1}.meal:not(.meal-breakfast) .meal-mascot img{transform:scale(1.03)}}
@media(max-width:600px){#search-results .product-result{grid-template-columns:40px minmax(0,1fr);gap:8px 10px;padding:13px 0;min-height:0}#search-results .product-result>span:last-child{grid-column:2;justify-content:flex-start;font-size:12px}#search-results .product-result-info strong{font-size:14px}#search-results .food-thumb{width:40px;height:40px}.modal-tabs .pill{font-size:12px;padding:9px 11px}#search-results{max-height:45vh}}
/* Ingredient builder and the prominent favorite action in the food detail. */
.portion-product{display:flex;align-items:center}.portion-product>div{min-width:0;flex:1}.detail-favorite{display:grid;place-items:center;flex:none;width:48px;height:48px;border-radius:50%;border:1px solid var(--line);background:var(--paper);color:var(--muted);margin-left:auto}.detail-favorite svg{width:25px;height:25px}.detail-favorite.active{color:#d05a5f;background:#fff1f0;border-color:#f4bdc0}.detail-favorite.active svg{fill:currentColor}.detail-data{flex-wrap:wrap}
.recipe-component{display:grid;grid-template-columns:minmax(0,1fr) 100px 42px;align-items:center;gap:10px;border-bottom:1px solid var(--line);padding:10px 0}.recipe-component strong{display:block;line-height:1.4}.recipe-component small{display:block;color:var(--muted);font-size:12px;line-height:1.5;overflow-wrap:anywhere}.recipe-component .form-input{width:100%;min-width:0}.recipe-component .icon-btn{width:40px;height:40px}.recipe-search{margin:18px 0 6px}.recipe-results{max-height:225px;overflow:auto;border:1px solid var(--line);border-radius:12px}.recipe-results:empty{display:none}.recipe-results button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:10px 14px;text-align:left;border-bottom:1px solid var(--line)}.recipe-results button:hover{background:var(--sage)}.recipe-results small{display:block;color:var(--muted);line-height:1.5;font-size:12px}.recipe-results svg{flex:none}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:600px){.recipe-component{grid-template-columns:minmax(0,1fr) 72px 36px;gap:6px}.recipe-component .form-input{padding-inline:6px}.detail-favorite{width:44px;height:44px}}
/* Sage and cocoa light palette. Surfaces stay tinted, leaving the cream mascot distinct. */
:root[data-theme=light]{--bg:#cfd8bc;--paper:#e8e8d5;--ink:#263e32;--muted:#526b55;--green:#315c43;--dark:#274d3b;--sage:#d0dec6;--line:#b0c5ab;--track:#c1d0b4;--surface-soft:#dbe3ca;--subtle-text:#526b55;--on-primary:#f1eedb;color-scheme:light}
[data-theme=light] :is(.sidebar,.card,.meal,.product-card,.stat-card,dialog,.btn.subtle,.search-field,.catalog-controls select,.store-selector select,.catalog-stats>div,.login-card){background:var(--paper);border-color:var(--line);color:var(--ink)}
[data-theme=light] .topbar{background:#dce4cc;border-color:var(--line)}[data-theme=light] .side-note{background:linear-gradient(145deg,#b7cba7,#d7d7b7)}
[data-theme=light] .quote-card{background:#b9cba7;border-color:#a4bb96}[data-theme=light] .quote-card :is(h3,p){color:#2a4938}
[data-theme=light] :is(.form-input,.store-option-body,.product-card>.favorite,.portion-product,.portion-macros>div,.portion-product .food-thumb,.food-thumb,.badge-neutral,.today-btn,.soft-icon,.store-logo,.product-bottom button,.stat-card,.table-section td){background:var(--surface-soft);border-color:var(--line);color:var(--ink)}
[data-theme=light] :is(.catalog-top,.plan-intro){background:linear-gradient(115deg,#c3d3b8,var(--paper))}
[data-theme=light] :is(.product-photo,.info-box,.custom-unit-fields,.plan-macros>div){background:#d8d9b9;border-color:var(--line);color:var(--ink)}
[data-theme=light] :is(.ring-center,.pill.active,.mobile-nav,.product-result:hover,.progress-table tr.today-row){background:var(--paper)}
[data-theme=light] :is(.product-result-info small,.form-help,.source-credit,.data-note,.catalog-credit,.calendar-days,.calendar-legend,.product-card-body>small,.progress-table th,.progress-table td,.nutrition-table th,.nutrition-table td:last-child){color:var(--muted)}
[data-theme=light] :is(.nav-item.active,.mobile-nav>button.active){background:#b6cfaa;color:var(--green)}
[data-theme=light] input::placeholder{color:#69806b;opacity:1}
[data-theme=light] .detail-favorite.active{background:#e5c2b9;color:#9b4248;border-color:#bc8685}
/* Keep actions reachable while scrolling long product and nutrition views. */
dialog .modal-top{position:sticky;top:-28px;z-index:6;background:var(--paper);padding:18px 0 13px;margin-top:-18px;margin-bottom:12px;align-items:center;border-bottom:1px solid var(--line)}
.modal-heading{flex:1;min-width:0}.modal-top .icon-btn{width:38px;height:38px;display:grid;place-items:center;flex:none;border-radius:10px}.modal-quick-add{padding:9px 15px;font-size:14px;flex:none}.modal-top .modal-back{color:var(--green);border:1px solid var(--line);background:var(--surface-soft)}
@media(max-width:600px){dialog .modal-top{top:-22px}.modal-top h2{font-size:17px}.modal-top .eyebrow{font-size:11px}.modal-top .icon-btn{width:34px;height:34px}.modal-quick-add{padding:8px 10px;font-size:12px}}
.analogue-picker{padding:18px;margin:16px 0;border:1px solid #b7a36d;border-radius:13px;background:#e8dfc2;color:#463f2a}.analogue-picker>strong{font-size:16px}.analogue-picker>p{line-height:1.55;margin:7px 0 14px;font-size:14px}.analogue-picker .search-field{margin-top:12px}.analogue-choice{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:10px 12px;text-align:left;border:1px solid var(--line);border-radius:8px;background:var(--paper);margin-top:6px}.analogue-choice:hover,.analogue-choice:focus-visible{border-color:var(--green)}.analogue-choice span{min-width:0;font-weight:650}.analogue-choice small{display:block;color:var(--muted);font-weight:400;font-size:12px}.analogue-choice strong{white-space:nowrap;color:var(--green);font-size:13px}.analogue-results{max-height:230px;overflow:auto}.estimate-selected{display:block;padding:9px 12px;border-radius:8px;background:#c3d6b3;color:#274d35;font-weight:700}.estimate-source{border-color:#baa673!important}
[data-theme=dark] .analogue-picker{background:#373522;color:#f0e7c8;border-color:#716544}[data-theme=dark] .estimate-selected{background:#38543b;color:#d7f0d0}
@media(max-width:480px){.analogue-choice{align-items:flex-start;flex-direction:column}.analogue-choice strong{white-space:normal}}
.monchito-note img{height:170px;transition:opacity .32s ease,transform .32s ease}.monchito-note strong,.monchito-note p{transition:opacity .32s ease}.monchito-note.changing img{opacity:.08;transform:translateY(8px) scale(.96)}.monchito-note.changing strong,.monchito-note.changing p{opacity:.1}.monchito-slide-controls{display:flex;gap:7px;margin-top:14px}.monchito-slide-controls button{width:22px;height:7px;padding:0;border-radius:9px;background:var(--line);transition:width .25s,background .25s}.monchito-slide-controls button.active{width:34px;background:var(--green)}
.login-loading{display:flex;align-items:center;justify-content:center;gap:12px;color:var(--green);font-weight:700;margin:18px auto}.login-loading img{width:46px;height:46px;object-fit:contain;animation:monchito-wait 1.8s ease-in-out infinite}.login-loading[hidden]{display:none}#account-status[hidden]{display:none}@keyframes monchito-wait{0%,100%{transform:translateY(0) rotate(-8deg)}50%{transform:translateY(-7px) rotate(8deg)}}
@media(prefers-reduced-motion:reduce){.login-loading img{animation:none}.monchito-note img,.monchito-note strong,.monchito-note p,.monchito-slide-controls button{transition:none}}
/* Calendar days with entries have a full tinted tile, including unselected days. */
.calendar>button.has-entry:not(.selected){background:#b6d6b7;color:#204b33;font-weight:800;box-shadow:inset 0 0 0 1px #7fa884}.calendar>button.has-entry:not(.selected):after{display:none}.calendar>button.has-entry.today:not(.selected){box-shadow:inset 0 0 0 2px var(--green)}
[data-theme=dark] .calendar>button.has-entry:not(.selected){background:#385d43;color:#e9f3e7;box-shadow:inset 0 0 0 1px #7fb58b}
.energy-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 12px}.energy-legend>span{white-space:nowrap}.energy-legend .dot{width:8px;height:8px}
.progress-legend{flex-wrap:wrap;gap:9px 18px}.progress-legend .dot{width:10px;height:10px}.progress-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.progress-stats .stat-card{padding:18px;min-width:0}.progress-stats .stat-card strong{font-size:23px}
.chart-bar.below{background:linear-gradient(#e8b968,#bb8747)}.chart-bar.near{background:linear-gradient(#91cca0,#4e9662)}.chart-bar.above{background:linear-gradient(#c9a5cf,#8c69a7)}.chart-bar.partial{background:repeating-linear-gradient(135deg,#b4b9a2,#b4b9a2 8px,#899480 8px,#899480 16px)}.chart-bar.empty{background:var(--track)}
.progress-status{display:inline-block;white-space:nowrap;border-radius:30px;padding:5px 9px;font-weight:700;font-size:12px}.progress-status.below{background:#e9d1a2;color:#65441a}.progress-status.near{background:#b8d8b5;color:#275337}.progress-status.above{background:#dac5de;color:#5f426a}.progress-status.partial{background:#d3d0bc;color:#454937}.progress-status.empty{background:var(--surface-soft);color:var(--muted)}
[data-theme=dark] .progress-status.below{background:#51412d;color:#f0d5a2}[data-theme=dark] .progress-status.near{background:#315439;color:#c3eac2}[data-theme=dark] .progress-status.above{background:#493a50;color:#edcdec}[data-theme=dark] .progress-status.partial{background:#454838;color:#dce2ca}
@media(max-width:1200px){.progress-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:580px){.progress-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.progress-stats .stat-card{display:block}.progress-stats .stat-card strong{margin-top:8px;text-align:left}.progress-stats .stat-card small{display:block}.progress-legend{justify-content:flex-start}.energy-legend{gap:4px 7px;font-size:11px}}
@media(max-width:760px){.topbar .breadcrumb{font-size:0;white-space:nowrap;min-width:0}.topbar .breadcrumb::before{font-size:19px;letter-spacing:-.7px;margin-right:0}.topbar{flex-wrap:nowrap;min-height:70px;height:auto;padding-block:9px}.top-actions{margin-left:auto;flex:none}.theme-switch button{width:31px;height:30px}.topbar .tiny{width:32px;height:32px}.logout-button{width:32px;height:36px}.progress-table{overflow:hidden}}
@media(max-width:390px){.topbar .breadcrumb::before{font-size:17px;background-size:38px 38px;padding-left:43px;min-height:40px}.topbar{padding-inline:12px;gap:6px}.top-actions{gap:5px}.theme-switch button{width:27px;height:28px}}

/* Fixed story canvas and compact desktop navigation. */
@media(min-width:901px){
 .sidebar{overflow:hidden;min-height:0}
 .sidebar-brand-row{display:block;min-width:0}
 .sidebar-brand-row .brand{min-width:0;white-space:nowrap}
 .sidebar-control-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:25px 0 14px;min-height:38px}
 .sidebar-control-row .workspace{font-size:10px;letter-spacing:.75px;line-height:1.2;margin:0;min-width:0}
 .sidebar-toggle{flex:none;width:38px;height:36px;border:1px solid var(--line);border-radius:11px;background:var(--surface-soft);color:var(--green);display:grid;place-items:center;cursor:pointer;transition:background .18s ease,transform .18s ease,border-color .18s ease}
 .sidebar-toggle svg{width:19px;height:19px}
 .sidebar-toggle:hover{background:var(--sage);border-color:var(--green)}
 .sidebar-toggle:focus-visible{outline:2px solid var(--green);outline-offset:3px}
 .sidebar nav{flex:none;min-height:0}
 .side-bottom{min-height:0}
 .monchito-note{height:330px;flex:none;display:flex;flex-direction:column;align-items:stretch;padding:12px 14px 14px;margin:14px 0;box-sizing:border-box}
 .monchito-note img{height:176px;max-height:176px;flex:none;object-fit:contain;margin:0 auto 7px}
 .monchito-note strong{height:23px;flex:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .monchito-note p{height:46px;flex:none;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.5;margin:4px 0 8px}
 .monchito-slide-controls{margin-top:auto;flex:none}
 body.sidebar-collapsed .sidebar{width:76px;padding:24px 10px 16px}
 body.sidebar-collapsed .page{margin-left:76px}
 body.sidebar-collapsed .sidebar-control-row{justify-content:center;margin:20px 0 10px}
 body.sidebar-collapsed .sidebar-brand-row .brand{padding:0;justify-content:center}
 body.sidebar-collapsed .sidebar-brand-row .brand span,body.sidebar-collapsed .workspace,body.sidebar-collapsed .nav-item .nav-badge,body.sidebar-collapsed .monchito-note,body.sidebar-collapsed .profile>span:not(.avatar),body.sidebar-collapsed .profile>svg{display:none}
 body.sidebar-collapsed .sidebar-toggle{width:44px;height:40px}
 body.sidebar-collapsed .sidebar-toggle .sidebar-chevron{transform:rotate(180deg);transform-origin:14.5px 12px}
 body.sidebar-collapsed .nav-item,body.sidebar-collapsed .profile{font-size:0;justify-content:center;gap:0;padding:12px 4px;width:100%;min-width:0}
 body.sidebar-collapsed .sidebar nav{margin-top:8px}
 body.sidebar-collapsed .nav-item svg{width:23px;height:23px;flex:none}
 body.sidebar-collapsed .profile .avatar{flex:none}
}
@media(min-width:901px) and (max-height:820px){
 .sidebar{padding-top:18px;padding-bottom:12px}
 .monchito-note{height:clamp(145px,32vh,255px);padding:8px 10px;margin:8px 0}
 .monchito-note img{height:clamp(48px,14vh,115px)}
 .monchito-note p{height:38px;font-size:11px;line-height:1.45;margin:2px 0 4px}
 .monchito-note strong{height:20px;font-size:12px}
 .nav-item{padding-top:8px;padding-bottom:8px;margin-bottom:2px}
}
@media(min-width:901px) and (max-height:620px){.monchito-note{display:none}.side-bottom{margin-top:auto}}
@media(max-width:900px){.sidebar-toggle{display:none}}

/* The diary stays still while a native dialog is open. The dialog owns scrolling. */
html:has(dialog[open]){overflow:hidden}
dialog[open]{overscroll-behavior:contain;scrollbar-gutter:stable}
dialog .modal-top{position:sticky;top:0;margin-top:0;padding-top:8px}
.account-danger{margin-top:23px;padding:18px;border:1px solid #b78d78;border-radius:14px;background:var(--surface-soft);line-height:1.6}
.account-danger h3{font-size:16px}.account-danger p{margin:8px 0 15px}.account-danger .btn{border-color:#a86955;color:#9e4937;white-space:normal;text-align:left}
.account-profile{display:flex;gap:12px;align-items:center}.account-profile p{overflow-wrap:anywhere}

/* Source metadata remains readable, but clearly secondary to product controls. */
#portion-source .provenance,#portion-source .info-box:not(.estimate-source),.provenance,.source-credit,.catalog-credit{font-size:12px;line-height:1.55;color:var(--muted);overflow-wrap:anywhere}
#portion-source .info-box:not(.estimate-source){padding:10px 12px;margin-top:8px;background:var(--surface-soft)}
.provenance summary{font-size:12px;padding:8px 0}.provenance p{margin:5px 0}
#portion-source a,.provenance a,.source-credit a{overflow-wrap:anywhere;text-underline-offset:2px}
.estimate-source{font-size:13px;line-height:1.6}
@media(max-width:760px){
 dialog#modal{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;inset:0;margin:0;padding:env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom));border-radius:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}
 dialog#modal .modal-top{top:0;z-index:9;margin:0 -16px 16px;padding:12px 16px;background:var(--paper)}
 dialog#modal .modal-heading{min-width:0}dialog#modal .modal-top h2{font-size:clamp(16px,4.6vw,20px);overflow-wrap:anywhere}
 dialog#modal .modal-top .icon-btn{min-width:42px;min-height:42px}
 dialog#modal .modal-actions{display:flex;flex-wrap:wrap;justify-content:stretch}
 dialog#modal .modal-actions .btn{white-space:normal;min-height:44px;flex:1 1 145px}
 dialog#modal .modal-meal{flex-wrap:wrap}dialog#modal .modal-meal select{min-width:0}dialog#modal .meal-date-note{white-space:nowrap}
 dialog#modal .store-options{grid-template-columns:repeat(2,minmax(0,1fr))}
 dialog#modal .store-option-body{min-height:64px}dialog#modal .store-option-body>span:nth-child(2){min-width:0}
 dialog#modal .store-option strong,dialog#modal .store-option small{overflow-wrap:anywhere}
 dialog#modal .modal-tabs{position:relative;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin;padding-bottom:10px}
 dialog#modal .modal-tabs .pill{flex:none;white-space:nowrap;min-height:44px}
 dialog#modal #search-results{max-height:none;overflow:visible}
 dialog#modal #search-results .product-result{min-height:74px}
 dialog#modal .source-credit,dialog#modal .catalog-credit,dialog#modal .provenance,dialog#modal #portion-source .info-box:not(.estimate-source){font-size:11.5px;line-height:1.55}
 dialog#login-notice,dialog#sync-conflict{width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:20px;overscroll-behavior:contain}
 .account-gate{padding:calc(20px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom))}
 .login-card{width:100%;padding:24px 18px}.login-card h1{font-size:clamp(25px,7vw,34px)}
 footer{flex-wrap:wrap}footer a{min-height:32px;display:inline-flex;align-items:center}
}
@media(max-width:390px){dialog#modal .store-options{gap:6px}dialog#modal .retailer-logo{width:29px;flex-basis:29px}dialog#modal .store-option-body{padding:8px 5px;gap:5px}dialog#modal .store-option strong{font-size:12px}dialog#modal .store-option small{font-size:11px}}
.account-gate .public-intro{max-width:620px;margin:34px auto 0;text-align:center;color:var(--muted);line-height:1.7}.account-gate .public-intro h2{color:var(--ink);font-size:clamp(19px,3vw,26px)}.account-gate .public-intro a{color:var(--green);text-decoration:underline}.account-gate{grid-template-columns:minmax(0,1fr)}

/* One search across all sources: origin is text, never a retailer logo. */
.unified-food-search{min-height:58px;border-radius:14px;border-color:var(--line);background:var(--paper);box-shadow:0 8px 24px #172e2110}
.unified-food-search input{font-size:clamp(15px,1.1vw,18px);min-width:0}
.catalog-controls{margin:24px 0 12px}.catalog-controls .unified-food-search{width:100%}
.search-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;color:var(--muted);font-size:13px}
.search-toolbar .text-btn{flex-shrink:0}.search-toolbar .text-btn svg{width:16px;height:16px}
.origin-badge{display:inline-flex;width:fit-content;max-width:100%;align-items:center;border:1px solid var(--line);border-radius:999px;padding:3px 9px;color:var(--green);background:var(--sage);font-size:11px;font-weight:750;line-height:1.35;white-space:normal}
.origin-mercadona{background:#e5f2e7;color:#286546;border-color:#add4b7}.origin-carrefour{background:#e7f0f5;color:#335e78;border-color:#b8d3e0}.origin-lidl{background:#eaeaf4;color:#515c83;border-color:#c6c9df}.origin-alcampo{background:#f5e9e3;color:#8a5544;border-color:#e5c8b9}.origin-fast-food{background:#f6eee2;color:#805c39;border-color:#e3d1b4}.origin-eating-out,.origin-recipes{background:#eee9df;color:#645a40;border-color:#d9d0bd}
.product-card-body>.origin-badge{margin:0 0 9px}.product-card-body>small{overflow-wrap:anywhere}
.result-origin{display:flex;align-items:center;gap:6px;flex-wrap:wrap;color:var(--muted);font-size:12px;margin:5px 0}.result-origin>span:not(.origin-badge){overflow-wrap:anywhere}
#search-results .product-result{min-width:0}#search-results .product-result-info{min-width:0}#search-results .product-result-info>small{line-height:1.4}
@media(max-width:760px){.unified-food-search{min-height:52px}.search-toolbar{align-items:flex-start}.search-toolbar .text-btn{white-space:normal;text-align:right;max-width:130px}#search-results .result-origin{font-size:11px}.origin-badge{font-size:10.5px}}
dialog#modal:has(#food-search){height:min(88dvh,780px);overflow:hidden;display:flex;flex-direction:column}
dialog#modal:has(#food-search) #modal-content{display:flex;flex-direction:column;min-height:0;flex:1}
dialog#modal:has(#food-search) #search-results{flex:1;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}
dialog#modal:has(#food-search) .source-credit{flex-shrink:0;margin-top:12px}
dialog#modal:has(#food-search) .modal-actions{flex-shrink:0;margin-top:14px}
@media(max-width:760px){dialog#modal:has(#food-search){height:100dvh;max-height:100dvh}dialog#modal:has(#food-search) #search-results{max-height:none;overflow:auto}}
.catalog-search-actions{display:flex;justify-content:flex-end;margin:0 0 8px}.catalog-search-actions .text-btn{min-height:32px}
.catalog-source-details{margin:30px 0 12px;padding:12px 16px;border:1px solid var(--line);border-radius:10px;color:var(--muted);font-size:12px;line-height:1.55}
.catalog-source-details summary{cursor:pointer;color:var(--ink);font-weight:650}.catalog-source-details p{margin-top:10px}
