.shopping-add-button { display: inline-flex; align-items: center; gap: 10px; }
#shoppingMount { padding: 0; border: 0; background: transparent; min-height: 0; }
.shopping-add-button img, .shopping-rail img, .shopping-inline-add img, .shopping-storage img { filter: brightness(0) invert(1); }
.shopping-summary { display: grid; grid-template-columns: auto minmax(120px, 430px) 1fr; gap: 30px; align-items: center; margin: 12px 0 20px; }
.shopping-summary p { display: flex; gap: 12px; margin: 0; font-size: 19px; white-space: nowrap; }
.shopping-bought-count { color: #31d68b; }
.shopping-summary .btn { justify-self: end; min-height: 46px; border-color: #2387ff; color: #65b2ff; }
.shopping-progress { width: 100%; height: 10px; border: 0; border-radius: 20px; overflow: hidden; appearance: none; background: #283449; accent-color: #28bd77; }
.shopping-progress::-webkit-progress-bar { background: #283449; }
.shopping-progress::-webkit-progress-value { background: #28bd77; border-radius: 20px; }
.shopping-progress::-moz-progress-bar { background: #28bd77; }
.shopping-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 620px; border: 1px solid var(--sk-border); border-radius: 10px; overflow: hidden; }
.shopping-rail { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 20px 8px; border-right: 1px solid var(--sk-border); }
.shopping-rail h2 { margin: 4px 8px 8px; font-size: 18px; font-weight: 600; }
.shopping-departments { display: flex; flex-direction: column; gap: 8px; }
.shopping-department { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 62px; padding: 12px 14px; color: var(--sk-text); border: 1px solid transparent; border-radius: 10px; background: transparent; font: inherit; font-size: 17px; text-align: left; cursor: pointer; }
.shopping-department span { min-width: 0; overflow-wrap: anywhere; }
.shopping-department img { width: 26px; height: 26px; }
.shopping-department.active { background: var(--sk-primary); border-color: #388eff; color: white; }
.shopping-department:hover:not(.active) { background: var(--sk-surface); }
.shopping-department span:last-child { color: inherit; opacity: .85; }
.shopping-reorder { min-height: 48px; margin: auto 8px 0; padding: 16px 0 0; background: transparent; color: var(--sk-muted); border: 0; border-top: 1px solid var(--sk-border); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.shopping-content { min-width: 0; padding: 24px 20px; }
.shopping-group-heading { margin: 0 4px 14px; }
.shopping-group-heading h2 { margin: 0 0 6px; font-size: 21px; line-height: 1.4; font-weight: 550; overflow-wrap: anywhere; }
.shopping-group-heading h2 span { margin-left: 8px; color: #31d68b; }
.shopping-group-heading p { margin: 0; color: var(--sk-muted); line-height: 1.5; }
.shopping-inline-add { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 10px 16px; margin-bottom: 14px; text-align: left; color: var(--sk-muted); border: 1px solid var(--sk-border); background: var(--sk-surface); border-radius: 8px; font: inherit; font-size: 17px; cursor: pointer; }
.shopping-rows { border: 1px solid var(--sk-border); border-radius: 8px; overflow: hidden; background: var(--sk-surface); }
.shopping-row { display: grid; grid-template-columns: 44px 78px minmax(0, 1.2fr) minmax(65px, .7fr) minmax(150px, .9fr); gap: 16px; align-items: center; min-height: 82px; padding: 0 14px 0 8px; }
.shopping-row + .shopping-row { border-top: 1px solid var(--sk-border); }
.shopping-check { position: relative; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.shopping-check input { position: absolute; inset: 0; width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer; }
.shopping-check span { display: grid; place-items: center; width: 23px; height: 23px; border: 2px solid #9caabd; border-radius: 4px; pointer-events: none; }
.shopping-check input:checked + span { background: #25ad73; border-color: #25ad73; }
.shopping-check input:checked + span::after { content: '✓'; color: white; font-size: 18px; font-weight: 700; }
.shopping-check input:focus-visible + span { outline: 3px solid #80bdff; outline-offset: 5px; }
.shopping-check input:disabled + span { opacity: .5; }
.shopping-photo { width: 78px; height: 78px; object-fit: cover; border-radius: 6px; }
.shopping-name { min-width: 0; padding-block: 14px; font-size: 18px; line-height: 1.4; font-weight: 500; overflow-wrap: anywhere; }
.shopping-quantity, .shopping-storage { min-width: 0; font-size: 17px; line-height: 1.4; color: var(--sk-muted); overflow-wrap: anywhere; }
.shopping-storage { display: flex; align-items: center; gap: 8px; }
.shopping-storage :is(img, svg) { flex: 0 0 22px; width: 22px; height: 22px; }
.shopping-row.is-purchased .shopping-name { color: var(--sk-muted); text-decoration: line-through; }
#shoppingPurchased { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--sk-border); }
.shopping-empty { color: var(--sk-muted); padding: 10px 4px; }
.shopping-order-list { display: grid; gap: 10px; }
.shopping-order-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; gap: 8px; align-items: center; }
.shopping-order-row span { overflow-wrap: anywhere; }
.shopping-order-row .btn { min-width: 44px; min-height: 44px; padding: 8px; }
.modal:has(:is(#shoppingForm, #shoppingOrderList)) :is(input, select, button) { min-width: 44px; min-height: 44px; }
#shoppingPage :is(button, input):focus-visible { outline: 3px solid #80bdff; outline-offset: 3px; }
@media (max-width: 1180px) {
    .shopping-layout { grid-template-columns: 220px minmax(0, 1fr); }
    .shopping-summary { grid-template-columns: auto 1fr; gap: 16px; }
    .shopping-progress { grid-column: 1; grid-row: 2; }
    .shopping-summary .btn { grid-column: 2; grid-row: 1 / span 2; }
    .shopping-department { font-size: 15px; padding-inline: 10px; }
    .shopping-content { padding: 20px 14px; }
    .shopping-row { grid-template-columns: 44px 62px minmax(0, 1fr) 90px; gap: 4px 10px; padding: 10px 12px 10px 4px; }
    .shopping-check, .shopping-photo { grid-row: 1 / span 2; }
    .shopping-photo { width: 62px; height: 68px; }
    .shopping-name { padding: 0; font-size: 16px; }
    .shopping-quantity { font-size: 15px; }
    .shopping-storage { grid-column: 3 / -1; font-size: 14px; }
}
@media (max-width: 640px) {
    #shoppingPage .product-page-header { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
    .shopping-add-button { padding-inline: 12px; min-height: 46px; }
    .shopping-summary { grid-template-columns: 1fr; gap: 12px; margin-top: 0; }
    .shopping-summary p { font-size: 17px; }
    .shopping-summary .btn { grid-column: 1; grid-row: 3; justify-self: stretch; }
    .shopping-layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .shopping-rail { padding: 12px; border-right: 0; border-bottom: 1px solid var(--sk-border); gap: 8px; }
    .shopping-rail h2 { margin: 0 0 4px; font-size: 16px; }
    .shopping-departments { flex-direction: row; overflow-x: auto; max-width: 100%; padding: 4px; }
    .shopping-department { flex: 0 0 auto; width: auto; max-width: 270px; min-height: 48px; font-size: 14px; grid-template-columns: minmax(0, 1fr) auto; padding: 9px 12px; }
    .shopping-department img { display: none; }
    .shopping-reorder { margin: 0; padding: 10px 0 0; font-size: 14px; }
    .shopping-content { padding: 18px 10px; }
    .shopping-group-heading h2 { font-size: 18px; }
    .shopping-group-heading p { font-size: 14px; }
    .shopping-inline-add { font-size: 15px; gap: 8px; padding-inline: 10px; }
    .shopping-row { grid-template-columns: 44px 52px minmax(0, 1fr); gap: 4px 8px; padding: 10px 8px 10px 0; }
    .shopping-check, .shopping-photo { grid-row: 1 / span 3; }
    .shopping-photo { width: 52px; height: 64px; }
    .shopping-name { font-size: 15px; }
    .shopping-quantity { grid-column: 3; font-size: 14px; }
    .shopping-storage { grid-column: 3; font-size: 12px; }
    .shopping-storage :is(img, svg) { display: none; }
}
.product-page-header.plan-header { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: start; }
.plan-week-nav { display: flex; align-items: center; align-self: start; max-width: 100%; min-width: 0; margin-top: 4px; background: var(--sk-surface); border: 1px solid var(--sk-border); border-radius: 10px; }
.plan-week-nav button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.plan-week-nav img, #planAddBtn img, .plan-minutes img { filter: brightness(0) invert(1); }
#planPrevBtn img { transform: rotate(180deg); }
#planWeekRange { min-width: 0; padding: 6px 8px; text-align: center; font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
#planAddBtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; justify-self: end; min-height: 52px; }
.plan-timeline { position: relative; margin-top: 24px; margin-left: 8px; border-left: 1px solid #697384; min-width: 0; }
.plan-day { position: relative; display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 14px; padding: 20px 0 20px 26px; border-bottom: 1px solid var(--sk-border); }
.plan-day::before { content: ''; position: absolute; left: -8px; top: 26px; width: 14px; height: 14px; border: 2px solid #bfc6d2; border-radius: 50%; background: var(--sk-bg); }
.plan-day-heading { margin: 0; color: var(--sk-text); font-size: 18px; line-height: 1.4; font-weight: 550; }
.plan-day-heading span { display: inline-block; margin-left: 14px; padding: 3px 10px; font-size: 15px; border-radius: 6px; background: var(--sk-primary); color: #fff; }
.plan-day-meals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; min-width: 0; }
.plan-slot { min-width: 0; padding: 0 18px; border-right: 1px solid var(--sk-border); }
.plan-slot:first-child { padding-left: 0; }
.plan-slot:last-child { border-right: 0; padding-right: 0; }
.plan-slot h3 { margin: 0 0 10px; font-size: 15px; font-weight: 400; color: var(--sk-muted); }
.plan-meal-body { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.plan-photo, .plan-empty-photo { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 8px; object-fit: cover; }
.plan-empty-photo { display: grid; place-items: center; border: 1px dashed #738197; color: var(--sk-muted); font-size: 26px; }
.plan-empty-photo img { filter: brightness(0) invert(1); opacity: .75; }
.plan-meal-empty { align-items: center; }
.plan-meal-info { min-width: 0; flex: 1; }
.plan-recipe-name { display: block; font-size: 16px; line-height: 1.4; font-weight: 500; overflow-wrap: anywhere; }
.plan-minutes { display: flex; align-items: center; gap: 6px; margin-top: 5px; color: var(--sk-muted); font-size: 14px; }
.plan-minutes img { flex: 0 0 17px; opacity: .75; }
.plan-availability { margin: 5px 0 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.plan-availability.ready { color: #75d29c; }
.plan-availability.missing { color: #f5b244; }
.plan-availability.unknown { color: var(--sk-muted); }
.plan-link, .plan-remove { min-width: 44px; min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: #72b5ff; font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.plan-link:hover, .plan-remove:hover { text-decoration: underline; }
.plan-remove { color: var(--sk-muted); font-size: 13px; }
.plan-slot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; margin-top: 6px; }
.plan-shopping { min-width: 44px; min-height: 44px; padding: 7px 12px; border: 1px solid #a67124; border-radius: 7px; background: transparent; color: #f5b244; font: inherit; font-size: 15px; cursor: pointer; }
.plan-shopping:hover { background: #372a19; }
.plan-day.is-today { grid-template-columns: minmax(0, 1fr); padding: 18px 24px 18px 26px; background: var(--sk-surface); border: 1px solid var(--sk-border); border-radius: 12px; }
.plan-day.is-today::before { left: -9px; top: 26px; border-color: var(--sk-primary); background: var(--sk-primary); }
.plan-day.is-today .plan-day-heading { font-size: 20px; }
.plan-day.is-today .plan-slot h3 { font-size: 18px; }
.plan-day.is-today .plan-photo { width: 134px; height: 148px; flex-basis: 134px; }
.plan-day.is-today .plan-recipe-name { font-size: 18px; }
.plan-day.is-today .plan-availability, .plan-day.is-today .plan-minutes { font-size: 16px; }
.plan-footer { padding: 22px 0 12px; text-align: center; }
.plan-footer .plan-link { padding: 10px 16px; font-size: 17px; text-align: center; }
.plan-target-form, .plan-target-form > div { display: grid; gap: 10px; }
.plan-target-form { gap: 20px; }
.plan-target-form select { width: 100%; min-width: 0; }
.plan-recipe-picker { display: grid; gap: 12px; }
.plan-picker-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--sk-border); border-radius: 10px; }
.plan-picker-row img { object-fit: cover; border-radius: 7px; }
.plan-picker-row strong { min-width: 0; overflow-wrap: anywhere; }
.plan-copy-confirm { overflow-wrap: anywhere; }
.modal:has(:is(.plan-target-form, .plan-recipe-picker, .plan-copy-confirm)) { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100dvh - 32px); overflow: hidden; }
.modal:has(:is(.plan-target-form, .plan-recipe-picker, .plan-copy-confirm)) .modal-body { min-height: 0; overflow-y: auto; }
.modal:has(:is(.plan-target-form, .plan-recipe-picker, .plan-copy-confirm)) :is(button, select) { min-width: 44px; min-height: 44px; }
@media (max-width: 1250px) {
    .product-page-header.plan-header { grid-template-columns: 1fr auto; }
    .plan-week-nav { grid-column: 1; grid-row: 2; justify-self: start; }
    #planAddBtn { grid-column: 2; grid-row: 1; }
    .plan-day { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .plan-slot { padding-inline: 12px; }
    .plan-meal-body { flex-wrap: wrap; gap: 10px; }
    .plan-meal-info { flex-basis: 100%; }
    .plan-day.is-today .plan-photo { width: 100%; height: 120px; flex-basis: 100%; }
}
@media (max-width: 700px) {
    #planPage .plan-header { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
    #planAddBtn { width: 100%; }
    .plan-week-nav { align-self: stretch; justify-content: space-between; margin: 0; }
    #planWeekRange { font-size: 15px; }
    .plan-timeline { margin-top: 20px; margin-left: 6px; }
    .plan-day, .plan-day.is-today { padding: 18px 12px 12px 18px; }
    .plan-day-heading, .plan-day.is-today .plan-day-heading { font-size: 17px; }
    .plan-day-heading span { margin-left: 8px; font-size: 13px; }
    .plan-day-meals { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .plan-slot, .plan-slot:first-child, .plan-slot:last-child { border-right: 0; padding: 0 0 10px; border-bottom: 1px solid var(--sk-border); }
    .plan-slot:last-child { border-bottom: 0; padding-bottom: 0; }
    .plan-meal-body { flex-wrap: nowrap; }
    .plan-meal-info { flex-basis: auto; }
    .plan-day.is-today .plan-photo { flex-basis: 78px; width: 78px; height: 88px; }
    .plan-day.is-today .plan-recipe-name { font-size: 16px; }
    .plan-day.is-today .plan-availability, .plan-day.is-today .plan-minutes { font-size: 14px; }
    .plan-footer { padding: 16px 0 8px; }
    .plan-footer .plan-link { font-size: 15px; }
    .plan-picker-row { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; padding: 10px; }
    .plan-picker-row img { width: 48px; height: 48px; }
    .plan-picker-row .btn { grid-column: 1 / -1; }
}

html,
body {
    background: var(--sk-bg);
    color: var(--sk-text);
}

.inventory-workspace { min-width: 0; }
.inventory-search { width: min(732px, 100%); margin: 22px 0 24px; }
#inventoryAddBtn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; }
#inventoryAddBtn img, .inventory-storage img, .inventory-detail-quantity img { filter: brightness(0) invert(1); }
.inventory-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 25px; }
.inventory-filter-group { display: flex; flex-wrap: wrap; gap: 12px; }
.inventory-filters .recipe-filter { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; min-width: 44px; }
.inventory-attention-filters { margin-left: auto; }
.inventory-status-dot { display: inline-block; flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; }
.inventory-status-dot.low { background: #f5a623; }
.inventory-status-dot.expiring { background: #ed655f; }
.inventory-group { margin-bottom: 18px; }
.inventory-group h2 { margin: 0 0 12px; font-size: 19px; line-height: 1.35; font-weight: 650; overflow-wrap: anywhere; }
.inventory-rows { overflow: hidden; background: var(--sk-surface); border: 1px solid var(--sk-border); border-radius: var(--sk-radius-sm); }
.inventory-row { display: grid; grid-template-columns: 80px minmax(130px, 1.2fr) minmax(76px, .7fr) minmax(130px, .95fr) minmax(140px, 1fr) 152px; align-items: center; column-gap: 22px; min-height: 78px; padding-right: 12px; }
.inventory-row + .inventory-row { border-top: 1px solid var(--sk-border); }
.inventory-photo { align-self: stretch; width: 80px; height: 100%; min-height: 78px; max-height: 140px; object-fit: cover; }
.inventory-name { min-width: 0; padding: 12px 0; font-size: 18px; line-height: 1.4; font-weight: 550; overflow-wrap: anywhere; }
.inventory-quantity, .inventory-storage, .inventory-status { min-width: 0; color: var(--sk-muted); font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.inventory-storage { display: flex; align-items: center; gap: 10px; }
.inventory-storage :is(img,svg) { flex: 0 0 24px; opacity: .75; }
.inventory-status { padding: 10px 0; font-size: 16px; }
.inventory-status.expiring, .inventory-status small, .inventory-detail-warning { color: #f5b244; }
.inventory-status.overdue { color: #ff8e8e; }
.inventory-status small { display: block; margin-top: 3px; font-size: 14px; }
.inventory-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 44px; }
.inventory-more { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; color: var(--sk-muted); background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.inventory-more:hover { background: var(--sk-surface-2); color: var(--sk-text); }
.inventory-shopping-btn { min-height: 44px; min-width: 100px; padding: 8px 12px; border: 1px solid #a67124; border-radius: 8px; color: #f5b244; background: transparent; font: inherit; font-size: 15px; cursor: pointer; }
.inventory-shopping-btn:hover { background: #372a19; }
.inventory-empty { padding: 28px; border: 1px dashed var(--sk-border); border-radius: var(--sk-radius-sm); color: var(--sk-muted); }
.inventory-empty h2 { margin-top: 0; color: var(--sk-text); font-size: 21px; }
.inventory-empty .btn { margin-top: 12px; }
.inventory-form-field { display: grid; gap: 8px; margin-bottom: 16px; color: var(--sk-text); font-weight: 600; }
.inventory-form-field .muted { font-size: 13px; font-weight: 400; }
.inventory-form-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.inventory-form-field :is(input, select) { min-width: 0; width: 100%; }
.inventory-field-error { color: #ff8e8e; margin: -8px 0 16px; font-size: 14px; }
.inventory-scan { margin-top: 8px; }
.modal:has(:is(#inventoryForm, #inventoryDetail, .barcode-panel)) { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100dvh - 40px); overflow: hidden; }
.modal:has(:is(#inventoryForm, #inventoryDetail, .barcode-panel)) .modal-body { min-height: 0; overflow-y: auto; align-content: start; }
.modal:has(:is(#inventoryForm, #inventoryDetail, .barcode-panel)) :is(input, select, button) { min-width: 44px; min-height: 44px; }
.inventory-detail { display: grid; justify-items: center; gap: 18px; }
.inventory-detail-photo { width: 156px; height: 156px; object-fit: cover; border-radius: 12px; }
.inventory-detail-quantity { display: flex; align-items: center; justify-content: center; gap: 24px; }
.inventory-detail-quantity .btn { display: grid; place-items: center; padding: 10px; }
.inventory-detail-quantity strong { min-width: 70px; text-align: center; }
.inventory-delete { color: #ff8e8e; }
@media (max-width: 1250px) {
    .inventory-attention-filters { margin-left: 0; }
    .inventory-row { grid-template-columns: 68px minmax(120px, 1fr) 90px minmax(130px, 1fr) 152px; gap: 8px 16px; padding: 10px 12px 10px 0; }
    .inventory-photo { grid-row: span 2; width: 68px; min-height: 80px; }
    .inventory-name { padding: 0; }
    .inventory-storage { grid-column: 2; font-size: 15px; }
    .inventory-quantity { grid-column: 3; grid-row: 1; }
    .inventory-status { grid-column: 4; grid-row: 1 / span 2; }
    .inventory-row-actions { grid-column: 5; grid-row: 1 / span 2; }
}
@media (max-width: 700px) {
    #inventoryPage .product-page-header { flex-direction: column; gap: 14px; }
    #inventoryAddBtn { width: 100%; justify-content: center; }
    .inventory-search { margin-top: 18px; margin-bottom: 16px; }
    .inventory-filters { margin-bottom: 20px; gap: 12px; }
    .inventory-filter-group { gap: 8px; }
    .inventory-filters .recipe-filter { font-size: 14px; padding: 9px 12px; }
    .inventory-group h2 { font-size: 18px; }
    .inventory-row { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px; }
    .inventory-photo { width: 58px; height: 58px; min-height: 58px; grid-row: 1 / span 2; align-self: start; border-radius: 6px; }
    .inventory-name { grid-column: 2; grid-row: 1; font-size: 16px; }
    .inventory-quantity { grid-column: 2; grid-row: 2; font-size: 15px; }
    .inventory-storage { grid-column: 2 / span 2; grid-row: 3; font-size: 14px; }
    .inventory-storage :is(img,svg) { width: 18px; height: 18px; flex-basis: 18px; }
    .inventory-status { grid-column: 1 / span 2; grid-row: 4; font-size: 14px; padding: 5px 0 0; }
    .inventory-row-actions { display: contents; }
    .inventory-more { grid-column: 3; grid-row: 1 / span 2; justify-self: end; }
    .inventory-shopping-btn { grid-column: 3; grid-row: 4; font-size: 14px; margin: 0; padding-inline: 8px; }
    .inventory-empty { padding: 20px; }
    .modal:has(:is(#inventoryForm, #inventoryDetail, .barcode-panel)) { width: 100%; max-height: calc(100dvh - 24px); }
}

.app-shell.product-shell {
    display: grid;
    grid-template-columns: var(--sk-sidebar) minmax(0, 1fr);
    gap: 0;
    width: 100%;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--sk-bg);
}

.product-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: var(--sk-sidebar);
    min-height: 100dvh;
    padding: 26px 14px 18px;
    background: var(--sk-surface);
    border-right: 1px solid var(--sk-border);
}

.product-brand {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding-inline: 20px;
    color: var(--sk-text);
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -.02em;
    text-decoration: none;
}

.product-nav {
    display: grid;
    gap: 8px;
    margin-top: 37px;
}

.product-nav .nav-btn,
.account-menu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    width: 100%;
    min-height: 64px;
    padding: 14px 16px;
    color: var(--sk-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--sk-radius-sm);
    font-size: 19px;
    font-weight: 500;
    text-align: left;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.product-nav .nav-btn:hover,
.account-menu:hover {
    color: var(--sk-text);
    background: var(--sk-surface-2);
    border-color: var(--sk-border);
}

.product-nav .nav-btn.active {
    color: #fff;
    background: #152d55;
    border-color: #1b3c70;
    box-shadow: inset 5px 0 0 var(--sk-primary);
}

.product-nav .nav-icon {
    display: block;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    opacity: .78;
    filter: brightness(0) invert(1);
}

.product-nav .nav-btn.active .nav-icon {
    opacity: 1;
}

.product-nav .nav-label {
    display: inline;
    max-width: none;
    opacity: 1;
}

.app-shell.product-shell.nav-compact .product-nav .nav-label {
    max-width: none;
    opacity: 1;
}

.account-menu {
    gap: 14px;
    min-height: 82px;
    margin-top: auto;
    padding: 18px 6px 0;
    color: var(--sk-text);
    border-top-color: var(--sk-border);
    border-radius: 0;
    font-size: 18px;
    font-weight: 500;
}

#accountInitial {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #fff;
    background: var(--sk-primary);
    border-radius: 50%;
}

.account-disclosure {
    width: 20px;
    height: 20px;
    margin-left: auto;
    opacity: .78;
    filter: brightness(0) invert(1);
}

.product-workspace {
    grid-column: 2;
    min-width: 0;
    height: 100dvh;
    padding: 22px 28px 24px;
    overflow: auto;
}

.product-mobile-header {
    display: none;
}

.product-page {
    display: none;
    width: 100%;
    min-height: 100%;
    margin: 0;
}

.product-page.active {
    display: block;
    height: auto;
    overflow: visible;
    padding: 0;
}

.product-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 19px;
}

.product-page-header h1 {
    margin: 0;
    color: var(--sk-text);
    font-size: clamp(34px, 3vw, 40px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.product-page-header p:not(.product-kicker) {
    max-width: 620px;
    margin: 5px 0 0;
    color: var(--sk-muted);
    font-size: 16px;
    line-height: 1.55;
}

.product-kicker {
    margin: 0 0 8px;
    color: var(--sk-primary-hover);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.product-page-mount {
    min-height: 280px;
    padding: 24px;
    background: var(--sk-surface);
    border: 1px dashed var(--sk-border);
    border-radius: var(--sk-radius-md);
}

.product-page-mount:empty::before {
    color: var(--sk-muted);
    content: "Содержимое появится на следующем этапе";
}

/* Today — selected concept 1. Other product screens retain their layout. */
.product-brand { gap: 12px; padding-inline: 12px; font-size: 22px; font-weight: 600; white-space: nowrap; }
.product-brand img { flex: 0 0 40px; width: 40px; height: 40px; object-fit: contain; mix-blend-mode: lighten; }
.product-shell:has(#todayPage.active) { --sk-sidebar: 256px; }
.product-shell:has(#todayPage.active) .product-workspace { padding: 44px 26px 36px 42px; }
.product-shell:has(#todayPage.active) .product-sidebar { padding-top: 40px; }
.product-shell:has(#todayPage.active) .nav-btn.active { box-shadow: none; background: #11253e; border-color: transparent; }
.today-page-header { align-items: flex-start; margin-bottom: 25px; }
.today-page-header h1 { font-size: clamp(38px, 3.4vw, 56px); font-weight: 700; }
.product-page-header.today-page-header p { margin-top: 10px; font-size: 21px; }
.today-page-header p::first-letter { text-transform: uppercase; }
.product-shell .today-page-header .btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 12px 24px; font-size: 18px; font-weight: 500; color: var(--sk-muted); background: transparent; border-color: #617084; }
.today-page-header .btn img, .tomorrow-panel .today-link-button img { filter: brightness(0) invert(1); opacity: .7; }
.today-workspace { display: grid; grid-template-columns: minmax(0, 2.78fr) minmax(280px, 1fr); gap: 28px 26px; align-items: start; }
.today-plan-panel { min-width: 0; }
.today-meal-slots { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); min-height: 162px; margin: 0 0 28px; padding: 28px 0; background: var(--sk-surface); border-radius: 6px; }
.today-meal-slot { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; min-width: 0; padding: 4px 30px; color: var(--sk-text); background: transparent; border: 0; border-right: 1px solid var(--sk-border); border-radius: 0; text-align: left; position: relative; }
.today-meal-slot:last-child { border-right: 0; }
.today-meal-slot-main { color: var(--sk-muted); font-size: 14px; font-weight: 600; text-transform: uppercase; }
.today-meal-slot strong { font-size: 21px; line-height: 1.35; font-weight: 400; overflow-wrap: anywhere; }
.today-slot-minutes { color: var(--sk-muted); font-size: 16px; line-height: 1.4; }
.today-meal-slot[data-meal-status="empty"] strong { color: var(--sk-primary-hover); }
.today-meal-slot[data-meal-status="current"]::after { content: ""; position: absolute; bottom: -28px; left: 0; right: 0; border-bottom: 3px solid var(--sk-primary); }
.today-meal-slot[data-meal-status="current"] .today-meal-slot-main { color: var(--sk-primary-hover); }
.today-meal-slot:hover { background: var(--sk-surface-2); }
.today-featured { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); min-height: 412px; overflow: hidden; background: var(--sk-surface); border-radius: 6px; }
.today-featured.without-photo { grid-template-columns: minmax(0,1fr); min-height: 300px; }
.today-featured-copy, .today-empty-feature { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; padding: 32px 30px; }
.today-featured h3 { color: var(--sk-text); font-size: clamp(28px,2.3vw,40px); font-weight: 700; line-height: 1.16; letter-spacing: -.025em; margin: 16px 0; overflow-wrap: anywhere; }
.today-featured > img { width: 100%; height: 100%; min-height: 412px; object-fit: cover; object-position: 57% center; }
.today-eyebrow, .today-recipe-meta, .today-empty-copy, .today-section-heading p { margin: 0; color: var(--sk-muted); line-height: 1.5; }
.today-eyebrow { color: var(--sk-primary-hover); font-size: 16px; }
.today-recipe-meta, .today-availability { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.today-recipe-meta img, .today-availability img { flex: 0 0 22px; filter: brightness(0) invert(1); opacity: .75; }
.today-availability { margin: 22px 0 0; color: var(--sk-muted); font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.today-availability.ready { color: var(--sk-success); }
.today-availability.missing { color: var(--sk-warning); }
.today-availability.missing img, .today-missing-button img { filter: invert(70%) sepia(91%) saturate(1043%) hue-rotate(350deg) brightness(99%) contrast(93%); }
.today-missing-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; max-width: 100%; margin-top: 24px; padding: 10px 18px; color: var(--sk-warning); border: 1px solid var(--sk-warning); background: transparent; border-radius: 6px; font: inherit; font-size: 18px; font-weight: 500; cursor: pointer; }
.today-missing-button:hover { background: #302718; }
.today-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.product-shell .today-actions .btn { min-height: 54px; border-radius: 6px; padding-inline: 22px; font-size: 17px; font-weight: 600; }
.today-link-button, .today-outline-button { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px; color: var(--sk-primary-hover); background: transparent; border: 0; border-radius: 6px; font: inherit; font-size: 17px; font-weight: 500; cursor: pointer; }
.today-link-button:hover, .today-outline-button:hover { color: var(--sk-text); background: var(--sk-surface-2); }
.today-side-column { display: grid; gap: 26px; min-width: 0; align-content: start; }
.today-summary-card { min-width: 0; padding: 28px 30px 20px; background: var(--sk-surface); border-radius: 6px; }
.today-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.today-section-heading h2 { margin: 0; color: var(--sk-text); font-size: 21px; font-weight: 600; line-height: 1.4; }
.today-section-heading > span { color: var(--sk-muted); font-size: 13px; }
.today-summary-list { display: grid; gap: 12px; margin-top: 24px; }
.today-shopping-row { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 14px; min-height: 46px; font-size: 18px; cursor: pointer; }
.today-shopping-row input { appearance: none; width: 26px; height: 26px; margin: 0; border: 2px solid var(--sk-muted); border-radius: 4px; background: transparent; cursor: pointer; }
.today-shopping-row input:checked { appearance: auto; accent-color: var(--sk-primary); }
.product-shell:has(#todayPage.active) .product-nav { margin-top: 56px; gap: 8px; }
.product-shell:has(#todayPage.active) .product-nav .nav-btn { min-height: 74px; font-weight: 400; }
.product-shell:has(#todayPage.active) .product-nav .nav-btn.active { font-weight: 500; }
@media (min-width: 721px) { .product-shell:has(#todayPage.active) #accountInitial, .product-shell:has(#todayPage.active) .account-disclosure { display: none; } .product-shell:has(#todayPage.active) .account-menu { padding-left: 18px; color: var(--sk-muted); font-weight: 400; } }
.today-shopping-row span { min-width: 0; overflow-wrap: anywhere; }
.today-shopping-row span:last-child { color: var(--sk-muted); font-size: 17px; }
.today-summary-link { width: 100%; margin-top: 28px; padding: 22px 0 8px; border-top: 1px solid var(--sk-border); border-radius: 0; }
.today-inventory-row { display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 16px; min-height: 74px; }
.today-inventory-row img { width: 28px; height: 28px; filter: invert(77%) sepia(41%) saturate(654%) hue-rotate(37deg); }
.today-inventory-row span { display: grid; gap: 8px; min-width: 0; }
.today-inventory-row strong { color: var(--sk-text); font-size: 18px; font-weight: 500; overflow-wrap: anywhere; }
.today-inventory-row small { color: var(--sk-muted); font-size: 16px; line-height: 1.4; }
.today-empty-copy { margin-top: 22px; font-size: 16px; }
.today-empty-feature p:not(.today-eyebrow) { color: var(--sk-muted); line-height: 1.5; max-width: 430px; margin: 0 0 24px; }
.today-undo { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; padding-top: 12px; color: var(--sk-muted); font-size: 14px; }
.today-undo .today-link-button { font-size: 14px; padding-inline: 0; }
.tomorrow-panel { grid-column: 1/-1; display: grid; grid-template-columns: minmax(220px,.85fr) minmax(0,2fr); align-items: center; gap: 20px; min-width: 0; padding: 22px 30px; background: var(--sk-surface); border: 1px solid var(--sk-border); border-radius: 6px; }
.tomorrow-panel .today-section-heading { display: block; }
.tomorrow-panel:has(.tomorrow-meals.is-empty) [data-action="open-plan"] { display: none; }
.tomorrow-panel .today-section-heading h2 { font-size: 19px; }
.tomorrow-panel [data-action="open-plan"] { padding: 6px 0; font-size: 15px; }
.tomorrow-meals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); min-width: 0; gap: 14px; }
.tomorrow-meals.is-empty { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tomorrow-empty { margin: 0; color: var(--sk-muted); font-size: 18px; line-height: 1.5; }
.tomorrow-meal { min-width: 0; border-right: 1px solid var(--sk-border); padding-right: 10px; }
.tomorrow-meal:last-child { border-right: 0; }
.tomorrow-meal > span { display: block; color: var(--sk-muted); font-size: 13px; }
.tomorrow-meal button { min-height: 44px; min-width: 44px; width: 100%; padding: 6px 0; font: inherit; font-size: 15px; text-align: left; overflow-wrap: anywhere; color: var(--sk-primary-hover); background: transparent; border: 0; cursor: pointer; }
#todayPage :is(button,a,input):focus-visible { outline: 3px solid #80bdff; outline-offset: 3px; }
#todayMount[aria-busy="true"] { opacity: .75; }

.account-form {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.account-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.account-card { padding: 30px; border: 1px solid var(--sk-border); border-radius: var(--sk-radius-sm); background: var(--sk-surface); min-width: 0; }
.account-card h2 { margin: 0 0 26px; font-size: 24px; }
.account-card p { color: var(--sk-muted); line-height: 1.5; }
.account-side { display: grid; gap: 26px; }
.account-side .btn { width: 100%; margin-top: 12px; }
.account-back, .account-link { display: inline-flex; align-items: center; gap: 12px; color: var(--sk-primary-hover); background: none; border: 0; padding: 0; min-height: 44px; text-align: left; cursor: pointer; font: inherit; }
.account-back { margin-bottom: 16px; }
.account-back span { font-size: 28px; }
.account-form > .input { width: 100%; min-height: 56px; margin-bottom: 10px; }
.account-form > label { font-weight: 400; }
.account-form > .btn { justify-self: start; margin-top: 14px; }
.account-form .account-help { margin: 0 0 10px; font-size: 14px; }
.product-shell .btn.account-logout { color: #ff7569; border-color: #ff7569; background: transparent; }
.account-field-error { color: #ff9e94; margin: 0; font-size: 14px; line-height: 1.4; }
.account-form [aria-invalid="true"], #authForm [aria-invalid="true"] { border-color: #ff7569; }
.account-dialog-form .input { color: var(--sk-text); background: var(--sk-surface-2); border: 1px solid var(--sk-border); }
.account-dialog-form + .modal-foot .btn, .modal-foot .btn { min-height: 44px; }
.modal-backdrop:has(.account-dialog-form) #modalCloseBtn { min-width: 44px; min-height: 44px; }
.auth-card .password-toggle { min-width: 44px; bottom: 2px; }
#authForm .split-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
#authForm .auth-mode-hint:empty { display: none; }
#authForm .form-grid { min-width: 0; }
#authForm [readonly] { color: var(--sk-muted); }

@media (max-width: 760px) {
    .account-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .account-card { padding: 22px; }
    .account-side { gap: 18px; }
    .account-card h2 { margin-bottom: 22px; }
    .account-form > .btn { width: 100%; }
    .account-back { margin-bottom: 8px; }
}

.account-form label {
    display: grid;
    gap: 8px;
    color: var(--sk-muted);
    font-weight: 700;
}

.account-form .input,
.auth-card .input {
    min-height: 48px;
    color: var(--sk-text);
    background: var(--sk-surface-2);
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius-sm);
}

.product-account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-shell .btn,
.auth-card .btn,
.maintenance-card .btn {
    min-height: 44px;
    color: #fff;
    background: var(--sk-primary);
    border-radius: var(--sk-radius-sm);
}

.product-shell .btn:hover,
.auth-card .btn:hover,
.maintenance-card .btn:hover {
    background: var(--sk-primary-hover);
}

.product-shell .btn.ghost,
.auth-card .btn.ghost,
.auth-card .btn.secondary,
.maintenance-card .btn.ghost {
    color: var(--sk-text);
    background: var(--sk-surface-2);
    border: 1px solid var(--sk-border);
}

.auth-wrap,
.maintenance-wrap {
    min-height: 100dvh;
    padding: 24px;
    background: var(--sk-bg);
}

body .auth-card {
    display: grid;
    flex-shrink: 0;
    grid-template-columns: minmax(0, 1fr);
    width: min(440px, 100%);
    min-height: 0;
    gap: 36px;
    margin: auto;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

#authScreen {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 100dvh;
    padding: clamp(28px, 6vh, 64px) 24px;
    overflow: auto;
}

#authScreen .auth-intro,
#authScreen .auth-right {
    padding: 0;
    background: transparent;
}

#authScreen .auth-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.auth-intro h1 {
    margin: 0;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
    letter-spacing: -1.6px;
    white-space: nowrap;
    text-align: center;
}

.auth-logo { position: relative; display: block; flex: none; width: 104px; aspect-ratio: 1; mix-blend-mode: lighten; }
.auth-logo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
/* Both layers use the same mark. The split falls in the empty gap above the bowl. */
.auth-logo-bowl { clip-path: inset(51% 0 0); }
.auth-logo-steam { clip-path: inset(0 0 49%); }
.auth-logo.is-ready .auth-logo-steam { animation: brand-steam-rise 4s ease-in-out 1; }
@keyframes brand-steam-rise {
    0%, 100% { transform: translateY(0); opacity: 1; }
    42% { transform: translateY(-7%); opacity: .6; }
    58% { transform: translateY(-10%); opacity: 0; }
    59% { transform: translateY(3%); opacity: 0; }
    82% { transform: translateY(1%); opacity: .75; }
}
#authScreen.hidden .auth-logo-steam { animation: none; }
@media (prefers-reduced-motion: reduce) {
    .auth-logo.is-ready .auth-logo-steam { animation: none; transform: none; opacity: 1; }
}
#authTitle { text-align: center; margin: 0 0 24px; font-size: 26px; line-height: 1.25; }
#authDesc { text-align: center; margin: -10px 0 22px; font-size: 15px; }
#authDesc:empty { display: none; }
#authMessage:not(.hidden) { margin-bottom: 18px; }
#authForm { gap: 16px; }
#authForm label.form-grid { gap: 9px; }
#authForm label .tiny { font-size: 15px; color: var(--sk-text); }
#authForm .input { min-height: 54px; border-radius: 8px; font-size: 16px; }
#authForm .input::placeholder { color: var(--sk-muted); opacity: 1; }
#authForm .password-toggle { bottom: 5px; right: 5px; border: 0; background: transparent; }
#authSubmitBtn { min-height: 54px; border-radius: 8px; font-size: 17px; }
.auth-link { padding: 8px 0; min-height: 44px; border: 0; background: transparent; color: #65a9ff; font: inherit; font-size: 15px; cursor: pointer; }
.auth-link:hover { color: #9dc9ff; text-decoration: underline; text-underline-offset: 4px; }
.auth-link:disabled { cursor: wait; opacity: .6; }
.auth-recovery { justify-self: end; margin-top: -12px; }
.auth-remember { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: -12px; font-size: 14px; color: var(--sk-muted); cursor: pointer; }
.auth-remember input { width: 18px; height: 18px; margin: 0; accent-color: var(--sk-primary); }
.auth-footer { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0 8px; color: var(--sk-muted); font-size: 15px; }
@media (max-width: 480px) {
    #authScreen { padding: 28px 22px; }
    body .auth-card { gap: 28px; }
    .auth-logo { width: 80px; }
    #authTitle { margin-bottom: 20px; font-size: 23px; }
}

@media (min-width: 900px) and (min-height: 900px) {
    body .auth-card { width: 548px; gap: 40px; }
    .auth-logo { width: 144px; }
    .auth-intro h1 { font-size: 72px; letter-spacing: -1.5px; }
    #authTitle { font-size: 30px; font-weight: 500; }
    #authForm { gap: 20px; }
    #authForm label .tiny { font-size: 20px; }
    #authForm .input { min-height: 66px; font-size: 20px; }
    #authForm .password-toggle { bottom: 11px; }
    #authSubmitBtn { min-height: 66px; font-size: 20px; }
    .auth-link, .auth-footer { font-size: 20px; }
    .auth-remember { font-size: 16px; }
}

.auth-intro p,
.section-desc,
.muted {
    color: var(--sk-muted);
}

.auth-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card .password-toggle {
    min-height: 44px;
    color: var(--sk-muted);
}

.maintenance-card,
.modal {
    color: var(--sk-text);
    background: var(--sk-surface);
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius-md);
    box-shadow: none;
}

.maintenance-card {
    width: min(620px, 100%);
    padding: clamp(28px, 5vw, 52px);
}

.product-shell :focus-visible,
.auth-card :focus-visible,
.maintenance-card :focus-visible,
.modal :focus-visible {
    outline: 2px solid var(--sk-primary-hover);
    outline-offset: 3px;
    box-shadow: var(--sk-focus);
}

.recipe-add-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-inline: 18px;
    white-space: nowrap;
}

.recipe-add-button img {
    filter: brightness(0) invert(1);
}

.recipes-workspace {
    min-width: 0;
}

.recipe-search {
    position: relative;
    display: block;
    width: min(706px, 100%);
    margin-bottom: 20px;
}

.recipe-search .input {
    min-height: 52px;
    padding-left: 54px;
    color: var(--sk-text);
    background: var(--sk-surface);
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius-sm);
}

.recipe-search-icon {
    position: absolute;
    top: 14px;
    left: 18px;
    z-index: 1;
    pointer-events: none;
    filter: brightness(0) invert(1);
    opacity: .74;
}

.recipe-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.recipe-filter {
    min-height: 44px;
    padding: 9px 17px;
    color: var(--sk-text);
    background: var(--sk-surface);
    border: 1px solid var(--sk-border);
    border-radius: 10px;
    font: inherit;
    cursor: pointer;
}

.recipe-filter.active {
    color: #fff;
    background: var(--sk-primary);
    border-color: var(--sk-primary);
}

.recipe-collection {
    margin-top: 18px;
}

.recipe-collection + .recipe-collection {
    margin-top: 16px;
}

.recipe-collection h2 {
    margin: 0 0 12px;
    color: var(--sk-text);
    font-size: 23px;
    letter-spacing: -.025em;
}

.recipe-ready-list,
.recipes-grid {
    display: grid;
    gap: 18px;
}

.recipe-ready-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
}

.recipes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recipe-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: var(--sk-surface);
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius-sm);
}

.recipe-card-main {
    display: block;
    width: 100%;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.recipe-card-image {
    display: block;
    width: 100%;
    height: 132px;
    object-fit: cover;
}

.recipe-card-copy {
    display: grid;
    gap: 8px;
    min-height: 74px;
    padding: 10px 60px 10px 15px;
}

.recipe-card-copy strong {
    overflow: hidden;
    color: var(--sk-text);
    font-size: 18px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipe-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--sk-muted);
    font-size: 15px;
}

.recipe-card-meta img,
.recipe-favorite img {
    filter: brightness(0) invert(1);
}

.recipe-ready-card {
    min-width: 0;
    overflow: hidden;
    background: var(--sk-surface);
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius-sm);
}

.recipe-ready-main {
    display: grid;
    grid-template-columns: minmax(118px, 40%) minmax(0, 1fr);
    width: 100%;
    min-height: 128px;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.recipe-ready-image {
    width: 100%;
    height: 128px;
    object-fit: cover;
}

.recipe-ready-copy {
    display: grid;
    align-content: center;
    gap: 7px;
    min-width: 0;
    padding: 14px;
}

.recipe-ready-copy strong {
    display: -webkit-box;
    overflow: hidden;
    color: var(--sk-text);
    font-size: 17px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.recipe-ready-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--sk-success);
    font-size: 14px;
    font-weight: 750;
}

.recipe-ready-status img {
    filter: invert(62%) sepia(73%) saturate(522%) hue-rotate(93deg) brightness(94%) contrast(88%);
}

.recipe-favorite {
    position: absolute;
    right: 10px;
    bottom: 16px;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
}

.recipe-favorite:hover,
.recipe-favorite.selected {
    background: var(--sk-surface-2);
    border-color: var(--sk-border);
}

.recipe-favorite.selected img {
    filter: invert(50%) sepia(97%) saturate(1217%) hue-rotate(199deg) brightness(99%) contrast(102%);
}

.recipe-empty {
    padding: 22px;
    color: var(--sk-muted);
    background: var(--sk-surface);
    border: 1px dashed var(--sk-border);
    border-radius: var(--sk-radius-sm);
}

.modal:has(#recipeIngsModal) {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: calc(100dvh - 40px);
    overflow: hidden;
}

.modal:has(#recipeIngsModal) .modal-body {
    min-height: 0;
    overflow-y: auto;
    align-content: start;
}

.modal:has(#recipeIngsModal) :is(input, select, button) {
    min-width: 44px;
    min-height: 44px;
}

.recipe-form-field {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
    color: var(--sk-text);
    font-weight: 700;
}

.recipe-form-field small {
    color: var(--sk-muted);
    font-weight: 400;
}

.recipe-field-error {
    margin: -8px 0 12px;
    color: var(--sk-danger, #ef6b73);
    font-size: 14px;
    font-weight: 700;
}

.recipe-form-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#recipeIngsModal {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.recipe-ingredient-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(90px, .5fr) minmax(75px, .4fr) auto;
    align-items: end;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--sk-border);
    border-radius: var(--sk-radius-sm);
}

.recipe-ingredient-row label {
    display: grid;
    gap: 7px;
    min-width: 0;
    font-size: 13px;
}

.recipe-ingredient-row .input {
    width: 100%;
}

.recipe-modal-image {
    display: block;
    width: 100%;
    max-height: 260px;
    margin-bottom: 16px;
    border-radius: var(--sk-radius-sm);
    object-fit: cover;
}

@media (max-width: 1024px) {
    .app-shell.product-shell {
        --sk-sidebar: 220px;
    }

    .product-sidebar {
        padding-inline: 16px;
    }

    .product-sidebar > .product-brand {
        padding-inline: 12px;
        font-size: 23px;
    }

    .product-nav .nav-btn {
        gap: 12px;
        min-height: 56px;
        padding-inline: 12px;
        font-size: 16px;
    }

    .product-workspace {
        padding-inline: 28px;
    }

    .today-workspace {
        grid-template-columns: 1fr;
    }

    .product-shell:has(#todayPage.active) { --sk-sidebar: 220px; }
    .product-shell:has(#todayPage.active) .product-workspace { padding: 28px; }
    .product-brand { gap: 8px; }
    .product-sidebar > .product-brand { font-size: 18px; padding-inline: 0; }
    .today-featured { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .today-meal-slot { padding-inline: 18px; }
    .today-meal-slot strong { font-size: 18px; }
    .tomorrow-panel { grid-template-columns: 1fr; }

    .recipe-ready-list,
    .recipes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .today-side-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tomorrow-panel {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .app-shell.product-shell {
        display: block;
        height: 100dvh;
        padding: 0 0 76px;
        overflow: hidden;
    }

    .product-sidebar {
        inset: auto 0 0;
        width: 100%;
        min-height: 0;
        height: 76px;
        padding: 8px max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
        background: var(--sk-surface);
        border-top: 1px solid var(--sk-border);
        border-right: 0;
    }

    .product-sidebar > .product-brand {
        display: none;
    }

    .product-nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        width: 100%;
        margin: 0;
    }

    .product-nav .nav-btn {
        justify-content: center;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
        min-height: 56px;
        padding: 5px 2px;
        font-size: 11px;
        text-align: center;
    }

    .product-nav .nav-icon {
        flex-basis: 20px;
        width: 20px;
        height: 20px;
    }

    .product-nav .nav-label {
        display: block;
        max-width: 100%;
        opacity: 1;
    }

    .account-menu {
        position: fixed;
        top: max(12px, env(safe-area-inset-top));
        right: 14px;
        z-index: 45;
        width: 44px;
        min-height: 44px;
        margin: 0;
        padding: 4px;
        border-color: var(--sk-border);
        background: var(--sk-surface);
        border-radius: var(--sk-radius-sm);
    }

    #accountInitial {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    #accountMenuName {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .account-disclosure {
        display: none;
    }

    .product-workspace {
        height: calc(100dvh - 76px);
        margin: 0;
        padding: 0 18px 28px;
        overflow: auto;
    }

    .product-mobile-header {
        position: sticky;
        top: 0;
        z-index: 20;
        display: flex;
        align-items: center;
        min-height: 68px;
        padding-right: 58px;
        background: var(--sk-bg);
        border-bottom: 1px solid var(--sk-border);
    }

    .product-page {
        min-height: auto;
        padding-top: 24px;
    }

    .product-page-header {
        margin-bottom: 20px;
    }

    .product-page-header h1 {
        font-size: 34px;
    }

    .product-page-mount {
        min-height: 220px;
        padding: 18px;
    }

    .today-page-header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .product-page-header.today-page-header p:not(.product-kicker) {
        font-size: 13px;
        line-height: 1.4;
        white-space: normal;
    }

    .product-shell .today-page-header .btn {
        gap: 8px;
        min-height: 44px;
        padding-inline: 10px;
        font-size: 14px;
        white-space: nowrap;
    }

    .today-page-header .btn img {
        width: 20px;
        height: 20px;
    }

    .today-meal-slots,
    .today-side-column,
    .tomorrow-meals {
        grid-template-columns: 1fr;
    }

    .today-meal-slots {
        margin: 0 0 18px;
        padding: 0;
        min-height: 0;
    }

    .today-meal-slot {
        min-height: 80px;
        gap: 6px;
        padding: 16px 18px;
        border-right: 0;
        border-bottom: 1px solid var(--sk-border);
        box-shadow: none !important;
    }
    .today-meal-slot[data-meal-status="current"]::after { inset: 0 auto 0 0; border: 0; border-left: 3px solid var(--sk-primary); }
    .today-meal-slot strong { font-size: 18px; }
    .today-slot-minutes { font-size: 14px; }
    .product-shell:has(#todayPage.active) .product-workspace { padding: 0 18px 28px; }
    .product-shell:has(#todayPage.active) .product-sidebar { padding-top: 8px; }
    .product-shell:has(#todayPage.active) .product-nav { margin-top: 0; gap: 4px; }
    .product-shell:has(#todayPage.active) .product-nav .nav-btn { min-height: 56px; }
    .product-mobile-header .product-brand { padding: 0; gap: 8px; font-size: 19px; }
    .product-mobile-header .product-brand img { flex-basis: 28px; width: 28px; height: 28px; }
    #todayPage { padding-top: 24px; }
    .today-page-header h1 { font-size: 36px; }
    .today-featured-copy, .today-empty-feature { padding: 24px 20px; }
    .today-featured h3 { font-size: 30px; }
    .today-summary-card { padding: 24px 20px 18px; }
    .today-workspace, .today-side-column { gap: 18px; }
    .today-actions { gap: 8px; }
    .today-actions .btn, .today-link-button { font-size: 16px; }
    .today-missing-button { font-size: 16px; }
    .tomorrow-panel { padding: 20px; gap: 12px; }
    .tomorrow-meals.is-empty { align-items: flex-start; flex-direction: column; gap: 8px; }
    .tomorrow-panel .today-link-button { padding-left: 0; }
    .tomorrow-meal { border: 0; padding: 0; }

    .today-featured {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .today-featured > img {
        order: 0;
        min-height: 0;
        max-height: 240px;
        aspect-ratio: 5 / 3;
    }

    .product-page-header:has(.recipe-add-button) {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .recipe-add-button {
        min-height: 44px;
        padding-inline: 12px;
    }

    .recipe-filter-row {
        flex-wrap: nowrap;
        margin-inline: -2px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .recipe-filter {
        flex: 0 0 auto;
    }

    .recipe-ready-list,
    .recipes-grid {
        grid-template-columns: 1fr;
    }

    .recipe-ready-list {
        display: flex;
        overflow-x: auto;
    }

    .recipe-ready-card {
        flex: 0 0 min(82%, 360px);
    }

    .recipe-card-image {
        height: 160px;
    }

    .recipe-form-columns {
        grid-template-columns: 1fr;
    }

    .modal:has(#recipeIngsModal) {
        max-height: calc(100dvh - 16px);
    }

    .recipe-ingredient-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recipe-ingredient-row label:first-child,
    .recipe-ingredient-row > button {
        grid-column: 1 / -1;
    }

    .tomorrow-meal {
        border-right: 0;
        border-bottom: 1px solid var(--sk-border);
    }

    .tomorrow-meal:last-child {
        border-bottom: 0;
    }

    body .auth-card {
        grid-template-columns: 1fr;
    }

    .auth-intro {
        gap: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
