:root{font:16px/1.5 system-ui,sans-serif;color:#173b31;background:#f4f6f3}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}header{background:#173c31;color:#fff;display:flex;gap:14px;align-items:center;padding:18px max(24px,calc((100vw - 1050px)/2));min-height:80px}header strong{display:block;font-size:18px}header small{display:block;color:#b8d5c7}.logo{border:1px solid #a6cfbc;border-radius:12px;padding:10px;font-weight:800;letter-spacing:1px}header button{margin-left:auto}main{max-width:1050px;margin:36px auto;padding:0 20px;min-height:70vh}.panel{background:#fff;border:1px solid #dce5df;border-radius:16px;padding:26px;box-shadow:0 8px 26px #173c3109}.login{max-width:470px;margin:0 auto}h1{font-size:30px;margin:6px 0}h2{font-size:22px;margin:0 0 8px}p{margin:8px 0 18px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:2px;color:#36765d}label{display:block;font-size:13px;font-weight:650;margin:14px 0}input,select{display:block;width:100%;margin-top:5px;border:1px solid #b9c9c0;border-radius:8px;padding:11px;background:white;font:inherit;color:#173b31}button{border:0;border-radius:8px;padding:12px 16px;font:inherit;font-weight:650;background:#235b46;color:white;cursor:pointer}button:disabled{opacity:.55;cursor:wait}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #8cc8ab;outline-offset:2px}.login button{width:100%;margin-top:12px}.outline{background:transparent;border:1px solid #a6cfbc}.hint{font-size:12px;color:#596b62;margin:8px 0}.top{display:flex;justify-content:space-between;align-items:center;gap:20px}.top label{min-width:220px}.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin:22px 0}.tile{text-align:left;background:white;color:#173b31;border:1px solid #dce5df;border-radius:12px;padding:18px;min-height:95px}.tile:hover{border-color:#235b46}.tile span{display:block;font-size:12px;color:#65776d;margin-top:8px}.detail{margin-top:20px}.entry{padding:9px 0;border-bottom:1px solid #e6ece8}.entry:last-child{border:0}#status{max-width:800px;margin:15px auto;white-space:pre-wrap;color:#8b352e}footer{text-align:center;color:#65776d;font-size:12px;padding:20px}@media(max-width:600px){header{padding:12px}header strong{font-size:14px}header small{font-size:11px}.top{display:block}main{margin:20px auto}.panel{padding:20px}.tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.tile{padding:12px}h1{font-size:25px}}
.sectionhead,.pager{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.light{background:#edf4ef;color:#235b46;border:1px solid #d5e4d9;padding:8px 13px}.tile.active{border:2px solid #235b46;background:#edf5ef}.entry{display:flex;gap:10px;justify-content:space-between;align-items:center;overflow-wrap:anywhere}.entry .maintext{min-width:0}.entry small,.muted{display:block;color:#596b62;font-size:13px}.value{font-weight:650;text-align:right}.pager{margin-top:16px}.photo{display:block;max-width:100%;width:100%;max-height:380px;object-fit:contain;background:#f0f3ef;border-radius:12px;margin:12px 0}.subsection{border-top:1px solid #e6ece8;padding-top:14px;margin-top:18px}.subsection h3{margin:0 0 8px;font-size:17px}.hist{display:block;padding:10px;border-bottom:1px solid #e6ece8;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}.hist strong{display:block}.detail .entry button{flex-shrink:0}.kv{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.kv>div{border:1px solid #dce5df;border-radius:10px;padding:12px}.kv strong{display:block;font-size:17px}#detailText{font-size:13px;color:#596b62}.searchlabel{margin-top:10px}@media(max-width:600px){.entry{align-items:flex-start}.value{font-size:13px}.detail .entry button{font-size:12px;padding:7px}.pager button{font-size:12px}.detail{padding:14px}}

.edit-status{color:#235b46;font-size:13px;overflow-wrap:anywhere;white-space:pre-wrap}.shopping-edit{border-bottom:1px solid #e6ece8;padding:8px 0}.shopping-edit label{display:flex;align-items:center;gap:12px;margin:3px 0;font-size:15px}.shopping-edit input{width:20px;height:20px;margin:0;accent-color:#235b46}.shopping-edit small{display:block;margin-left:32px}.shopping-edit label:has(input:checked) span{text-decoration:line-through;color:#596b62}
.cost-editor{margin:8px 0 14px;padding:12px;background:#f4f7f4;border:1px solid #d5e4d9;border-radius:10px}.cost-editor summary{cursor:pointer;font-size:14px;font-weight:650;color:#a6d9fc}.history-chart{display:block;width:100%;height:auto;background:#f6faf7;border:1px solid #dce5df;border-radius:8px;margin:12px 0}.cost-editor form{max-width:520px}
/* MRD 0.5 — persistent workspace navigation and kitchen cards. */
:root{color:#19392f;background:#f3f5f2;font:15px/1.5 system-ui,sans-serif}header{position:sticky;top:0;z-index:5;padding:12px 28px;min-height:70px}main{max-width:1500px;margin:26px auto;padding:0 24px}#dashboard{display:grid;grid-template-columns:235px minmax(0,1fr);gap:24px;align-items:start}.sidebar{position:sticky;top:94px;max-height:calc(100vh - 112px);overflow:auto;background:white;border:1px solid #dce5df;border-radius:14px;padding:14px}.side-head{padding:7px 8px 13px}.side-head .eyebrow{letter-spacing:1px;font-size:10px}#navToggle{display:none}.nav-group{margin-top:15px}.nav-label{padding:4px 10px 6px;font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:1px;color:#62776b}.sidebar .tile{display:block;width:100%;min-height:0;border:1px solid transparent;border-radius:8px;padding:10px 11px;font-weight:600;margin:2px 0;background:transparent}.sidebar .tile.active,.sidebar .tile:hover{background:#e8f2ec;border-color:#cddfd2;color:#17553c}.workspace{min-width:0}.top{margin:0 0 20px}.top h1{font-size:28px}.top p{margin:4px 0}.top label{min-width:190px}.welcome-panel{background:#173c31;color:white;border-radius:14px;padding:26px}.welcome-panel .eyebrow{color:#b9daca}.welcome-panel h2{font-size:26px;margin:8px 0}.welcome-panel p{color:#d8e6de;margin:0}.overview-tile{min-height:108px;padding:20px}.detail{margin-top:0;box-shadow:none;padding:24px}.detail .sectionhead h2{font-size:24px}.list-tools{display:flex;gap:7px;justify-content:flex-end;margin-bottom:12px}.list-tools button[aria-pressed=true]{background:#235b46;color:white}.recipe-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:15px}.recipe-card{display:flex;flex-direction:column;align-items:stretch;gap:8px;text-align:left;background:#fff;color:#173b31;border:1px solid #dce5df;border-radius:13px;padding:10px;overflow:hidden}.recipe-card:hover{border-color:#235b46;background:#f9fbf9}.recipe-card strong{font-size:15px;padding:0 4px;overflow-wrap:anywhere}.recipe-card small{color:#64766c;font-size:12px;font-weight:400;padding:0 4px 5px}.card-photo{aspect-ratio:4/3;width:100%;background:#edf1ed;border-radius:8px;display:grid;place-items:center;overflow:hidden;color:#697a6e;font-size:12px}.card-photo img{width:100%;height:100%;object-fit:cover;display:block}.photo{max-height:310px}.cost-delta,.chart-selection{background:#edf4ef;border:1px solid #dce5df;border-radius:8px;padding:10px;font-size:13px}.history-chart circle{cursor:pointer;stroke:transparent;stroke-width:11;paint-order:stroke}.history-chart circle.selected,.history-chart circle:focus{fill:#fff;stroke:#235b46;stroke-width:2.5;outline:none;r:6}.entry{padding:12px 0}#detailText{margin-bottom:14px}.login{margin:30px auto}.panel{border-radius:14px}@media(max-width:850px){main{padding:0 14px;margin:16px auto}#dashboard{grid-template-columns:minmax(0,1fr);gap:14px}.sidebar{position:static;max-height:none;padding:10px}.side-head{display:flex;align-items:center;justify-content:space-between;padding:0 4px 6px}#navToggle{display:block}.nav-group{margin:6px 0}.nav-group .tile{display:inline-block;width:auto;margin:2px;padding:8px}.nav-label{padding:4px 4px}.home-tile{margin-top:4px}.top label{min-width:0}.recipe-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.detail{padding:15px}.welcome-panel{padding:20px}header{padding:12px 14px}.overview-tile{min-height:90px;padding:13px}}@media(max-width:360px){.recipe-grid{grid-template-columns:1fr}.top{display:block}.tiles{grid-template-columns:1fr}}
.side-head{display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap}#navToggle{display:block;font-size:12px;padding:5px 8px}

/* Keep full photos inside their frame, even when image intrinsic size is large. */
.card-photo{position:relative;display:flex;align-items:center;justify-content:center;aspect-ratio:4/3;min-height:0}.card-photo img{position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;object-fit:cover;object-position:center}.create-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:10px 0}.create-tools label{margin:0;display:flex;align-items:center;gap:8px}.create-tools select{margin:0;width:auto}.new-component{display:grid;grid-template-columns:minmax(0,2fr) minmax(80px,1fr) auto auto;gap:8px;align-items:center;margin-bottom:8px}.new-component input,.new-component select{margin:0;min-width:0}@media(max-width:600px){.new-component{grid-template-columns:minmax(0,1fr) 85px auto}.new-component button{grid-column:1/-1}}

.photo-preview{max-height:300px;object-fit:contain;display:block;margin:12px 0}.photo-preview[hidden]{display:none}.cost-editor form button+button{margin-left:8px}
.invoice-line{border:1px solid #d6ded8;border-radius:10px;padding:12px;margin:12px 0;background:#f8faf8}.invoice-line-head{display:flex;justify-content:space-between;align-items:center}.invoice-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}.invoice-confirm{display:flex;align-items:center;gap:8px;margin:16px 0}.invoice-confirm input{width:auto}.invoice-line label{margin:8px 0}

/* Invoice workspace: review data beside the original document. */
.invoice-workspace{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:18px;align-items:start}.invoice-workspace>form{min-width:0}.invoice-workspace>form>.subsection:first-child{margin-top:0;border-top:0;padding-top:0}.invoice-preview{position:sticky;top:88px;border:1px solid #dce5df;border-radius:12px;padding:12px;min-width:0;background:#fff}.invoice-preview h3{margin:0}.invoice-preview .muted{overflow-wrap:anywhere;margin:6px 0 10px}.preview-controls{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-bottom:8px}.preview-controls button{padding:7px 10px;font-size:12px}.preview-body{background:#edf1ed;border:1px solid #dce5df;border-radius:8px;min-height:180px;height:65vh;overflow:auto;padding:8px;font-size:13px;color:#596b62}.preview-body img{width:100%;height:auto;display:block}.preview-body.zoomed img{width:160%;max-width:none}.invoice-line-calc,.invoice-summary{background:#eaf2ed;border-radius:8px;padding:9px;font-size:13px;overflow-wrap:anywhere}.invoice-summary{margin:8px 0}.invoice-ignored{margin:12px 0}.invoice-ignored summary{cursor:pointer;font-weight:650;font-size:13px}.excluded-row{display:flex;gap:6px;justify-content:space-between;align-items:center;padding:6px;font-size:13px}.invoice-line-head{gap:6px;flex-wrap:wrap}.invoice-line-head button{padding:7px 10px;font-size:12px}.invoice-workspace .invoice-fields{grid-template-columns:repeat(auto-fit,minmax(104px,1fr))}.invoice-workspace input,.invoice-workspace select{padding:8px}.invoice-workspace .invoice-line{padding:10px}.invoice-workspace .invoice-line label{font-size:12px}@media(max-width:1100px){.invoice-workspace{grid-template-columns:1fr}.invoice-preview{position:static;grid-row:1}.preview-body{height:42vh}.invoice-workspace>form{grid-row:2}}

.component-picker{display:grid;min-width:0;gap:6px}

.component-dropdown{position:relative;min-width:0}
.component-dropdown>summary{cursor:pointer;padding:9px 10px;border:1px solid #aebfb7;border-radius:7px;background:#fff;overflow-wrap:anywhere}
.component-panel{position:absolute;z-index:5;top:calc(100% + 4px);left:0;width:100%;min-width:min(230px,75vw);padding:8px;background:#fff;border:1px solid #aebfb7;border-radius:7px;box-shadow:0 6px 16px #0f302629}
.component-options{max-height:250px;overflow:auto;margin-top:5px}
.component-options>strong{display:block;padding:7px;font-size:.85em}
.component-options .component-option{display:block;width:100%;text-align:left;color:#16382d;background:#fff;border:0;padding:7px;overflow-wrap:anywhere}
.component-options .component-option:hover,.component-options .component-option:focus,.component-options .component-option[aria-current]{background:#e5efe9}

.recipe-list-cost{display:flex;flex-wrap:wrap;gap:4px 12px;color:#24513f;font-size:.82rem;font-weight:600}.recipe-card .recipe-list-cost{margin-top:5px}.entry .recipe-list-cost{margin-inline:8px}

.mrd-label-tools{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:end;gap:8px;margin:6px 0 12px}
.mrd-label-tools[hidden]{display:none}
.mrd-label-tools label{min-width:145px;margin:0}
.mrd-label-chips{display:flex;flex-wrap:wrap;gap:5px;margin:6px 0}
.mrd-label-chip{display:inline-flex;align-items:center;padding:3px 8px;border:1px solid var(--label-color,#849b90);border-radius:16px;background:var(--label-bg,#edf3ef);color:#16382d;font-size:.81rem;font-weight:600;overflow-wrap:anywhere}
button.mrd-label-chip[aria-pressed=true]{outline:2px solid #16382d;outline-offset:1px}
.mrd-label-tools select{margin:0}
.subsection fieldset:has(.mrd-label-chip){display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;border:1px solid #d5e0d9}
.subsection fieldset:has(.mrd-label-chip) label{display:flex;align-items:center;gap:4px;margin:0}

.mrd-label-chip.mrd-label-initial{display:inline-grid;place-items:center;min-width:1.35rem;height:1.35rem;padding:0 3px;border-radius:50%;line-height:1;font-size:.72rem}

.invoice-delete-dialog{max-width:min(440px,calc(100vw - 32px));border:1px solid #aebfb7;border-radius:12px;padding:20px;color:#18342b}
.invoice-delete-dialog::backdrop{background:#10251c88}
.invoice-delete-dialog input[type=range]{width:100%;margin:12px 0;accent-color:#235b46}

.subsection fieldset:has(.mrd-label-chip) label{display:inline-flex;flex:0 0 auto;min-width:max-content;white-space:nowrap}
.subsection fieldset:has(.mrd-label-chip) input[type=checkbox]{width:auto;margin:0;flex:0 0 auto}
.subsection fieldset:has(.mrd-label-chip) .mrd-label-chip{flex:0 0 auto;white-space:nowrap;overflow-wrap:normal}
.food-sheet-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:6px}
.food-sheet-actions .edit-status:not(:empty){flex-basis:100%}

.food-delete-affected{max-height:40vh;overflow:auto;padding-inline-start:24px}

.entry.food-list-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(7rem,13rem) auto;column-gap:14px;row-gap:4px;align-items:center}
.food-list-values{display:grid;gap:3px;justify-items:end;text-align:right}
.food-list-values .recipe-list-cost{justify-content:flex-end;margin:0}
.food-list-controls{display:flex;align-items:center;justify-content:flex-end;gap:6px;white-space:nowrap}
.food-list-menu{position:relative}
.food-list-menu>summary{cursor:pointer;box-sizing:border-box;padding:8px 10px;border:1px solid #c9ded3;border-radius:6px;background:#edf4ef;color:#194b38;font-size:.81rem;font-weight:650}
.food-list-menu[open]>.food-sheet-actions{position:absolute;z-index:6;inset:auto 0 auto auto;min-width:9rem;margin-top:4px;padding:5px;border:1px solid #c9ded3;border-radius:8px;background:#fff;box-shadow:0 6px 16px #16382d25;display:grid;justify-content:stretch;gap:3px}
.food-list-menu .food-sheet-actions button{text-align:left;white-space:nowrap}
.food-list-row>.edit-status{grid-column:1/-1;text-align:right;margin:0}
.food-list-row>.edit-status:empty{display:none}
.mrd-label-tools{align-items:center}
.mrd-label-tools>label{display:flex;align-items:center;gap:7px;min-width:0}
.mrd-label-tools>label>select{width:auto}
@media(max-width:600px){
 .entry.food-list-row{grid-template-columns:minmax(0,1fr) auto;column-gap:8px}
 .food-list-controls{grid-column:2;grid-row:1/3;align-self:start}
 .food-list-values{grid-column:1;justify-items:start;text-align:left}
 .food-list-values .recipe-list-cost{justify-content:flex-start}
 .food-list-row>.edit-status{text-align:left}
}

button.invoice-item-link{width:100%;margin:0;border:0;border-bottom:1px solid #e6ece8;border-radius:4px;background:transparent;color:inherit;text-align:left;padding-inline:5px}
button.invoice-item-link:hover,button.invoice-item-link:focus-visible{background:#edf4ef;color:#194b38}
button.invoice-item-link .maintext strong{text-decoration:underline;text-underline-offset:2px}

.food-usage-groups section+section{margin-top:10px}.food-usage-groups h4{margin:4px 0}.food-usage-groups ul{margin:4px 0;padding-inline-start:18px}.food-usage-groups li{margin:4px 0}.food-usage-groups button{padding:4px 7px;text-align:left}.food-delete-affected:has(.food-usage-groups){padding-inline-start:0}

.mrd-edit-icon{font-size:1.04rem;line-height:1;font-family:system-ui,sans-serif}
button.mrd-edit-pencil{display:inline-grid;place-items:center;vertical-align:middle;min-width:30px;min-height:30px;padding:4px;margin-inline-start:8px}
.mrd-edit-summary>.mrd-edit-icon{margin-inline:3px 7px}
button.mrd-section-edit{display:inline-flex;align-items:center;gap:7px;background:transparent;color:inherit;padding:0;border:0;text-align:left;font:inherit}
button.mrd-section-edit:hover{text-decoration:underline}
.mrd-edit-popup{width:min(500px,calc(100vw - 32px));max-height:85vh;overflow:auto;box-sizing:border-box;border:1px solid #aebfb7;border-radius:12px;padding:20px;color:#18342b}
.mrd-edit-popup::backdrop{background:#10251c88}
.mrd-edit-popup-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.mrd-edit-popup-head h3{margin:0}
.mrd-edit-popup fieldset:has(.mrd-label-chip){display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;border:1px solid #d5e0d9}
.mrd-edit-popup fieldset:has(.mrd-label-chip) label{display:inline-flex;align-items:center;gap:4px;margin:0;white-space:nowrap}
.mrd-edit-popup fieldset:has(.mrd-label-chip) input[type=checkbox]{width:auto;margin:0}
.mrd-edit-popup input[type=color]{height:38px;max-width:90px}

.mrd-label-choice{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.mrd-edit-popup fieldset:has(.mrd-label-chip) .mrd-label-choice button{white-space:nowrap}.cost-editor[hidden]{display:none}

.entry .mrd-ingredient-supplier,.entry .mrd-ingredient-updated{font-size:.74rem;font-weight:400;color:#64776d}.entry .mrd-ingredient-supplier{margin-top:3px}

.invoice-new-product{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin-top:8px}.invoice-new-product label{margin:0}.invoice-new-product[hidden]{display:none}

.food-usage-detail .food-usage-groups ul{display:flex;flex-wrap:wrap;gap:6px;list-style:none;padding-inline-start:0}
.food-usage-detail .food-usage-groups li{display:flex;flex-direction:column;align-items:flex-start;min-width:0;max-width:100%;margin:0;padding:4px 8px;border:1px solid #d5e3d9;border-radius:8px;background:#eaf2ed;overflow-wrap:anywhere}
.food-usage-detail .food-usage-groups button{max-width:100%;padding:0;border:0;background:transparent;color:inherit;font-weight:700}
.food-usage-detail .food-usage-groups button:hover{text-decoration:underline}
.food-usage-detail .food-usage-groups li small{margin:0}

.shopping-card-tile{display:flex;flex-direction:column;gap:6px;min-width:0}.shopping-card-tile .recipe-card{flex:1}.shopping-list-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0}.shopping-print-frame{position:fixed;inset:auto 0 0 auto;width:1px;height:1px;border:0;opacity:0;pointer-events:none}

/* MRD interface theme */
:root{
 --canvas:#f5f6f8;--surface:#fff;--surface-subtle:#f2f4f7;
 --ink:#202832;--secondary:#566370;--line:#dce1e7;--accent:#245985;
 --accent-hover:#19476f;--accent-soft:#e8f0f8;--focus:#6995c1;
 font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
 color:var(--ink);background:var(--canvas);accent-color:var(--accent);
}
body>header{
 background:#ffffffec;color:var(--ink);border-bottom:1px solid var(--line);
 backdrop-filter:blur(16px);min-height:64px;
}
body>header strong{font-size:16px;letter-spacing:-.02em}
body>header small,.muted,.hint,.tile span,body>footer,.recipe-card small,
.mrd-ingredient-supplier,.mrd-ingredient-updated,.nav-label{color:var(--secondary)}
.logo{background:var(--accent-soft);color:var(--accent);border:0;border-radius:12px;padding:8px 10px;letter-spacing:.03em}
.eyebrow,.nav-label{letter-spacing:.075em;color:var(--secondary);font-weight:650}
h1,h2,h3{letter-spacing:-.025em}
.top h1{font-size:clamp(25px,3vw,34px);line-height:1.15}
#dashboard{gap:20px}
.sidebar,.panel{background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 6px 26px #152b4510}
.sidebar{top:84px;max-height:calc(100vh - 100px)}
.sidebar .tile,.tile,.recipe-card{color:var(--ink)}
.sidebar .tile:hover{background:var(--surface-subtle);border-color:transparent;color:var(--ink)}
.sidebar .tile.active{background:var(--accent-soft);border-color:transparent;color:var(--accent)}
.welcome-panel{
 background:linear-gradient(120deg,#fff 25%,#edf3fa);border:1px solid var(--line);
 color:var(--ink);padding:clamp(18px,3vw,32px);border-radius:20px;
}
.welcome-panel .eyebrow,.welcome-panel p{color:var(--secondary)}
.welcome-panel h2{font-size:clamp(23px,3vw,31px);line-height:1.15}
.overview-tile,.recipe-card{border:1px solid var(--line);border-radius:15px;background:var(--surface)}
.overview-tile{min-height:84px}
.overview-tile:hover,.recipe-card:hover{border-color:var(--focus);background:#f8fbff}
.entry,.hist,.subsection{border-color:var(--line)}
input,select,textarea{
 color:var(--ink);background:var(--surface);border-color:#b9c3cf;border-radius:10px;
}
button{border-radius:10px;background:var(--accent)}
button.light,.outline,.food-list-menu>summary{
 background:var(--surface-subtle);color:var(--ink);border-color:var(--line);
}
button.light:not(:disabled):hover,.outline:not(:disabled):hover,.food-list-menu>summary:hover{
 background:var(--accent-soft);color:var(--accent);
}
.list-tools button[aria-pressed=true]{background:var(--accent);color:white}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{
 outline:2px solid var(--focus);outline-offset:2px;
}
.cost-editor,.invoice-summary,.invoice-ignored,.chart-selection,.cost-delta,.preview-body,.card-photo,
.food-usage-detail .food-usage-groups li{background:var(--surface-subtle);border-color:var(--line)}
.invoice-preview,.invoice-line,.component-panel,.component-options,.invoice-fields,.invoice-new-product,
dialog{border-color:var(--line)}
dialog{background:var(--surface);color:var(--ink);border-radius:18px}
dialog::backdrop{background:#20283266}
.history-chart circle.selected,.history-chart circle:focus{stroke:var(--accent)}
@media(max-width:850px){
 #dashboard{gap:14px}
 .sidebar{max-height:none;top:auto}
}
@media(min-width:851px){
 .detail{padding:clamp(22px,3vw,34px)}
}

/* MRD interaction motion */
:root{--mrd-ease-out:cubic-bezier(.2,.72,.24,1);--mrd-motion-fast:150ms}
button:not(.recipe-card):not(.tile):not(.light):not(.outline):not(.workspace-search-clear):not(.shopping-deadline-open):not(.mrd-mobile-tab):not(:disabled):hover{
 background-color:var(--accent-hover);
}
@media (prefers-reduced-motion:no-preference){
 button,.food-list-menu>summary{
  transition:background-color var(--mrd-motion-fast) ease,color var(--mrd-motion-fast) ease,
   border-color var(--mrd-motion-fast) ease,box-shadow var(--mrd-motion-fast) ease,
   transform var(--mrd-motion-fast) var(--mrd-ease-out);
 }
 input,select,textarea{
  transition:border-color var(--mrd-motion-fast) ease,box-shadow var(--mrd-motion-fast) ease;
 }
 .sectionhead :is(button,input,select),.sidebar .tile{transition-duration:130ms}
 .tile:not(:disabled):active,.recipe-card:not(:disabled):active,button:not(:disabled):active{
  transform:scale(.985);
 }
 @media (hover:hover) and (pointer:fine){
  .overview-tile:not(:active):hover,.recipe-card:not(:active):hover{
   transform:translateY(-2px);box-shadow:0 6px 16px #152b4517;
  }
 }
 #overview:not([hidden]) .welcome-panel,.detail:not([hidden])>.sectionhead{
  animation:mrd-panel-enter 220ms var(--mrd-ease-out) both;
 }
 dialog[open]{animation:mrd-dialog-enter 200ms var(--mrd-ease-out) both}
 dialog[open]::backdrop{animation:mrd-backdrop-enter 180ms ease-out both}
 @keyframes mrd-panel-enter{
  from{opacity:0;transform:translateY(5px)}
  to{opacity:1;transform:translateY(0)}
 }
 @keyframes mrd-dialog-enter{
  from{opacity:0;scale:.98}
  to{opacity:1;scale:1}
 }
 @keyframes mrd-backdrop-enter{
  from{opacity:0}
  to{opacity:1}
 }
}
@media print{
 button,.detail>.sectionhead,dialog,.welcome-panel{animation:none!important;transition:none!important}
}

/* Phone workspace */
.mrd-mobile-tabs{display:none}
.welcome-panel{background:linear-gradient(125deg,#fff 15%,#edf3fc 72%,#eeebf7)}
@media(max-width:700px){
 body>header{padding:10px 12px;min-height:56px;gap:8px}
 body>header strong{font-size:clamp(12px,3.8vw,16px)}
 body>header small{font-size:11px}
 body>header button{font-size:12px;padding:8px;min-height:44px}
 body>main{padding-inline:12px;padding-bottom:calc(80px + env(safe-area-inset-bottom))}
 #dashboard{grid-template-columns:minmax(0,1fr)}
 #dashboard .sidebar{padding:8px;border-radius:16px}
 .sidebar button,#dashboard .list-tools button,.food-list-controls button,
 .food-list-menu>summary,.shopping-list-actions button{min-height:44px}
 #dashboard .top{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
 #dashboard .top label{min-width:0;margin:4px 0}
 .welcome-panel{padding:18px;border-radius:20px}
 .tiles{gap:8px;margin:12px 0;grid-template-columns:repeat(2,minmax(0,1fr))}
 .overview-tile{min-height:65px;padding:12px;overflow-wrap:anywhere}
 .overview-tile span{display:none}
 .detail{padding:14px}
 .sectionhead{flex-wrap:wrap;gap:8px}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px}
 .food-list-controls{flex-wrap:wrap}
 .food-list-row,.food-list-values,.shopping-card-tile{min-width:0;overflow-wrap:anywhere}
 dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
 .mrd-mobile-tabs{
  position:fixed;z-index:20;display:flex;gap:3px;inset:auto 10px calc(7px + env(safe-area-inset-bottom)) 10px;
  padding:4px;background:#ffffffed;border:1px solid var(--line);border-radius:18px;
  box-shadow:0 6px 24px #152b4526;backdrop-filter:blur(16px);
 }
 .mrd-mobile-tabs .mrd-mobile-tab{
  flex:1 1 0;min-width:0;min-height:46px;padding:4px 2px;background:transparent;
  color:var(--secondary);font-size:clamp(10px,3vw,13px);line-height:1.15;
 }
 .mrd-mobile-tabs .mrd-mobile-tab[aria-current=page]{background:var(--accent-soft);color:var(--accent);font-weight:750}
 .mrd-mobile-tabs .mrd-mobile-tab:not(:disabled):hover{background:var(--surface-subtle);color:var(--accent)}
}
@media print{.mrd-mobile-tabs{display:none!important}}

html.mrd-phone-preview body>header{padding:10px 12px;min-height:56px;gap:8px}
html.mrd-phone-preview body>header strong{font-size:clamp(12px,3.8vw,16px)}
html.mrd-phone-preview body>header small{font-size:11px}
html.mrd-phone-preview body>header button{font-size:12px;padding:8px;min-height:44px}
html.mrd-phone-preview body>main{padding-inline:12px;padding-bottom:calc(80px + env(safe-area-inset-bottom))}
html.mrd-phone-preview #dashboard{grid-template-columns:minmax(0,1fr)}
html.mrd-phone-preview #dashboard .sidebar{padding:8px;border-radius:16px}
html.mrd-phone-preview .sidebar button,html.mrd-phone-preview #dashboard .list-tools button,html.mrd-phone-preview .food-list-controls button,html.mrd-phone-preview .food-list-menu>summary,html.mrd-phone-preview .shopping-list-actions button{min-height:44px}
html.mrd-phone-preview #dashboard .top{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
html.mrd-phone-preview #dashboard .top label{min-width:0;margin:4px 0}
html.mrd-phone-preview .welcome-panel{padding:18px;border-radius:20px}
html.mrd-phone-preview .tiles{gap:8px;margin:12px 0;grid-template-columns:repeat(2,minmax(0,1fr))}
html.mrd-phone-preview .overview-tile{min-height:65px;padding:12px;overflow-wrap:anywhere}
html.mrd-phone-preview .overview-tile span{display:none}
html.mrd-phone-preview .detail{padding:14px}
html.mrd-phone-preview .sectionhead{flex-wrap:wrap;gap:8px}
html.mrd-phone-preview input:not([type=checkbox]):not([type=radio]),html.mrd-phone-preview select,html.mrd-phone-preview textarea{font-size:16px}
html.mrd-phone-preview .food-list-controls{flex-wrap:wrap}
html.mrd-phone-preview .food-list-row,html.mrd-phone-preview .food-list-values,html.mrd-phone-preview .shopping-card-tile{min-width:0;overflow-wrap:anywhere}
html.mrd-phone-preview dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
html.mrd-phone-preview .mrd-mobile-tabs{
  position:fixed;z-index:20;display:flex;gap:3px;inset:auto 10px calc(7px + env(safe-area-inset-bottom)) 10px;
  padding:4px;background:#ffffffed;border:1px solid var(--line);border-radius:18px;
  box-shadow:0 6px 24px #152b4526;backdrop-filter:blur(16px);
 }
html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab{
  flex:1 1 0;min-width:0;min-height:46px;padding:4px 2px;background:transparent;
  color:var(--secondary);font-size:clamp(10px,3vw,13px);line-height:1.15;
 }
html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab[aria-current=page]{background:var(--accent-soft);color:var(--accent);font-weight:750}
html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab:not(:disabled):hover{background:var(--surface-subtle);color:var(--accent)}


.mrd-mobile-tabs,html.mrd-phone-preview .mrd-mobile-tabs{
 background:linear-gradient(120deg,#263d73,#3c507f);
 border-color:#465b88;box-shadow:0 10px 24px #17285035;
}
.mrd-mobile-tabs .mrd-mobile-tab,html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab{
 display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;color:#e3eaf8;
}
.mrd-mobile-tab svg{
 width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.55;
 stroke-linecap:round;stroke-linejoin:round;
}
.mrd-mobile-tabs .mrd-mobile-tab[aria-current=page],html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab[aria-current=page]{background:#ffffff24;color:#fff}
.mrd-mobile-tabs .mrd-mobile-tab:not(:disabled):hover,html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab:not(:disabled):hover{background:#ffffff24;color:#fff}
.mrd-mobile-tabs .mrd-mobile-tab-main svg,html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab-main svg{
 box-sizing:content-box;padding:5px;border-radius:50%;background:#e8efff;color:#294171;
}
.mrd-mobile-menu{width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 26px);padding:16px}
.mrd-mobile-menu button{display:block;width:100%;margin-top:6px;min-height:44px;text-align:left}
@media screen and (min-width:701px){
 html.mrd-phone-preview{background:#e9edf6}
 html.mrd-phone-preview body{max-width:420px;min-height:100dvh;margin:0 auto;background:var(--canvas);box-shadow:0 0 45px #182f4926}
 html.mrd-phone-preview .mrd-mobile-tabs{width:calc(100% - 24px);max-width:396px;left:50%;right:auto;translate:-50% 0}
}


/* Night blue phone */
@media screen{
html{background:#101831}
body{--canvas:#101831;--surface:#1a2549;--surface-subtle:#222f59;--ink:#f2f5ff;--secondary:#b8c5e1;--line:#364775;--accent:#4267df;--accent-hover:#3455c2;--accent-soft:#2a3f77;--focus:#9eb5ff;background:var(--canvas);color:var(--ink)}
body>header{background:#141e3bf5;border-color:var(--line);color:var(--ink)}
.logo{background:#263e77;color:#dce7ff}
.sidebar,.panel,.overview-tile,.recipe-card,dialog{background:var(--surface);color:var(--ink);border-color:var(--line);box-shadow:none}
.welcome-panel{background:linear-gradient(125deg,#243464,#192548);color:var(--ink);border-color:var(--line)}
.sidebar .tile,.tile,.recipe-card,.overview-tile{color:var(--ink)}
.sidebar .tile.active,.sidebar .tile:hover,.overview-tile:hover,.recipe-card:hover{background:#253765;color:#edf2ff;border-color:#516599}
input,select,textarea{background:#141f3e;color:var(--ink);border-color:#52638b;color-scheme:dark}
input::placeholder,textarea::placeholder{color:#a5b2ce}
.history-chart{background:#141f3e;border-color:var(--line)}
.history-chart .history-curve{stroke:#59aafa;stroke-linecap:round;stroke-linejoin:round}
.history-chart circle{fill:#59aafa}
.history-chart circle.selected,.history-chart circle:focus{fill:#f2f5ff;stroke:#59aafa}
.mrd-mobile-tabs{background:#1b2850f5;border-color:#3b4e82;box-shadow:0 10px 24px #080f3170}
.mrd-mobile-tabs .mrd-mobile-tab[aria-current=page]{background:#3456ba;color:#fff}
.mrd-mobile-tabs .mrd-mobile-tab-main svg{background:#476ae0;color:#fff}
.mrd-mobile-menu button,.food-list-menu>summary{background:var(--surface-subtle);color:var(--ink)}
.invoice-line,.invoice-preview,.invoice-fields,.invoice-new-product,.component-panel,.component-options,.invoice-summary,.invoice-ignored{background:var(--surface);border-color:var(--line);color:var(--ink)}
.component-option,.component-picker summary,.food-usage-detail .food-usage-groups button,.invoice-item-link{color:var(--ink)}
.component-option:hover,.component-option:focus-visible{background:var(--surface-subtle);color:var(--ink)}
.mrd-label-chip{color:#24304f}
.recipe-list-cost,.food-list-values,.edit-status{color:var(--ink)}
}
@media screen{
html.mrd-phone-preview{background:#33436c}
html.mrd-phone-preview body{--canvas:#101831;--surface:#1a2549;--surface-subtle:#222f59;--ink:#f2f5ff;--secondary:#b8c5e1;--line:#364775;--accent:#4267df;--accent-hover:#3455c2;--accent-soft:#2a3f77;--focus:#9eb5ff;background:var(--canvas);color:var(--ink)}
html.mrd-phone-preview body>header{background:#141e3bf5;border-color:var(--line);color:var(--ink)}
html.mrd-phone-preview .logo{background:#263e77;color:#dce7ff}
html.mrd-phone-preview .sidebar,html.mrd-phone-preview .panel,html.mrd-phone-preview .overview-tile,html.mrd-phone-preview .recipe-card,html.mrd-phone-preview dialog{background:var(--surface);color:var(--ink);border-color:var(--line);box-shadow:none}
html.mrd-phone-preview .welcome-panel{background:linear-gradient(125deg,#243464,#192548);color:var(--ink);border-color:var(--line)}
html.mrd-phone-preview .sidebar .tile,html.mrd-phone-preview .tile,html.mrd-phone-preview .recipe-card,html.mrd-phone-preview .overview-tile{color:var(--ink)}
html.mrd-phone-preview .sidebar .tile.active,html.mrd-phone-preview .sidebar .tile:hover,html.mrd-phone-preview .overview-tile:hover,html.mrd-phone-preview .recipe-card:hover{background:#253765;color:#edf2ff;border-color:#516599}
html.mrd-phone-preview input,html.mrd-phone-preview select,html.mrd-phone-preview textarea{background:#141f3e;color:var(--ink);border-color:#52638b;color-scheme:dark}
html.mrd-phone-preview input::placeholder,html.mrd-phone-preview textarea::placeholder{color:#a5b2ce}
html.mrd-phone-preview .history-chart{background:#141f3e;border-color:var(--line)}
html.mrd-phone-preview .history-chart .history-curve{stroke:#59aafa;stroke-linecap:round;stroke-linejoin:round}
html.mrd-phone-preview .history-chart circle{fill:#59aafa}
html.mrd-phone-preview .history-chart circle.selected,html.mrd-phone-preview .history-chart circle:focus{fill:#f2f5ff;stroke:#59aafa}
html.mrd-phone-preview .mrd-mobile-tabs{background:#1b2850f5;border-color:#3b4e82;box-shadow:0 10px 24px #080f3170}
html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab[aria-current=page]{background:#3456ba;color:#fff}
html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab-main svg{background:#476ae0;color:#fff}
html.mrd-phone-preview .mrd-mobile-menu button,html.mrd-phone-preview .food-list-menu>summary{background:var(--surface-subtle);color:var(--ink)}
html.mrd-phone-preview .invoice-line,html.mrd-phone-preview .invoice-preview,html.mrd-phone-preview .invoice-fields,html.mrd-phone-preview .invoice-new-product,html.mrd-phone-preview .component-panel,html.mrd-phone-preview .component-options,html.mrd-phone-preview .invoice-summary,html.mrd-phone-preview .invoice-ignored{background:var(--surface);border-color:var(--line);color:var(--ink)}
html.mrd-phone-preview .component-option,html.mrd-phone-preview .component-picker summary,html.mrd-phone-preview .food-usage-detail .food-usage-groups button,html.mrd-phone-preview .invoice-item-link{color:var(--ink)}
html.mrd-phone-preview .component-option:hover,html.mrd-phone-preview .component-option:focus-visible{background:var(--surface-subtle);color:var(--ink)}
html.mrd-phone-preview .mrd-label-chip{color:#24304f}
html.mrd-phone-preview .recipe-list-cost,html.mrd-phone-preview .food-list-values,html.mrd-phone-preview .edit-status{color:var(--ink)}
}

@media screen{
 body{color-scheme:dark;--accent:#3759cb;--accent-hover:#2c4cb6}
 body>header small,.muted,.hint,.eyebrow,.nav-label,.tile span,.recipe-card small,
 .mrd-ingredient-supplier,.mrd-ingredient-updated,.welcome-panel p,.welcome-panel .eyebrow,
 body>footer{color:var(--secondary)}
 .logo{color:#dce7ff}
 .panel,.sidebar,.overview-tile,.recipe-card{border-radius:16px}
 .overview-tile:hover,.recipe-card:hover{box-shadow:0 10px 24px #080f3170}
 .entry,.hist,.subsection,fieldset{border-color:var(--line)}
 .food-usage-detail .food-usage-groups li,.chart-selection,.cost-delta,.cost-editor,
 .shopping-item,.card-photo,.preview-body,.mrd-edit-popup fieldset:has(.mrd-label-chip){
  background:var(--surface-subtle);color:var(--ink);border-color:var(--line);
 }
 button.light,.outline{background:var(--surface-subtle);color:var(--ink);border-color:var(--line)}
 button.light:not(:disabled):hover,.outline:not(:disabled):hover{background:var(--accent-soft);color:var(--ink)}
 #status{color:#ffb6ad}
 a,.mrd-edit-pencil,.mrd-edit-icon{color:#b4c8ff}
}

/* Use the bottom bar as the only phone navigation. */
html.mrd-phone-preview #dashboard>.sidebar{display:none}
@media (max-width:700px){#dashboard>.sidebar{display:none}}

.workspace-account{display:flex;align-items:end;gap:8px;flex-wrap:wrap}.workspace-account label{margin:0}.workspace-account button{min-height:44px}.sidebar{top:16px;max-height:calc(100vh - 32px)}
@media (max-width:850px){.sidebar{max-height:none}}

.mrd-module-switcher{display:inline-flex;flex-wrap:wrap;gap:4px;padding:4px;margin:0 0 10px;background:var(--surface-subtle);border:1px solid var(--line);border-radius:14px}.mrd-module-switcher:empty,.mrd-module-switcher:has(+ #searchWrap[hidden]){display:none}.mrd-module-switcher button.light{min-height:44px;background:transparent;border-color:transparent}.mrd-module-switcher button.light[aria-pressed=true],.mrd-module-switcher button.light[aria-pressed=true]:hover{background:var(--accent);color:white}

.shopping-deadline{margin:12px 0;padding:14px 16px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink)}.shopping-deadline-clock{display:block;color:var(--secondary);font-size:.84rem;margin-bottom:5px}.shopping-deadline-copy{display:flex;gap:6px 12px;align-items:baseline;flex-wrap:wrap}.shopping-deadline-copy h3,.shopping-deadline-copy p{margin:0}.shopping-deadline-copy time{color:inherit;font-size:.88rem}.shopping-deadline-count{margin-inline-start:auto}.shopping-deadline[data-urgency=soon]{background:#382d26;border-color:#926647;color:#ffe0b0}.shopping-deadline[data-urgency=urgent]{background:#4b2534;border-color:#ba6577;color:#ffdce1}.shopping-deadline[data-urgency]:not([data-urgency=normal]) .shopping-deadline-clock{color:inherit}.shopping-deadline-settings .edit-status:empty{display:none}.shopping-deadline-settings{margin-bottom:12px}

.shopping-deadline{position:relative}.shopping-deadline .shopping-deadline-open,.shopping-deadline .shopping-deadline-open:not(:disabled):hover{position:absolute;inset:0;width:100%;height:100%;background:transparent;transform:none}

/* Translucent mobile navigation */
@media screen{
 .mrd-mobile-tabs,html.mrd-phone-preview .mrd-mobile-tabs{
  background:#243458;border:1px solid #aebfe04d;
  border-radius:24px;
  box-shadow:inset 0 1px 0 #ffffff24,0 8px 26px #080f3170;
 }
 @supports (backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px)){
  .mrd-mobile-tabs,html.mrd-phone-preview .mrd-mobile-tabs{
   background:linear-gradient(140deg,#52699575,#17264ca8),#18264468;
   -webkit-backdrop-filter:blur(18px) saturate(145%);
   backdrop-filter:blur(18px) saturate(145%);
  }
 }
}
@media (prefers-reduced-transparency:reduce){
 .mrd-mobile-tabs,html.mrd-phone-preview .mrd-mobile-tabs{
  background:#243458;-webkit-backdrop-filter:none;backdrop-filter:none;
 }
}

#dashboard .top:has(.workspace-account){display:none}.mrd-settings-account{display:flex;align-items:end;gap:8px;flex-wrap:wrap;margin:0 0 12px}.mrd-settings-account label{flex:1 1 155px;margin:0}.mrd-settings-account button{min-height:44px}.mrd-mobile-tabs,html.mrd-phone-preview .mrd-mobile-tabs{border-radius:999px;padding:5px 8px}.mrd-mobile-tabs .mrd-mobile-tab,html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab{border-radius:999px}

@media screen{
 html,html.mrd-phone-preview{background:#101831}
 body,html.mrd-phone-preview body{min-height:100vh;min-height:100dvh;background:var(--canvas)}
}

/* MRD screen typography */
@media screen{
 :root{
  --mrd-font:"Avenir Next",Bahnschrift,"Segoe UI Variable",Roboto,system-ui,sans-serif;
  font-family:var(--mrd-font);
 }
 body,button,input,select,textarea{font-family:var(--mrd-font)}
 h1,h2,h3{letter-spacing:-.02em;font-weight:650}
 .eyebrow,.nav-label{letter-spacing:.11em}
 .mrd-mobile-tab{letter-spacing:.015em}
 .value,.food-list-values,.recipe-list-cost,.shopping-deadline-clock,.shopping-deadline-count,
 .chart-selection{font-variant-numeric:tabular-nums}
}

.shopping-deadline{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:14px;padding:14px 18px}.shopping-deadline .shopping-clock-face{min-width:0}.shopping-deadline .shopping-deadline-clock{font-size:clamp(2rem,7vw,3.8rem);line-height:1;font-weight:650;letter-spacing:-.06em;margin:0 0 4px;color:inherit}.shopping-clock-date{font-size:.82rem;color:inherit}.shopping-deadline .shopping-deadline-copy{display:grid;justify-items:end;gap:2px;text-align:right}.shopping-deadline .shopping-deadline-copy h3{font-size:.95rem}.shopping-deadline .shopping-deadline-count{margin:0;font-size:clamp(1rem,3.8vw,1.35rem)}.shopping-deadline .shopping-deadline-copy p{font-size:.85rem}@media(max-width:350px){.shopping-deadline{gap:7px;padding:12px}.shopping-clock-date{font-size:.75rem}}

.shopping-dashboard-gauge{display:block;width:min(100%,165px);height:auto;margin:0 auto 4px;overflow:visible}.shopping-clock-face:has(.shopping-dashboard-gauge){text-align:center}.shopping-clock-face:has(.shopping-dashboard-gauge) .shopping-deadline-clock{font-size:clamp(1rem,3vw,1.35rem);letter-spacing:0;margin-bottom:1px}.shopping-dashboard-gauge path{fill:none;stroke-width:6}.shopping-gauge-normal{stroke:#53c3a6}.shopping-gauge-soon{stroke:#f5bc67}.shopping-gauge-urgent{stroke:#fa7f90}.shopping-gauge-tick{stroke:currentColor;opacity:.5;stroke-width:1.5}.shopping-gauge-needle{stroke:currentColor;stroke-width:3;stroke-linecap:round}.shopping-gauge-hub{fill:currentColor}

.workspace-menu-toggle,.workspace-menu-toggle:not(:disabled):hover{display:grid;place-items:center;width:44px;height:44px;padding:0;margin:0 0 6px;background:transparent;color:var(--ink)}.workspace-menu-toggle:not(:disabled):hover{background:var(--surface-subtle)}.workspace-menu-lines,.workspace-menu-lines::before,.workspace-menu-lines::after{display:block;width:17px;height:2px;border-radius:4px;background:currentColor}.workspace-menu-lines{position:relative}.workspace-menu-lines::before,.workspace-menu-lines::after{position:absolute;left:0;content:""}.workspace-menu-lines::before{top:-5px}.workspace-menu-lines::after{top:5px}

/* Dark dashboard inspired by the mobile reference */
.history-area-top{stop-color:#269af0;stop-opacity:.32}
.history-area-bottom{stop-color:#269af0;stop-opacity:0}
.history-area{pointer-events:none}
@media screen{
 html,html.mrd-phone-preview{background:#0e1524}
 body,html.mrd-phone-preview body{
  --canvas:#0e1524;--surface:#141d2e;--surface-subtle:#202b3e;
  --ink:#f2f5fc;--secondary:#b1bed0;--line:#2c3a50;
  --accent:#176aa1;--accent-hover:#155987;--accent-soft:#172f4a;--focus:#63bef5;
  background:var(--canvas);color:var(--ink);
 }
 .welcome-panel,.panel,.sidebar,.overview-tile,.recipe-card,.shopping-deadline,
 html.mrd-phone-preview .panel,html.mrd-phone-preview .sidebar,
 html.mrd-phone-preview .overview-tile,html.mrd-phone-preview .recipe-card{
  box-shadow:none;border-color:var(--line);
 }
 input,select,textarea,html.mrd-phone-preview input,html.mrd-phone-preview select,html.mrd-phone-preview textarea{
  background:#101a2a;border-color:#485b74;color:var(--ink);
 }
 .workspace-menu-toggle{border-radius:50%;border:1px solid var(--line);background:var(--surface-subtle)}
 .mrd-module-switcher{background:transparent}
 .mrd-module-switcher button.light[aria-pressed=true],
 .mrd-module-switcher button.light[aria-pressed=true]:hover{background:var(--accent-soft);color:#92d2fc}
 .history-chart,html.mrd-phone-preview .history-chart{background:#101a2a;border-color:var(--line)}
 .history-chart .history-curve,html.mrd-phone-preview .history-chart .history-curve{
  stroke:#45aef8;stroke-linecap:round;stroke-linejoin:round;
 }
 .history-chart circle,html.mrd-phone-preview .history-chart circle{fill:#63bef5}
 .history-chart circle.selected,.history-chart circle:focus,
 html.mrd-phone-preview .history-chart circle.selected,html.mrd-phone-preview .history-chart circle:focus{
  fill:#edf7ff;stroke:#45aef8;
 }
 .mrd-mobile-tabs,html.mrd-phone-preview .mrd-mobile-tabs{
  background:#263248ed;border-color:#a5bdd84a;box-shadow:0 6px 24px #02070f70;
 }
 .mrd-mobile-tabs .mrd-mobile-tab[aria-current=page],
 html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab[aria-current=page]{
  background:#10243e;color:#b1deff;
 }
 .mrd-mobile-tabs .mrd-mobile-tab-main svg,
 html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab-main svg{background:#173651;color:#9bd3fc}
}
@media screen{
 @supports (backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px)){
  .mrd-mobile-tabs,html.mrd-phone-preview .mrd-mobile-tabs{
   background:#2b384ebd;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
  }
 }
}

@media (prefers-reduced-transparency:reduce){.mrd-mobile-tabs,html.mrd-phone-preview .mrd-mobile-tabs{background:#263248;-webkit-backdrop-filter:none;backdrop-filter:none}}

.overview-module-icon{width:24px;height:24px;vertical-align:middle;margin-inline-end:5px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
@media screen and (max-width:700px){#dashboard .detail{background:transparent;border:0;box-shadow:none;padding:8px 0}}
html.mrd-phone-preview #dashboard .detail{background:transparent;border:0;box-shadow:none;padding:8px 0}
@media screen and (max-width:700px){#overviewTiles{display:grid;grid-template-columns:1fr;gap:0;margin:16px 0}}
html.mrd-phone-preview #overviewTiles{display:grid;grid-template-columns:1fr;gap:0;margin:16px 0}
@media screen and (max-width:700px){#overviewTiles .overview-tile,#overviewTiles .overview-tile:hover{display:flex;align-items:center;gap:12px;width:100%;min-height:54px;padding:8px 4px;background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;color:var(--ink);box-shadow:none;transform:none}}
html.mrd-phone-preview #overviewTiles .overview-tile,html.mrd-phone-preview #overviewTiles .overview-tile:hover{display:flex;align-items:center;gap:12px;width:100%;min-height:54px;padding:8px 4px;background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;color:var(--ink);box-shadow:none;transform:none}
@media screen and (max-width:700px){#overviewTiles .overview-tile::after{content:"›";margin-inline-start:auto;color:var(--secondary);font-size:1.15rem}}
html.mrd-phone-preview #overviewTiles .overview-tile::after{content:"›";margin-inline-start:auto;color:var(--secondary);font-size:1.15rem}
@media screen and (max-width:700px){.overview-module-icon{display:block;width:34px;height:34px;flex:none;padding:8px;border-radius:50%;background:#172d47;color:#8dccf7}}
html.mrd-phone-preview .overview-module-icon{display:block;width:34px;height:34px;flex:none;padding:8px;border-radius:50%;background:#172d47;color:#8dccf7}
@media screen and (max-width:700px){.mrd-mobile-tabs{padding:3px 4px;box-shadow:0 6px 24px #02070f52}}
html.mrd-phone-preview .mrd-mobile-tabs{padding:3px 4px;box-shadow:0 6px 24px #02070f52}
@media screen and (max-width:700px){.mrd-mobile-tabs .mrd-mobile-tab{min-height:46px}}
html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab{min-height:46px}
@media screen and (max-width:700px){.mrd-mobile-tabs .mrd-mobile-tab-main svg{background:transparent;color:currentColor;padding:0;border-radius:0}}
html.mrd-phone-preview .mrd-mobile-tabs .mrd-mobile-tab-main svg{background:transparent;color:currentColor;padding:0;border-radius:0}
@media screen and (max-width:700px){.history-chart{background:transparent;border:0;border-radius:0;margin:6px 0}}
html.mrd-phone-preview .history-chart{background:transparent;border:0;border-radius:0;margin:6px 0}
@media screen and (max-width:700px){.recipe-card{border-color:#314055}}
html.mrd-phone-preview .recipe-card{border-color:#314055}

.workspace-tools{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.workspace-tools .workspace-menu-toggle{margin:0}.workspace-search-icon{position:relative;width:14px;height:14px;border:2px solid currentColor;border-radius:50%;margin:0 3px 3px 0}.workspace-search-icon::after{content:"";position:absolute;width:7px;height:2px;border-radius:3px;background:currentColor;transform:rotate(45deg);right:-5px;bottom:-3px}.workspace-search-dialog{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}.workspace-search-results{display:grid;gap:4px}.workspace-search-result{display:flex;flex-direction:column;align-items:flex-start;text-align:left;overflow-wrap:anywhere;min-height:44px}.workspace-search-result small{color:var(--secondary)}

.workspace-search-dialog{
 position:fixed;inset:0 0 0 auto;margin:0;width:min(460px,100%);height:100vh;height:100dvh;
 max-width:100%;max-height:none;box-sizing:border-box;border-radius:20px 0 0 20px;
 padding:16px;background:var(--canvas);overflow:auto;
}
.workspace-search-head{display:flex;align-items:center;gap:8px;position:sticky;top:0;z-index:1;background:var(--canvas);padding:4px 0 8px}
.workspace-search-head input{margin:0;border-radius:999px;min-height:44px;background:var(--surface-subtle);font-size:16px}
.workspace-search-back{flex:none;width:44px;height:44px;padding:0;border-radius:50%;font-size:1.2rem}
.workspace-search-dialog>p:empty{display:none}
.workspace-search-section{padding:10px 0 4px}
.workspace-search-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.workspace-search-section-head h3{margin:0;font-size:1rem}
.workspace-search-section p{margin:6px 0}
.workspace-search-chips{display:flex;gap:6px;flex-wrap:wrap}
.workspace-search-chip{min-height:40px;padding:6px 12px;max-width:100%;overflow-wrap:anywhere}
.workspace-search-dialog .workspace-search-result{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:10px;padding:9px 5px;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0}
.workspace-search-result-text{display:grid;min-width:0}
.search-price-down{color:#ff9bad;flex:none}.search-price-up{color:#82dbb4;flex:none}
@media(min-width:701px){html.mrd-phone-preview .workspace-search-dialog{right:max(0px,calc((100vw - 420px)/2));width:420px}}
@media(max-width:700px){.workspace-search-dialog{border-radius:0}}
@media(prefers-reduced-motion:no-preference){
 .workspace-search-dialog[open]{animation:mrd-search-slide 240ms var(--mrd-ease-out) both}
 @keyframes mrd-search-slide{from{transform:translateX(100%);opacity:.85}to{transform:translateX(0);opacity:1}}
}

.workspace-search-dialog .workspace-search-result{border-bottom:0}
.workspace-drawer{
 position:fixed;inset:0 auto 0 0;margin:0;width:min(440px,100%);height:100vh;height:100dvh;
 max-width:100%;max-height:none;box-sizing:border-box;border-radius:0 20px 20px 0;
 padding:16px;background:var(--canvas);overflow:auto;
}
.workspace-drawer-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.workspace-drawer-head>.workspace-search-back{min-width:44px}
.workspace-drawer-bell{position:relative;display:grid;place-items:center}
.workspace-drawer-bell svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.workspace-drawer-bell.has-notices::after{content:"";position:absolute;top:6px;right:6px;width:8px;height:8px;border-radius:50%;background:#ff899d}
.workspace-drawer-account{display:flex;align-items:center;gap:12px;padding:8px 0 14px}
.workspace-drawer-account h2{margin:0}
.workspace-drawer-avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:var(--accent-soft);color:#b1deff;font-weight:700}
.workspace-drawer-group{margin:10px 0;padding:13px;border-radius:18px;background:linear-gradient(130deg,var(--surface-subtle),var(--surface))}
.workspace-drawer-group h3{margin:0 0 4px;font-size:1rem}
.workspace-drawer-group .workspace-drawer-item{display:flex;min-height:44px;align-items:center;gap:8px;width:100%;text-align:left;background:transparent;border:0}
.workspace-drawer-group .workspace-drawer-item:not(:disabled):hover{background:var(--accent-soft)}
.workspace-drawer-group .workspace-notice{display:grid;gap:1px}
.workspace-notice span,.workspace-notice small{color:var(--secondary)}
.workspace-notice small:empty{display:none}
@media(min-width:701px){html.mrd-phone-preview .workspace-drawer{left:max(0px,calc((100vw - 420px)/2));width:420px}}
@media(max-width:700px){.workspace-drawer{border-radius:0}}
@media(prefers-reduced-motion:no-preference){
 .workspace-drawer[open]{animation:mrd-drawer-slide 240ms var(--mrd-ease-out) both}
 @keyframes mrd-drawer-slide{from{transform:translateX(-100%);opacity:.85}to{transform:translateX(0);opacity:1}}
}

/* Readable type for the dark drawers */
@media screen{
 .mrd-edit-popup.workspace-drawer,.mrd-edit-popup.workspace-search-dialog{
  --drawer-text:#f2f5fc;
  --drawer-muted:#becadc;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Variable","Segoe UI",Roboto,system-ui,sans-serif;
  color:var(--drawer-text);
 }
 .workspace-drawer h2,.workspace-drawer h3,.workspace-search-dialog h2,.workspace-search-dialog h3{
  color:var(--drawer-text);font-weight:650;letter-spacing:-.01em;line-height:1.28;
 }
 .workspace-drawer-account h2{font-size:1.25rem}
 .workspace-drawer-group h3,.workspace-search-section-head h3{font-size:1rem}
 .workspace-drawer .workspace-drawer-item,.workspace-search-dialog .workspace-search-result,
 .workspace-search-dialog .workspace-search-chip,.workspace-drawer-head button,.workspace-search-head button{
  font-family:inherit;color:var(--drawer-text);font-size:1rem;font-weight:550;line-height:1.32;
 }
 .workspace-drawer .workspace-drawer-item strong,.workspace-search-result strong{color:inherit;font-weight:650}
 .workspace-drawer p,.workspace-drawer small,.workspace-notice span,.workspace-search-dialog p,.workspace-search-dialog small{
  color:var(--drawer-muted);font-size:.875rem;line-height:1.45;
 }
 .workspace-search-head input{font-family:inherit;color:var(--drawer-text)}
 .workspace-search-head input::placeholder{color:var(--drawer-muted);opacity:1}
}

.workspace-drawer-bell.has-notices::after{
 top:4px;right:4px;width:10px;height:10px;
 background:#ff253b;border:1px solid #ff7b86;box-shadow:0 0 0 2px var(--surface);
}
@media (prefers-reduced-motion:no-preference){
 .workspace-drawer-bell.has-notices svg{
  transform-origin:50% 19%;animation:mrd-bell-ring 3.8s ease-in-out infinite;
 }
 @keyframes mrd-bell-ring{
  0%,24%,100%{transform:rotate(0)}
  4%{transform:rotate(21deg)}
  8%{transform:rotate(-19deg)}
  12%{transform:rotate(14deg)}
  16%{transform:rotate(-11deg)}
  20%{transform:rotate(6deg)}
 }
}

/* Edge-to-edge phone canvas with a safe inset for device cutouts. */
@media screen{
 html,html.mrd-phone-preview{background:#0e1524}
 html.mrd-phone-preview body{background:#0e1524;margin-block:0;min-height:100vh;min-height:100dvh}
 html.mrd-phone-preview body>main{margin-block:0;padding-top:max(22px,calc(env(safe-area-inset-top,0px) + 10px))}
}
@media screen and (max-width:700px){
 body{background:#0e1524;margin:0;min-height:100vh;min-height:100dvh}
 body>main{
  margin-block:0;padding-top:max(22px,calc(env(safe-area-inset-top,0px) + 10px));
  padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px));
 }
}
.workspace-drawer,.workspace-search-dialog{
 padding-top:max(16px,calc(env(safe-area-inset-top,0px) + 10px));
 padding-bottom:max(16px,calc(env(safe-area-inset-bottom,0px) + 8px));
}

#detailText:empty{display:none}

.mrd-label-chip,html.mrd-phone-preview .mrd-label-chip{background:#172f4a;color:#c3e3fb;border-color:#41698d}.mrd-label-chip:is(button):not(:disabled):hover,html.mrd-phone-preview .mrd-label-chip:is(button):not(:disabled):hover{background:#214868;color:#f2f8ff}.mrd-label-chip:is(button)[aria-pressed=true]{outline-color:var(--focus)}

.workspace-search-dialog .workspace-search-result{justify-content:flex-start}.workspace-search-thumb{display:block;width:40px;height:40px;border-radius:10px;overflow:hidden;flex:none;background:var(--surface-subtle)}.workspace-search-thumb img{display:block;width:100%;height:100%;object-fit:cover}.workspace-search-chip[aria-pressed=true]{background:var(--accent-soft);color:#c3e3fb;border-color:var(--focus)}

.workspace-search-dialog .workspace-search-head input,
.workspace-search-dialog .workspace-search-chip{border-radius:999px}
.workspace-search-dialog .workspace-search-chip{padding-inline:14px}
.workspace-search-dialog .workspace-search-clear,
.workspace-search-dialog .workspace-search-clear:not(:disabled):hover,
.workspace-search-dialog .workspace-search-clear:active{
 color:#47b8ff;background:transparent;border:0;border-radius:999px;box-shadow:none;
 padding:6px 4px;min-height:44px;font-weight:650;transform:none;
}
.workspace-search-dialog .workspace-search-clear,.workspace-search-dialog .workspace-search-clear:not(:disabled):hover,.workspace-search-dialog .workspace-search-clear:active{text-decoration:none;color:#47b8ff}

.workspace-search-dialog .workspace-search-clear,.workspace-search-dialog .workspace-search-clear:not(:disabled):active{transition:none;animation:none;transform:none;-webkit-tap-highlight-color:transparent}

.mrd-inline-editor{margin:8px 0 12px;padding:8px 0;border-top:1px solid var(--line);background:transparent}.mrd-inline-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.mrd-inline-head h3{margin:0 auto 0 0}.mrd-inline-value-host:has(>.mrd-inline-value){display:inline-flex;align-items:center;gap:6px;max-width:100%}.mrd-inline-value{display:inline-flex;align-items:center;width:min(12rem,55vw);margin:0}.mrd-inline-value input{margin:0;padding:7px 9px;min-width:0}.mrd-inline-editor .cost-delta{background:transparent;padding:0;border:0}.mrd-inline-editor p:empty{display:none}.mrd-visually-hidden{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

.shopping-deadline{--deadline-ring:#73cafa}
.shopping-deadline[data-urgency=soon]{--deadline-ring:#f8bc6f}
.shopping-deadline[data-urgency=urgent]{--deadline-ring:#ff5b73}
.shopping-deadline button.shopping-deadline-open,
.shopping-deadline button.shopping-deadline-open:not(:disabled):is(:hover,:active,:focus-visible){
 background:transparent;box-shadow:none;outline:0;transform:none;
 -webkit-tap-highlight-color:transparent;
}
.shopping-deadline:has(.shopping-deadline-open:is(:active,:focus-visible)){
 box-shadow:0 0 0 2px var(--deadline-ring);
}
@media (hover:hover) and (pointer:fine){
 .shopping-deadline:has(.shopping-deadline-open:hover){box-shadow:0 0 0 2px var(--deadline-ring)}
}
@media (prefers-reduced-motion:no-preference){
 .shopping-deadline{transition:box-shadow 130ms ease-out}
}

.mrd-mobile-tabs button.mrd-mobile-tab,
.mrd-mobile-tabs button.mrd-mobile-tab:is(:hover,:active,[aria-current=page]),
html.mrd-phone-preview .mrd-mobile-tabs button.mrd-mobile-tab,
html.mrd-phone-preview .mrd-mobile-tabs button.mrd-mobile-tab:is(:hover,:active,[aria-current=page]){
 background:transparent;color:#dce7f6;box-shadow:none;transform:none;
}
.mrd-mobile-tabs button.mrd-mobile-tab svg,
html.mrd-phone-preview .mrd-mobile-tabs button.mrd-mobile-tab svg{
 background:transparent;color:#dce7f6;padding:0;
}
.mrd-mobile-tabs button.mrd-mobile-tab[aria-current=page] svg,
html.mrd-phone-preview .mrd-mobile-tabs button.mrd-mobile-tab[aria-current=page] svg{
 color:#50baff;stroke-width:1.9;
}
@media (prefers-reduced-motion:no-preference){
 .mrd-mobile-tabs .mrd-mobile-tab svg{transition:color 130ms ease-out}
}

.mrd-mobile-tabs button.mrd-mobile-tab[aria-current="page"],
.mrd-mobile-tabs button.mrd-mobile-tab[aria-current="page"]:is(:hover,:active),
html.mrd-phone-preview .mrd-mobile-tabs button.mrd-mobile-tab[aria-current="page"],
html.mrd-phone-preview .mrd-mobile-tabs button.mrd-mobile-tab[aria-current="page"]:is(:hover,:active){
 background:var(--canvas);box-shadow:none;
}

.food-list-row.food-recipe-list-row{grid-template-columns:minmax(0,1fr) auto}
.food-recipe-list-row>.food-list-controls{grid-row:1;grid-column:2;align-self:start;padding-top:1px}
.food-recipe-list-row .food-sheet-actions{display:flex;gap:4px;padding:0}
.food-recipe-list-row .food-list-open,
.food-recipe-list-row .food-list-open:not(:disabled):hover,
.food-recipe-list-row .food-list-open:not(:disabled):active{
 display:grid;gap:3px;text-align:start;padding:5px 2px;background:transparent;color:var(--ink);border:0;transform:none;
}
.food-recipe-list-row .food-list-open:hover .maintext strong{color:#a6d9fc}
.food-recipe-list-row .food-list-open .food-list-values{justify-items:start;text-align:start}
.food-recipe-list-row .food-action-icon{
 display:grid;place-items:center;min-width:40px;min-height:44px;padding:7px;
 background:transparent;border:0;color:#a6d9fc;
}
.food-recipe-list-row .food-action-delete,.food-recipe-list-row .food-action-delete:not(:disabled):hover{color:#ff737f}
.food-recipe-list-row .food-action-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}

.workspace-drawer .workspace-drawer-account,.workspace-drawer .workspace-drawer-account:not(:disabled):hover{
 display:flex;align-items:center;width:100%;gap:12px;padding:8px 0 14px;text-align:start;
 background:transparent;color:var(--drawer-text,var(--ink));border:0;transform:none;
}
.workspace-drawer-account .workspace-drawer-avatar{flex:none;width:50px;height:50px;border:1px solid #476789;background:#111e33}
.workspace-drawer-account-text{display:grid;min-width:0;gap:3px;overflow-wrap:anywhere;line-height:1.3}
.workspace-drawer-account-text strong{font-size:clamp(1rem,4vw,1.15rem);font-weight:650}
.workspace-drawer-account-arrow{flex:none;margin-inline-start:auto;color:var(--drawer-muted,var(--secondary));font-size:1.35rem}

.mrd-confirm-dialog{width:min(380px,calc(100vw - 28px));padding:20px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:20px}
.mrd-confirm-dialog h3{margin:0 0 16px;color:inherit;font-size:1.04rem;line-height:1.45}
.mrd-confirm-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.mrd-confirm-actions button{min-height:44px}
.mrd-confirm-actions .mrd-confirm-danger,.mrd-confirm-actions .mrd-confirm-danger:not(:disabled):hover{background:#a7374c;color:#fff}

.mrd-profile-screen{
 width:min(440px,calc(100vw - 24px));height:min(720px,calc(100dvh - 24px));max-height:none;
 background:var(--canvas);color:var(--ink);border-color:var(--line);border-radius:24px;
 padding:16px;box-sizing:border-box;overflow:auto;
}
.mrd-profile-head{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;text-align:center;gap:8px}
.mrd-profile-head h2{color:inherit;font-size:1.04rem;line-height:1.3;margin:0}
.mrd-profile-identity{display:grid;justify-items:center;gap:3px;text-align:center;margin:clamp(24px,8vh,64px) 0 22px;overflow-wrap:anywhere}
.mrd-profile-avatar{display:grid;place-items:center;width:60px;height:60px;border-radius:50%;border:1px solid #536e8e;color:#a6d9fc;background:#101b2c;margin-bottom:8px}
.mrd-profile-identity strong{font-size:1.12rem;font-weight:650}
.mrd-profile-identity small{color:var(--secondary);font-size:.875rem}
.mrd-profile-group{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:8px 12px;margin:14px 0}
.mrd-profile-group .mrd-profile-item,.mrd-profile-group .mrd-profile-item:not(:disabled):hover{
 display:flex;align-items:center;gap:10px;width:100%;min-height:50px;
 padding:5px 3px;text-align:left;background:transparent;color:var(--ink);border:0;
}
.mrd-profile-group .mrd-profile-item:not(:disabled):hover .mrd-profile-item-icon{background:var(--accent-soft)}
.mrd-profile-item-icon{display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:50%;background:var(--surface-subtle);color:#b7cde5}
.mrd-profile-item-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.mrd-profile-arrow{margin-inline-start:auto;color:var(--secondary)}
.mrd-profile-logout{display:block;margin:16px auto;min-height:44px}
@media(max-width:700px){
 .mrd-profile-screen{inset:0;margin:0;width:100%;height:100vh;height:100dvh;max-width:none;border:0;border-radius:0;padding-top:max(18px,calc(env(safe-area-inset-top,0px) + 10px));padding-bottom:max(18px,calc(env(safe-area-inset-bottom,0px) + 8px))}
}
html.mrd-phone-preview .mrd-profile-screen{width:min(420px,100%);height:100dvh;border-radius:0;margin:auto;padding-top:max(18px,calc(env(safe-area-inset-top,0px) + 10px))}

.mrd-module-switcher{gap:16px;padding:0;background:transparent;border:0;border-radius:0}
.mrd-module-switcher button.light[aria-pressed],
.mrd-module-switcher button.light[aria-pressed]:is(:hover,:active),
#listTools button.light[aria-pressed],
#listTools button.light[aria-pressed]:is(:hover,:active){
 min-height:44px;background:transparent;color:#aab8ca;border:0;border-bottom:3px solid transparent;
 border-radius:0;padding:7px 2px;box-shadow:none;transform:none;font-weight:650;
}
.mrd-module-switcher button.light[aria-pressed]{font-size:clamp(1rem,4vw,1.22rem)}
.mrd-module-switcher button.light[aria-pressed=true],
.mrd-module-switcher button.light[aria-pressed=true]:is(:hover,:active),
#listTools button.light[aria-pressed=true],
#listTools button.light[aria-pressed=true]:is(:hover,:active){
 color:#fff;border-bottom-color:#30adfa;
}

#detail:has(.mrd-module-switcher:not(:empty) + #searchWrap:not([hidden])) #detailTitle{display:none}
#detail:has(.mrd-module-switcher:not(:empty) + #searchWrap:not([hidden])) .sectionhead:not(:has(>button:not([hidden]))){display:none}
.named-employee-settings output{display:block;color:#a6d9fc;font-size:1.05rem;font-variant-numeric:tabular-nums;margin:8px 0}

.mrd-profile-avatar,.workspace-drawer-account .workspace-drawer-avatar{border:2px solid #8bd1ff}

.mrd-chat-bubble,.mrd-chat-bubble:not(:disabled):hover,.mrd-chat-bubble:not(:disabled):active{
 position:fixed;z-index:19;display:grid;place-items:center;width:52px;height:52px;padding:0;
 border:1px solid #8cc9f1;border-radius:50%;background:#213e5e;color:#bce9ff;
 box-shadow:0 6px 18px #02070f66;touch-action:none;transform:none;
}
.mrd-chat-bubble svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.mrd-chat-bubble.is-dragging{cursor:grabbing}
@media (prefers-reduced-motion:no-preference){.mrd-chat-bubble:not(.is-dragging){transition:left 160ms ease-out,top 160ms ease-out}}
.mrd-team-chat{
 width:min(440px,calc(100vw - 24px));height:min(600px,calc(100dvh - 26px));
 max-height:none;padding:14px;box-sizing:border-box;
 border:1px solid var(--line);border-radius:20px;background:var(--canvas);color:var(--ink);
}
.mrd-team-chat[open]{display:flex;flex-direction:column;gap:8px}
.mrd-team-chat-head{display:flex;align-items:center;justify-content:space-between;gap:6px}
.mrd-team-chat-head h2{color:inherit;margin:0;font-size:1.1rem}
.mrd-team-chat-scroll{overflow:auto;flex:1;min-height:0;overscroll-behavior:contain}
.mrd-team-chat-scroll>button{margin:0 auto 8px;display:block}
.mrd-team-chat-messages{display:flex;flex-direction:column;gap:8px;padding:4px}
.mrd-chat-message{align-self:flex-start;border-radius:14px;padding:8px 11px;background:var(--surface-subtle);max-width:85%;overflow-wrap:anywhere}
.mrd-chat-own{align-self:flex-end;background:#183c5e}
.mrd-chat-message p{margin:3px 0;white-space:pre-wrap}
.mrd-chat-message strong,.mrd-chat-message time{font-size:.77rem;color:#c5d6e9}
.mrd-team-chat>p{margin:0}
.mrd-team-chat>p:empty{display:none}
.mrd-team-chat-compose{display:flex;gap:8px;align-items:end}
.mrd-team-chat-compose textarea{width:100%;margin:0;resize:vertical;font-size:16px}
.mrd-team-chat-compose button{min-height:44px}
@media(max-width:700px){.mrd-team-chat{inset:auto 0 0;margin:0 auto;width:100%;max-width:none;padding-bottom:max(12px,env(safe-area-inset-bottom,0px))}}
@media print{.mrd-chat-bubble,.mrd-team-chat{display:none!important}}

.staff-profile-row{border-top:1px solid var(--line);padding:8px 0}
.staff-profile-head{display:flex;justify-content:space-between}
.staff-profile-head h3{margin:0;color:var(--ink);font-size:1rem}
.staff-profile-row p{margin:4px 0 8px}
.mrd-birthday-popup{width:min(380px,calc(100vw - 24px));border-radius:24px;padding:20px;background:var(--surface);color:var(--ink)}
.mrd-birthday-popup h2{color:inherit}
.mrd-chat-bubble,.mrd-chat-bubble:not(:disabled):hover,.mrd-chat-bubble:not(:disabled):active{
 background:transparent;border:0;box-shadow:none;
}
.mrd-chat-bubble::before,.mrd-chat-bubble::after{content:"";position:absolute;inset:0;pointer-events:none}
.mrd-chat-bubble::before{
 border:1px solid #abe3ffbb;border-radius:50%;
 background:radial-gradient(ellipse at 34% 20%,#c2f0ff95 0%,#62bbf956 25%,#21476cd9 69%,#132941ef);
 box-shadow:inset 0 1px 5px #d5f3ff88,inset 0 -7px 12px #11274580,0 6px 18px #02070f66;
}
.mrd-chat-bubble::after{
 inset:7px 12px auto 10px;height:7px;border-radius:50%;
 background:linear-gradient(90deg,transparent,#e1faffaf,transparent);transform:rotate(-25deg);
}
.mrd-chat-bubble svg{position:absolute;inset:0;margin:auto;z-index:1;filter:drop-shadow(0 1px 2px #12283f)}
@supports (backdrop-filter:blur(1px)){
 .mrd-chat-bubble::before{backdrop-filter:blur(10px) saturate(145%)}
}
@media (prefers-reduced-motion:no-preference){
 .mrd-chat-bubble:not(.is-dragging){transition:left 240ms cubic-bezier(.2,.75,.22,1),top 240ms cubic-bezier(.2,.75,.22,1)}
 .mrd-chat-bubble:where(:not(.is-dragging,.is-settling,.is-popping,.is-holding,.is-growing))::before{animation:mrd-chat-water 4.8s ease-in-out infinite}
 .mrd-chat-bubble.is-dragging::before{transform:scale(1.09,.94);border-radius:48% 52% 56% 44%}
 .mrd-chat-bubble.is-settling::before{animation:mrd-chat-drop 420ms ease-out}
 @keyframes mrd-chat-water{
  0%,100%{border-radius:50%;transform:scale(1)}
  55%{border-radius:53% 47% 50% 50% / 49% 53% 47% 51%;transform:scale(1.025,.98)}
 }
 @keyframes mrd-chat-drop{
  0%{transform:scale(1.09,.94)}
  35%{transform:scale(.94,1.08)}
  68%{transform:scale(1.04,.97)}
  100%{transform:scale(1)}
 }
}
@media (prefers-reduced-transparency:reduce){.mrd-chat-bubble::before{background:#213e5e;backdrop-filter:none}}

@media (prefers-reduced-motion:no-preference){
 :is(.workspace-tools,.workspace-drawer-head,.workspace-search-head,.mrd-profile-head,.sectionhead) button:not(:disabled){
  transition:transform 150ms var(--mrd-ease-out),background-color 130ms ease,color 130ms ease;
 }
 :is(.workspace-tools,.workspace-drawer-head,.workspace-search-head,.mrd-profile-head,.sectionhead) button:not(:disabled):active{
  transform:scale(1.09);
 }
}

@media (prefers-reduced-motion:no-preference){
 .workspace-tools .workspace-menu-toggle,
 .workspace-drawer-head button,
 .mrd-profile-head button,
 .workspace-search-head .workspace-search-back{
  transition:transform 150ms cubic-bezier(.2,.72,.24,1);
 }
 .workspace-tools .workspace-menu-toggle:not(:disabled):active,
 .workspace-drawer-head button:not(:disabled):active,
 .mrd-profile-head button:not(:disabled):active,
 .workspace-search-head .workspace-search-back:not(:disabled):active{
  transform:scale(1.11);
 }
}

.mrd-chat-bubble{-webkit-touch-callout:none;user-select:none}
.mrd-chat-particles{position:absolute;inset:0;pointer-events:none}
.mrd-chat-particles i{position:absolute;top:50%;left:50%;width:13px;height:22px;margin:-11px 0 0 -6px;opacity:0;
 background:linear-gradient(105deg,#386caa,#77bef0 72%,#d2f2ff);clip-path:polygon(0 0,80% 8%,100% 57%,79% 100%,18% 76%,44% 43%)}
.mrd-chat-particles i:nth-child(3n){width:18px;height:13px;clip-path:polygon(0 12%,100% 0,73% 53%,93% 95%,35% 75%)}
.mrd-chat-particles i:nth-child(3n+1){width:9px;height:18px;clip-path:polygon(0 0,97% 19%,53% 100%,29% 61%,0 72%)}
.mrd-chat-bubble[data-dock=left] .mrd-chat-particles i{left:0}
.mrd-chat-bubble[data-dock=right] .mrd-chat-particles i{left:100%}
.mrd-chat-bubble.is-popping::before,.mrd-chat-bubble.is-popping::after,.mrd-chat-bubble.is-popping svg{opacity:0}
@media (prefers-reduced-motion:no-preference){
 .mrd-chat-bubble.is-holding:not(.is-popping)::before{animation:mrd-chat-hold var(--hold-time) linear forwards}
 .mrd-chat-bubble.is-popping::before{animation:mrd-chat-burst 95ms ease-out both}
 .mrd-chat-bubble.is-popping .mrd-chat-particles i{animation:mrd-chat-fragments 650ms 45ms linear both}
 .mrd-chat-bubble.is-growing::before,.mrd-chat-bubble.is-growing::after,.mrd-chat-bubble.is-growing svg{animation:mrd-chat-return 390ms cubic-bezier(.14,.75,.32,1) both}
 @keyframes mrd-chat-hold{from{transform:scale(1)}to{transform:scale(2.1)}}
 @keyframes mrd-chat-burst{0%{opacity:1;transform:scale(2.1)}45%{opacity:1;transform:scale(2.27)}100%{opacity:0;transform:scale(2.45)}}
 @keyframes mrd-chat-fragments{
  0%{opacity:0;transform:translate(var(--sx),var(--sy)) rotate(var(--angle))}
  2%{opacity:1}
  40%{transform:translate(var(--mx),var(--my)) rotate(calc(var(--angle) + var(--spin) * .55)) scaleX(.6)}
  70%{opacity:1}
  100%{opacity:0;transform:translate(var(--ex),var(--ey)) rotate(calc(var(--angle) + var(--spin))) scale(.55)}
 }
 @keyframes mrd-chat-return{0%{opacity:0;transform:scale(.3)}65%{opacity:1;transform:scale(1.07,.97)}100%{opacity:1;transform:scale(1)}}
}

.mrd-chat-message .mrd-name-sky,.staff-profile-head .mrd-name-sky{color:#8ed4ff}
.mrd-chat-message .mrd-name-mint,.staff-profile-head .mrd-name-mint{color:#8ce5c5}
.mrd-chat-message .mrd-name-amber,.staff-profile-head .mrd-name-amber{color:#ffd487}
.mrd-chat-message .mrd-name-rose,.staff-profile-head .mrd-name-rose{color:#ffaabb}
.mrd-chat-message .mrd-name-violet,.staff-profile-head .mrd-name-violet{color:#cfbaff}
.staff-member-actions{display:flex;align-items:end;gap:8px;flex-wrap:wrap}
.staff-member-actions label{flex:1 1 155px;margin:6px 0}
.staff-member-actions .staff-remove-member{color:#ffaabb;min-height:44px}
.staff-member-actions .edit-status{flex:1 1 100%;margin:0}
.staff-member-actions .edit-status:empty{display:none}

.mrd-chat-bubble[data-dock=left]::before{inset-inline-end:19px;border-radius:0 36px 36px 0}
.mrd-chat-bubble[data-dock=right]::before{inset-inline-start:19px;border-radius:36px 0 0 36px}
.mrd-chat-bubble[data-dock=left] svg{width:20px;height:20px;--icon-shift:-9.5px;--icon-end:8.65px;translate:var(--icon-shift) 0}
.mrd-chat-bubble[data-dock=right] svg{width:20px;height:20px;--icon-shift:9.5px;--icon-end:-8.65px;translate:var(--icon-shift) 0}
.mrd-chat-bubble[data-dock=left]::after{inset-inline-end:22px}
.mrd-chat-bubble[data-dock=right]::after{inset-inline-start:22px}
.mrd-chat-bubble.has-unread .mrd-chat-badge{
 position:absolute;z-index:2;inset:5px 5px auto auto;width:10px;height:10px;
 background:#ff253b;border:1px solid #ff8c96;border-radius:50%;box-shadow:0 0 0 2px #17243b;
}
.mrd-chat-bubble[data-dock=left].has-unread .mrd-chat-badge{right:19px}
.mrd-chat-bubble[data-dock=right].has-unread .mrd-chat-badge{right:5px}
.mrd-chat-bubble.is-popping .mrd-chat-badge{opacity:0}
@media (prefers-reduced-motion:no-preference){
 .mrd-chat-bubble[data-dock=left]:not(.is-popping):not(.is-holding):not(.is-growing):not(.is-settling)::before,
 .mrd-chat-bubble[data-dock=right]:not(.is-popping):not(.is-holding):not(.is-growing):not(.is-settling)::before{animation:mrd-chat-tide 3.2s ease-in-out infinite}
 .mrd-chat-bubble.has-unread .mrd-chat-badge{animation:mrd-chat-badge-light 3s ease-in-out infinite}
 @keyframes mrd-chat-badge-light{0%,55%,100%{box-shadow:0 0 0 2px #17243b}72%{box-shadow:0 0 0 2px #17243b,0 0 9px 2px #ff526b99}}
}

.mrd-team-chat .mrd-chat-close,.mrd-team-chat .mrd-chat-send{display:grid;place-items:center;min-height:44px;width:44px;flex:none;padding:0;border-radius:12px}.mrd-team-chat .mrd-chat-close,.mrd-team-chat .mrd-chat-close:not(:disabled):hover{background:transparent;color:#ff737f;border:0}.mrd-team-chat :is(.mrd-chat-close,.mrd-chat-send) svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

.mrd-mobile-tabs .mrd-mobile-tab span{font-size:clamp(9px,2.7vw,12px);max-width:100%;overflow-wrap:anywhere}

#dashboard button.mrd-chat-bubble:is(:hover,:active,:focus),#dashboard button.mrd-chat-bubble{
 background:transparent!important;box-shadow:none!important; -webkit-tap-highlight-color:transparent;
 -webkit-user-select:none;appearance:none;overflow:visible;
}
.mrd-chat-bubble>*{pointer-events:none}
.mrd-chat-bubble:focus:not(:focus-visible){outline:none}
.mrd-chat-bubble.is-popping{transition:none!important}
.mrd-chat-bubble[data-dock=left]::before{transform-origin:left center}
.mrd-chat-bubble[data-dock=right]::before{transform-origin:right center}
.mrd-chat-bubble.is-holding::after,.mrd-chat-bubble.is-popping::after{visibility:hidden}
@media (prefers-reduced-motion:no-preference){
 @keyframes mrd-chat-tide{
  0%,100%{transform:scale(1)}
  29%{transform:translateY(-2px) scale(1.12,.95) skewY(-4deg)}
  60%{transform:translateY(1px) scale(.97,1.05) skewY(3deg)}
  83%{transform:scale(1.06,.98)}
 }
 .mrd-chat-bubble.is-holding svg{animation:mrd-icon-inflate var(--hold-time) linear forwards}
 @keyframes mrd-icon-inflate{from{scale:1;translate:var(--icon-shift,0px) 0}to{scale:1.45;translate:var(--icon-end,0px) 0}}
}



.mrd-team-chat .chat-actions,.chat-tools,.chat-preview{display:flex;align-items:center;gap:4px}
.chat-actions{justify-content:flex-end}
.chat-preview:empty{display:none}
.chat-preview{justify-content:space-between;font-size:.85rem}
.mrd-team-chat .chat-actions button:has(svg),.mrd-team-chat .chat-tools button{display:grid;place-items:center;padding:5px;min-width:36px;min-height:38px;background:transparent;color:#a4d8ff;border:0}
.mrd-team-chat .chat-actions button.chat-delete:has(svg),.mrd-team-chat .chat-tools button.recording{color:#ff7584}
.chat-actions svg,.chat-tools svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}
.chat-removed{font-style:italic;color:#c8d5e6}
.mrd-chat-message.chat-activity{align-self:center;text-align:center;background:#17273c}
.mrd-chat-message time{display:block;margin-top:4px}
.mrd-team-chat audio,.mrd-team-chat img{display:block;width:min(240px,55vw);max-width:100%;max-height:24vh;object-fit:contain;border-radius:12px}
.mrd-team-chat textarea{min-width:0;font-size:16px}
.mrd-team-chat .chat-actions button{font-size:.82rem;padding:6px}
.mrd-chat-message:has(textarea){width:85%}
.mrd-team-chat .chat-tools button.recording svg{fill:currentColor}
