/* Mobile layouts share the existing palette and preserve desktop/print tables. */
#lunch-prototype .lp-sidebar-close,#lunch-prototype .lp-mobile-table-hint{display:none}
@media screen and (max-width:850px){
 body.lp-mobile-menu-open,body:has(#lunch-prototype dialog[open]){overflow:hidden}
 #lunch-prototype .lp-sidebar{width:min(300px,calc(100vw - 32px));height:100dvh;overscroll-behavior:contain;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom))}
 #lunch-prototype .lp-sidebar-close{display:inline-flex;align-self:flex-end;width:44px;height:44px;min-height:44px;padding:0;margin-bottom:8px;font-size:26px}
 #lunch-prototype .lp-sidebar nav a,#lunch-prototype .lp-sidebar summary{min-height:48px}
 #lunch-prototype .lp-toolbar-button{width:44px;height:44px;min-height:44px;padding:8px}
 #lunch-prototype .lp-header{height:68px;padding-left:12px;padding-right:12px}
 #lunch-prototype .lp-session{gap:6px}
 #lunch-prototype .lp-login-account{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
 #lunch-prototype .lp-header-title{display:none}
 #lunch-prototype .lp-user-dialog{overscroll-behavior:contain;max-height:calc(100dvh - 24px)}
 #lunch-prototype .lp-user-dialog-header{position:sticky;top:0}
 #lunch-prototype .lp-user-dialog-footer{position:sticky;bottom:0;background:var(--lp-surface);z-index:2}
}
@media screen and (max-width:600px){
 #lunch-prototype .lp-main{padding-left:12px;padding-right:12px}
 #lunch-prototype .lp-login-account{max-width:80px}
 #lunch-prototype .lp-breadcrumb{flex-wrap:wrap;gap:6px;overflow-wrap:anywhere}
 #lunch-prototype .lp-page-heading{align-items:flex-start;flex-wrap:wrap}
 #lunch-prototype .lp-page-heading>div{min-width:0;max-width:100%}
 #lunch-prototype .lp-page-heading>button,#lunch-prototype .lp-page-heading>.lp-button{width:100%}
 #lunch-prototype .lp-page-heading .lp-teacher-row-actions{width:100%;justify-content:space-between}
 #lunch-prototype .lp-page-heading h1{font-size:21px;overflow-wrap:anywhere}
 #lunch-prototype .lp-main-banner img{height:150px;object-fit:cover}
 #lunch-prototype .lp-main-banner-brand{max-width:calc(100% - 20px);padding:10px;gap:8px}
 #lunch-prototype .lp-main-banner-brand strong{font-size:14px}
 #lunch-prototype .lp-main-banner-brand small{font-size:10px}
 #lunch-prototype button,#lunch-prototype .lp-button{min-height:44px;max-width:100%;white-space:normal}
 #lunch-prototype button.lp-icon,#lunch-prototype .lp-user-dialog-header .lp-icon{width:44px;height:44px;min-height:44px;flex-shrink:0}
 #lunch-prototype input:not([type=hidden]):not([type=checkbox]),#lunch-prototype select{font-size:16px;min-height:48px;width:100%}
 #lunch-prototype .lp-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 #lunch-prototype .lp-fields label{min-width:0}
 #lunch-prototype .lp-fields button{width:100%}
 #lunch-prototype .lp-panel-head,#lunch-prototype .lp-panel-body{padding:16px}
 #lunch-prototype .lp-panel-head{flex-wrap:wrap;gap:8px}
 #lunch-prototype .lp-date-row{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 #lunch-prototype .lp-date-row label{display:grid;grid-template-columns:minmax(0,1fr);width:100%}
 #lunch-prototype .lp-date-row button,#lunch-prototype .lp-date-row .lp-button{width:100%}
 #lunch-prototype .lp-material-add{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 #lunch-prototype .lp-material-add select{min-width:0}
 #lunch-prototype #plan-save>.lp-primary{width:100%}
 #lunch-prototype .lp-stat{min-height:112px;gap:8px}
 #lunch-prototype .lp-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
 #lunch-prototype .lp-overview .lp-stat:last-child{grid-column:1/-1;flex-direction:row;justify-content:flex-start}
 #lunch-prototype .lp-stat .lp-stat-money{font-size:22px}
 #lunch-prototype .lp-footer{flex-direction:column;align-items:flex-start;gap:4px}
 #lunch-prototype .lp-user-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);border-radius:12px}
 #lunch-prototype .lp-user-dialog-body{padding:16px;gap:14px}
 #lunch-prototype .lp-user-dialog-header,#lunch-prototype .lp-user-dialog-footer{padding:10px 12px}
 #lunch-prototype .lp-user-dialog-header h2{font-size:17px}
 #lunch-prototype .lp-user-dialog-footer{display:grid;grid-template-columns:1fr 1fr;gap:10px}
 #lunch-prototype .lp-user-dialog-footer button{width:100%}
 #lunch-prototype .lp-user-dialog input:not([type=checkbox]),#lunch-prototype .lp-user-dialog select{height:48px}
 #lunch-prototype .lp-user-password-toggle{width:44px;height:44px;top:2px;right:2px}
 #lunch-prototype .lp-user-password-entry input{padding-right:52px!important}
 #lunch-prototype .lp-user-name-row,#lunch-prototype .lp-user-duty-row,#lunch-prototype .lp-user-account-row,#lunch-prototype .lp-user-school-row{grid-template-columns:minmax(0,1fr)}
 #lunch-prototype .lp-menu-ingredient-entry{flex-direction:column}
 #lunch-prototype .lp-menu-ingredient-list li{padding:6px 10px}
 #lunch-prototype .lp-committee-selected>div{grid-template-columns:minmax(0,1fr);gap:4px}
 #lunch-prototype .lp-mobile-cards{display:block;min-width:0;width:100%;border:0}
 #lunch-prototype .lp-mobile-cards thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #lunch-prototype .lp-mobile-cards tbody{display:grid;gap:12px;padding:12px}
 #lunch-prototype .lp-mobile-cards tbody tr{display:grid;grid-template-columns:minmax(0,1fr);border:1px solid var(--lp-line);border-radius:10px;overflow:hidden;background:var(--lp-surface)}
 #lunch-prototype .lp-mobile-cards tbody td{display:block;width:auto!important;height:auto;min-width:0;padding:10px 12px;text-align:left;white-space:normal;overflow-wrap:anywhere;border:0}
 #lunch-prototype .lp-mobile-cards tbody td+td{border-top:1px solid var(--lp-line)}
 #lunch-prototype .lp-mobile-cards td[data-label]::before{content:attr(data-label);display:block;font-size:12px;line-height:1.5;font-weight:400;color:var(--lp-muted);margin-bottom:5px}
 #lunch-prototype .lp-mobile-cards td:first-child{font-weight:500}
 #lunch-prototype .lp-mobile-cards .lp-teacher-row-actions{display:flex;justify-content:flex-end;gap:10px}
 #lunch-prototype .lp-mobile-cards .lp-teacher-actions-column{width:auto}
 #lunch-prototype .lp-mobile-cards button.lp-teacher-edit,#lunch-prototype .lp-mobile-cards button.lp-teacher-delete{width:44px;height:44px}
 #lunch-prototype .lp-mobile-cards .lp-committee-use{padding:10px 0;margin:0;min-height:44px}
 #lunch-prototype .lp-mobile-cards.lp-users-table tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))}
 #lunch-prototype .lp-users-table.lp-mobile-cards td:first-child,#lunch-prototype .lp-users-table.lp-mobile-cards td:nth-child(2),#lunch-prototype .lp-users-table.lp-mobile-cards td:last-child{grid-column:1/-1}
 #lunch-prototype .lp-mobile-cards.lp-materials tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))}
 #lunch-prototype .lp-materials.lp-mobile-cards td:first-child,#lunch-prototype .lp-materials.lp-mobile-cards td:last-child{grid-column:1/-1}
 #lunch-prototype .lp-materials.lp-mobile-cards td input{width:100%;text-align:left}
 #lunch-prototype .lp-materials.lp-mobile-cards [data-line-total]{font-size:18px;font-weight:600}
 #lunch-prototype .lp-users-table small{max-width:none;font-size:11px}
 #lunch-prototype .lp-table-wrap:has(.lp-mobile-cards){overflow:visible}
 #lunch-prototype .lp-paper{overflow-wrap:anywhere}
 #lunch-prototype .lp-paper .lp-table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
 #lunch-prototype .lp-paper table{min-width:460px}
 #lunch-prototype .lp-mobile-table-hint{display:block;color:var(--lp-muted);font-size:11px;margin:12px 0 6px}
 #lunch-prototype .lp-login-form{padding:18px}
 #lunch-prototype .lp-login-eye{width:44px;height:44px;right:2px}
}
@media screen and (max-width:360px){#lunch-prototype .lp-login-account{max-width:62px}#lunch-prototype .lp-logout-trigger{padding-left:10px;padding-right:10px}}
@media print{#lunch-prototype .lp-sidebar-close,#lunch-prototype .lp-mobile-table-hint{display:none!important}}

@media screen and (max-width:600px){
 #lunch-prototype .lp-users-table button,#lunch-prototype .lp-committee-use{font-size:13px}
 #lunch-prototype .lp-inline-label,#lunch-prototype .lp-user-active-switch,#lunch-prototype .lp-login-remember{min-height:44px}
 #lunch-prototype .lp-sidebar .lp-nav-children a{font-size:13px}
}
@media screen and (max-width:600px){#lunch-prototype #plan-save fieldset>.lp-primary{width:100%}}
/* Menu control remains reachable when the sidebar is collapsed. */
#lunch-prototype>.lp-shell-menu-toggle{position:fixed;top:24px;left:calc(var(--lp-sidebar-width) - 60px);z-index:40;background:var(--lp-surface);border:1px solid var(--lp-line);border-radius:8px}
#lunch-prototype .lp-sidebar .lp-brand{padding-top:44px}
#lunch-prototype.lp-sidebar-collapsed>.lp-shell-menu-toggle{left:20px}
#lunch-prototype.lp-sidebar-collapsed .lp-header .lp-toolbar{margin-left:48px}
@media screen and (max-width:850px){
 #lunch-prototype>.lp-shell-menu-toggle,#lunch-prototype.lp-sidebar-collapsed>.lp-shell-menu-toggle{top:12px;left:12px}
 #lunch-prototype .lp-header .lp-toolbar{margin-left:52px}
 #lunch-prototype .lp-sidebar .lp-brand{padding-top:0}
 #lunch-prototype.lp-menu-open>.lp-shell-menu-toggle{visibility:hidden}
}
@media print{#lunch-prototype>.lp-shell-menu-toggle{display:none!important}}
/* The supplied inner-page banner has a narrow illustrated band in its center. */
@media screen{
 #lunch-prototype .lp-main-banner.lp-internal-banner{aspect-ratio:1959 / 246;min-height:90px;max-height:210px}
 #lunch-prototype .lp-main-banner.lp-internal-banner>img{position:absolute;top:50%;left:0;transform:translateY(-50%);width:100%;height:326.422765%;object-fit:cover;object-position:right center}
}
@media screen{
 #lunch-prototype .lp-main-banner.lp-internal-banner{width:100%;min-width:0}
}
@media screen and (max-width:600px){#lunch-prototype .lp-mobile-cards thead{display:block}}
#lunch-prototype .lp-menu-table th:first-child{width:70px}
#lunch-prototype .lp-menu-table th:nth-child(2){width:28%}
#lunch-prototype .lp-menu-table td{vertical-align:top}
#lunch-prototype .lp-menu-table .lp-menu-ingredients{list-style:none;padding:0;margin:0;gap:5px}
#lunch-prototype .lp-menu-table .lp-menu-ingredients span{white-space:nowrap}
#lunch-prototype .lp-menu-recipe-entry{display:grid;grid-template-columns:minmax(0,1fr) 90px 90px auto;gap:10px;align-items:end}
#lunch-prototype .lp-menu-recipe-entry label{min-width:0}
#lunch-prototype .lp-menu-ingredient-list li{display:grid;grid-template-columns:minmax(0,1fr) 90px 90px 36px;gap:10px;align-items:center}
@media screen and (max-width:600px){
 #lunch-prototype .lp-menu-recipe-entry{grid-template-columns:repeat(2,minmax(0,1fr))}
 #lunch-prototype .lp-menu-recipe-entry>label:first-child,#lunch-prototype .lp-menu-recipe-entry>button{grid-column:1/-1}
 #lunch-prototype .lp-menu-ingredient-list li{grid-template-columns:repeat(2,minmax(0,1fr))}
 #lunch-prototype .lp-menu-ingredient-list li>span{grid-column:1/-1}
 #lunch-prototype .lp-menu-ingredient-list li>button{grid-column:1/-1;justify-self:end}
}
@media screen{
 #lunch-prototype .lp-header{height:52px}
 #lunch-prototype .lp-main{padding-top:0}
 #lunch-prototype.lp-sidebar-collapsed>.lp-shell-menu-toggle{top:6px}
 #lunch-prototype .lp-menu-table .lp-menu-actions{width:112px;text-align:right;white-space:nowrap;vertical-align:middle}
}
@media screen and (max-width:850px){#lunch-prototype .lp-header{height:60px}#lunch-prototype.lp-sidebar-collapsed>.lp-shell-menu-toggle{top:12px}}
@media screen and (max-width:600px){#lunch-prototype .lp-menu-table.lp-mobile-cards .lp-menu-actions{width:auto;white-space:normal}}
#lunch-prototype .lp-menu-page-title{padding:0;background:transparent;border-radius:0;color:var(--lp-ink);align-items:center}
#lunch-prototype .lp-menu-page-title h1{display:flex;gap:10px;align-items:center;font-size:22px}
#lunch-prototype .lp-menu-page-title p{font-size:12px;color:var(--lp-muted)}
#lunch-prototype .lp-menu-school{font-size:11px;border:1px solid var(--lp-line);padding:6px 10px;border-radius:6px;overflow-wrap:anywhere}
#lunch-prototype .lp-menu-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}
#lunch-prototype .lp-menu-overview>div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px;background:var(--lp-soft);border:1px solid var(--lp-line);border-radius:8px;font-size:12px}
#lunch-prototype .lp-menu-overview strong{font-size:24px;color:var(--lp-accent)}
#lunch-prototype .lp-menu-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:16px;flex-wrap:wrap}
#lunch-prototype .lp-menu-filter{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;min-width:0}
#lunch-prototype .lp-menu-filter label{font-size:12px;min-width:0}
#lunch-prototype .lp-menu-filter input{width:220px}
#lunch-prototype .lp-menu-filter select{max-width:210px}
#lunch-prototype .lp-menu-toolbar-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#lunch-prototype .lp-menu-export{display:flex;align-items:center;gap:6px}
#lunch-prototype .lp-menu-export>a,#lunch-prototype .lp-menu-export>button{width:38px;height:38px;min-height:38px;padding:7px;border-radius:6px;color:white;border:0}
#lunch-prototype .lp-menu-export .lp-export-refresh{background:#1675ed}#lunch-prototype .lp-menu-export .lp-export-print{background:#38a1f4}#lunch-prototype .lp-menu-export .lp-export-pdf{background:#fa5273}#lunch-prototype .lp-menu-export .lp-export-excel{background:#28b94b}#lunch-prototype .lp-menu-export .lp-export-word{background:#2862ce}
#lunch-prototype .lp-menu-print-heading{display:none}
@media screen and (max-width:600px){#lunch-prototype .lp-menu-page-title{padding:0}#lunch-prototype .lp-menu-page-title h1{font-size:20px}#lunch-prototype .lp-menu-overview{grid-template-columns:minmax(0,1fr);gap:8px}#lunch-prototype .lp-menu-overview>div{padding:12px 16px}#lunch-prototype .lp-menu-toolbar,#lunch-prototype .lp-menu-filter,#lunch-prototype .lp-menu-toolbar-actions{display:grid;grid-template-columns:minmax(0,1fr);width:100%}#lunch-prototype .lp-menu-filter select{max-width:100%}#lunch-prototype .lp-menu-export{justify-content:space-between}#lunch-prototype .lp-menu-export>a,#lunch-prototype .lp-menu-export>button{width:44px;height:44px;min-height:44px}}
@media print{#lunch-prototype .lp-menu-overview,#lunch-prototype .lp-menu-toolbar,#lunch-prototype .lp-menu-actions{display:none!important}#lunch-prototype .lp-menu-print-heading{display:block;margin-bottom:18px;text-align:center}#lunch-prototype .lp-menu-table{width:100%}#lunch-prototype .lp-panel:has(.lp-menu-table){border:0}#lunch-prototype .lp-menu-table thead{display:table-header-group}}
/* Shared school header for every signed-in page. */
#lunch-prototype.lp-catalog-header-layout{--lp-catalog-bar-height:76px}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-topbar{position:fixed;inset:0 0 auto;height:var(--lp-catalog-bar-height);z-index:40;display:flex;align-items:center;gap:16px;padding:10px 16px;background:#212529;color:#fff;box-shadow:0 2px 6px #142c4812}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-topbar .lp-toolbar-button{position:static;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:6px;color:#fff;background:#343a40;border:1px solid #50565c;border-radius:6px}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-menu-button{font-size:24px}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand{display:flex;align-items:center;gap:12px;flex:1;min-width:0}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand>div{min-width:0}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand-icon{display:grid;place-items:center;width:36px;height:36px;color:var(--lp-accent);flex-shrink:0}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand-icon .lp-nav-icon{width:32px;height:32px}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand strong{display:block;font-size:24px;line-height:1.3;font-weight:600}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand small{font-size:11px;color:#bac2c9;margin-top:4px}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-topbar .lp-session{flex-shrink:0;gap:12px}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-logout{min-height:44px;background:#fff;color:#182c44;font-size:13px;padding:8px 14px;border-radius:6px}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-logout-icon{display:none}
#lunch-prototype.lp-catalog-header-layout .lp-sidebar{top:var(--lp-catalog-bar-height);height:calc(100dvh - var(--lp-catalog-bar-height));padding-top:18px}
#lunch-prototype.lp-catalog-header-layout .lp-sidebar .lp-brand{padding-top:0}
#lunch-prototype.lp-catalog-header-layout .lp-workspace{padding-top:var(--lp-catalog-bar-height)}
#lunch-prototype.lp-catalog-header-layout .lp-main{padding-top:18px}
@media screen and (max-width:850px){#lunch-prototype.lp-catalog-header-layout .lp-backdrop{top:var(--lp-catalog-bar-height)}#lunch-prototype.lp-catalog-header-layout .lp-sidebar{padding-top:10px}#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand strong{font-size:20px}}
@media screen and (max-width:600px){#lunch-prototype.lp-catalog-header-layout{--lp-catalog-bar-height:64px}#lunch-prototype.lp-catalog-header-layout .lp-catalog-topbar{padding:8px;gap:10px}#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand{gap:6px}#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand-icon{width:28px}#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand-icon .lp-nav-icon{width:28px;height:28px}#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand strong{font-size:16px;line-height:1.35}#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand small{display:none}#lunch-prototype.lp-catalog-header-layout .lp-catalog-topbar .lp-session{gap:6px}#lunch-prototype.lp-catalog-header-layout .lp-catalog-logout{width:44px;height:44px;min-height:44px;padding:8px}#lunch-prototype.lp-catalog-header-layout .lp-catalog-logout-icon{display:inline-flex}#lunch-prototype.lp-catalog-header-layout .lp-catalog-logout-label{display:none}#lunch-prototype.lp-catalog-header-layout .lp-main{padding-top:12px}}
@media screen and (max-width:360px){#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand strong{font-size:14px}#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand-icon{display:none}}
@media print{#lunch-prototype.lp-catalog-header-layout .lp-catalog-topbar{display:none!important}#lunch-prototype.lp-catalog-header-layout .lp-workspace{padding-top:0}#lunch-prototype.lp-catalog-header-layout .lp-main{padding-top:0}}
@media screen and (max-width:850px){#lunch-prototype.lp-catalog-header-layout .lp-backdrop{inset:var(--lp-catalog-bar-height) 0 0;height:auto}}
/* Blue school header keeps logout anchored inside the existing fixed topbar. */
#lunch-prototype.lp-catalog-header-layout .lp-catalog-topbar{background:var(--lp-accent)}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-topbar .lp-toolbar-button{background:#ffffff1a;border-color:#ffffff66}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand small{color:#fff;opacity:.9}
#lunch-prototype.lp-catalog-header-layout .lp-school-seal{--lp-seal-size:48px;display:block;width:var(--lp-seal-size);height:var(--lp-seal-size);overflow:hidden;background:transparent;flex-shrink:0}
#lunch-prototype.lp-catalog-header-layout .lp-school-seal img{display:block;width:calc(var(--lp-seal-size) * 150 / 44);height:var(--lp-seal-size);max-width:none;object-fit:contain}
#lunch-prototype.lp-catalog-header-layout .lp-catalog-logout-short{display:none}
@media screen and (max-width:850px){#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand strong{font-size:18px}}
@media screen and (max-width:600px){#lunch-prototype.lp-catalog-header-layout{--lp-catalog-bar-height:76px}#lunch-prototype.lp-catalog-header-layout .lp-school-seal{--lp-seal-size:36px;display:block}#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand strong{font-size:14px;line-height:1.3}#lunch-prototype.lp-catalog-header-layout .lp-catalog-logout-icon{display:none}#lunch-prototype.lp-catalog-header-layout .lp-catalog-logout-short{display:inline}#lunch-prototype.lp-catalog-header-layout .lp-catalog-logout{padding:4px}}
@media screen and (max-width:360px){#lunch-prototype.lp-catalog-header-layout .lp-school-seal{--lp-seal-size:32px;display:block}#lunch-prototype.lp-catalog-header-layout .lp-catalog-brand strong{font-size:12px}}
#lunch-prototype.lp-catalog-header-layout .lp-school-seal{position:relative}
#lunch-prototype.lp-catalog-header-layout .lp-school-seal img{position:absolute;left:0;top:0}

#lunch-prototype .lp-menu-name{font-weight:400}
#lunch-prototype .lp-menu-row-recipes{display:none!important}
#lunch-prototype .lp-menu-view{color:var(--lp-accent);border-color:#b9e5ff;width:34px;height:34px;padding:7px}
#lunch-prototype .lp-menu-table .lp-menu-actions{width:154px}
#lunch-prototype .lp-menu-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:16px;font-size:12px;color:var(--lp-muted);border-top:1px solid var(--lp-line)}
#lunch-prototype .lp-menu-pagination>div{display:flex;align-items:center;gap:10px}
#lunch-prototype .lp-menu-details-table-wrap table{width:100%;min-width:0}
#lunch-prototype .lp-menu-details-table-wrap td{overflow-wrap:anywhere}
@media screen and (max-width:600px){#lunch-prototype .lp-menu-view{width:44px;height:44px}#lunch-prototype .lp-menu-pagination{align-items:flex-start;flex-direction:column}#lunch-prototype .lp-menu-pagination>div{width:100%;justify-content:space-between}#lunch-prototype .lp-menu-details-table-wrap .lp-mobile-cards tbody{padding:0}#lunch-prototype #menu-details-dialog .lp-user-dialog-footer{display:flex;justify-content:flex-end}#lunch-prototype #menu-details-dialog .lp-user-dialog-footer button{width:auto;min-width:88px}}
@media print{#lunch-prototype .lp-menu-row-recipes{display:grid!important}#lunch-prototype .lp-menu-recipe-placeholder,#lunch-prototype .lp-menu-pagination{display:none!important}}
#lunch-prototype .lp-home-credit{max-width:1140px;margin:28px auto 0;padding:18px 16px;text-align:center;color:var(--lp-muted);font-size:12px;line-height:1.8;overflow-wrap:anywhere}
#lunch-prototype .lp-home-credit>p:first-child{color:var(--lp-ink);font-weight:500}
#lunch-prototype .lp-home-credit address{margin:0;font-style:normal}
#lunch-prototype .lp-home-credit a{display:inline-block;color:var(--lp-accent);text-decoration:none;padding:5px 0}
#lunch-prototype .lp-home-credit a:hover{text-decoration:underline}
@media screen and (max-width:600px){#lunch-prototype .lp-home-credit{margin-top:20px;padding:16px 8px}#lunch-prototype .lp-home-credit a{min-height:44px;display:inline-flex;align-items:center;justify-content:center}}
@media print{#lunch-prototype .lp-home-credit{display:none!important}}
/* Compact recipe rows with inline labels; form names and save behavior are unchanged. */
#lunch-prototype #menu-add-dialog .lp-menu-ingredient-list{gap:6px}
#lunch-prototype #menu-add-dialog .lp-menu-ingredient-list li{grid-template-columns:minmax(0,1fr) 138px 128px 34px;padding:4px 10px;gap:8px}
#lunch-prototype #menu-add-dialog .lp-menu-ingredient-list label,#lunch-prototype #menu-add-dialog .lp-menu-recipe-entry>label:nth-child(2),#lunch-prototype #menu-add-dialog .lp-menu-recipe-entry>label:nth-child(3){display:flex;flex-direction:row;align-items:center;gap:6px;white-space:nowrap}
#lunch-prototype #menu-add-dialog .lp-menu-ingredient-list label input,#lunch-prototype #menu-add-dialog .lp-menu-recipe-entry>label:nth-child(2) input,#lunch-prototype #menu-add-dialog .lp-menu-recipe-entry>label:nth-child(3) input{flex:1;width:0;min-width:0}
#lunch-prototype #menu-add-dialog .lp-menu-ingredient-list input:not([type=hidden]){height:36px;min-height:36px;padding:6px 8px;font-size:13px}
#lunch-prototype #menu-add-dialog .lp-menu-recipe-entry{grid-template-columns:minmax(0,1fr) 138px 128px auto}
#lunch-prototype #menu-add-dialog .lp-menu-close{background:#6c757d;border-color:#6c757d;color:#fff}
#lunch-prototype #menu-add-dialog .lp-menu-close:hover{background:#5c636a;border-color:#5c636a;color:#fff}
@media screen and (max-width:600px){
 #lunch-prototype #menu-add-dialog .lp-menu-recipe-entry{grid-template-columns:repeat(2,minmax(0,1fr))}
 #lunch-prototype #menu-add-dialog .lp-menu-ingredient-list li{position:relative;grid-template-columns:repeat(2,minmax(0,1fr))}
 #lunch-prototype #menu-add-dialog .lp-menu-ingredient-list li>span{grid-column:1/-1;min-height:44px;display:flex;align-items:center;padding-right:48px}
 #lunch-prototype #menu-add-dialog .lp-menu-ingredient-list li>button{position:absolute;top:4px;right:8px;grid-column:auto;width:44px;height:44px}
 #lunch-prototype #menu-add-dialog .lp-menu-ingredient-list input:not([type=hidden]){height:44px;min-height:44px;font-size:16px}
}

/* Match entry and saved recipe columns inside the menu editor. */
@media screen and (min-width:601px){
 #lunch-prototype #menu-add-dialog .lp-menu-recipe-entry,#lunch-prototype #menu-add-dialog .lp-menu-ingredient-list li{grid-template-columns:minmax(0,1fr) 138px 128px 68px;gap:8px}
 #lunch-prototype #menu-add-dialog .lp-menu-recipe-entry{padding:0 10px;border:1px solid transparent}
 #lunch-prototype #menu-add-dialog .lp-menu-recipe-entry>button{width:68px;padding-left:6px;padding-right:6px}
 #lunch-prototype #menu-add-dialog .lp-menu-ingredient-list li>button{justify-self:end}
}
/* Per-menu exports reuse the existing colors and preserve management actions. */
#lunch-prototype .lp-menu-table .lp-menu-actions{width:310px}
#lunch-prototype .lp-menu-row-tools{display:flex;align-items:center;justify-content:flex-end;gap:10px}
#lunch-prototype .lp-menu-row-export{flex:none}
#lunch-prototype .lp-menu-row-export>a{width:32px;height:34px;min-height:34px;padding:6px}
#lunch-prototype .lp-menu-row-export .lp-nav-icon{width:18px;height:18px}
@media screen and (max-width:600px){#lunch-prototype .lp-menu-table.lp-mobile-cards .lp-menu-actions{width:auto}#lunch-prototype .lp-menu-row-tools{flex-wrap:wrap;justify-content:flex-start;gap:12px}#lunch-prototype .lp-menu-row-export{gap:6px;justify-content:flex-start}#lunch-prototype .lp-menu-row-export>a{width:44px;height:44px;min-height:44px;padding:9px}}
@media print{#lunch-prototype .lp-menu-row-tools{display:none!important}}
/* Preserve the full 3:1 login artwork, including its lower edge. */
#lunch-prototype .lp-auth-cover-compact{width:min(1166px,calc(100% - 40px))}
#lunch-prototype .lp-auth-card .lp-login-cover-compact{aspect-ratio:3 / 1;overflow:hidden}
#lunch-prototype .lp-auth-card .lp-login-cover-compact img{display:block;width:100%;height:auto;object-fit:contain;object-position:center}
@media screen and (max-width:700px){#lunch-prototype .lp-auth-cover-compact{width:calc(100% - 24px)}#lunch-prototype .lp-auth-card .lp-login-cover-compact{aspect-ratio:3 / 1}}

/* One outline style for all menu icon actions; printer also saves PDF. */
#lunch-prototype .lp-menu-export>a,#lunch-prototype .lp-menu-export>button,#lunch-prototype .lp-menu-row-tools .lp-icon{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;min-height:34px;padding:7px;border-width:1px;border-style:solid;border-radius:7px;background:var(--lp-surface,#fff);flex-shrink:0}
#lunch-prototype .lp-menu-export .lp-export-refresh{color:#1675ed;border-color:#b8d5fb;background:var(--lp-surface,#fff)}
#lunch-prototype .lp-menu-export .lp-export-print{color:#009fed;border-color:#b9e5ff;background:var(--lp-surface,#fff)}
#lunch-prototype .lp-menu-export .lp-export-excel{color:#20a447;border-color:#bde8c7;background:var(--lp-surface,#fff)}
#lunch-prototype .lp-menu-export .lp-export-word{color:#2862ce;border-color:#bdd0f3;background:var(--lp-surface,#fff)}
#lunch-prototype .lp-menu-export .lp-nav-icon,#lunch-prototype .lp-menu-row-tools .lp-nav-icon{width:18px;height:18px}
#lunch-prototype .lp-menu-row-tools .lp-teacher-row-actions{gap:6px}
#lunch-prototype .lp-menu-export>a:hover,#lunch-prototype .lp-menu-export>button:hover{background:var(--lp-soft,#e5f5ff)}
@media screen and (max-width:600px){#lunch-prototype .lp-menu-export>a,#lunch-prototype .lp-menu-export>button,#lunch-prototype .lp-menu-row-tools .lp-icon{width:44px;height:44px;min-height:44px;padding:10px}}

/* Show column labels once above the compact recipe rows. */
@media screen and (min-width:601px){
 #lunch-prototype #menu-add-dialog .lp-menu-recipe-entry,#lunch-prototype #menu-add-dialog .lp-menu-ingredient-list li{grid-template-columns:minmax(0,1fr) 108px 108px 68px;gap:8px}
 #lunch-prototype #menu-add-dialog .lp-menu-recipe-entry>label:nth-child(2),#lunch-prototype #menu-add-dialog .lp-menu-recipe-entry>label:nth-child(3){display:flex;flex-direction:column;align-items:stretch;gap:4px}
 #lunch-prototype #menu-add-dialog .lp-menu-recipe-entry>label:nth-child(2) input,#lunch-prototype #menu-add-dialog .lp-menu-recipe-entry>label:nth-child(3) input{width:100%;flex:none}
 #lunch-prototype #menu-add-dialog .lp-menu-ingredient-list label{display:block}
 #lunch-prototype #menu-add-dialog .lp-menu-ingredient-list label input{width:100%}
 #lunch-prototype #menu-add-dialog .lp-menu-ingredient-list{gap:4px}
 #lunch-prototype #menu-add-dialog .lp-menu-ingredient-list li{padding:2px 8px;min-height:38px}
 #lunch-prototype #menu-add-dialog .lp-menu-ingredient-list input:not([type=hidden]){height:32px;min-height:32px;padding:4px 7px}
 #lunch-prototype #menu-add-dialog .lp-menu-ingredient-list li>button{height:32px;min-height:32px;width:32px;padding:4px}
}

/* Compact catalog rows; keep the existing desktop and touch targets. */
@media screen and (min-width:601px){
 #lunch-prototype .lp-menu-table tbody td{padding:6px 12px;vertical-align:middle}
 #lunch-prototype .lp-menu-table thead th{padding:8px 12px}
}

/* Shared navigation and comfortable phone/tablet controls. */
#lunch-prototype .lp-mobile-navigation{display:none}
#lunch-prototype .lp-navigation-trail{margin:0 0 16px;font-size:12px;color:var(--lp-muted)}
#lunch-prototype .lp-navigation-trail ol{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;list-style:none;padding:0;margin:0}
#lunch-prototype .lp-navigation-trail li{min-width:0;overflow-wrap:anywhere}
#lunch-prototype .lp-navigation-trail li+li:before{content:'›';margin-right:10px;color:var(--lp-muted)}
#lunch-prototype .lp-navigation-trail a{color:var(--lp-accent);text-decoration:none}
#lunch-prototype .lp-navigation-trail [aria-current=page]{color:var(--lp-ink)}
@media screen and (max-width:850px){
 #lunch-prototype .lp-mobile-navigation{position:fixed;inset:auto 0 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));min-height:70px;padding:4px max(4px,env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left));background:var(--lp-surface);border-top:1px solid var(--lp-line);box-shadow:0 -2px 10px #142c480d;z-index:24}
 #lunch-prototype .lp-mobile-navigation>a,#lunch-prototype .lp-mobile-navigation>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:58px;width:100%;padding:5px 2px;border:0;border-radius:8px;background:transparent;color:var(--lp-muted);text-decoration:none;font-size:11px;line-height:1.4;white-space:normal}
 #lunch-prototype .lp-mobile-navigation :is(a[aria-current=page],a[aria-current=true],button[aria-expanded=true]){background:var(--lp-soft);color:var(--lp-accent)}
 #lunch-prototype .lp-mobile-navigation .lp-nav-icon{width:22px;height:22px}
 #lunch-prototype .lp-mobile-menu-symbol{font-size:23px;line-height:22px}
 #lunch-prototype.lp-catalog-header-layout .lp-main{padding-bottom:calc(90px + env(safe-area-inset-bottom))}
 #lunch-prototype .lp-navigation-trail{font-size:11px;margin-bottom:12px}
 #lunch-prototype .lp-user-dialog{max-height:calc(100dvh - 24px)}
 #lunch-prototype input:not([type=hidden]):not([type=checkbox]):not([type=radio]),#lunch-prototype select{font-size:16px;min-height:44px}
 #lunch-prototype .lp-menu-row-tools :is(button,a),#lunch-prototype .lp-teacher-row-actions .lp-icon{min-width:44px;min-height:44px;width:44px;height:44px}
 #lunch-prototype #menu-add-dialog .lp-menu-ingredient-list input:not([type=hidden]),#lunch-prototype #menu-add-dialog .lp-menu-ingredient-list li>button{min-height:44px;height:44px}
 #lunch-prototype #menu-add-dialog .lp-menu-ingredient-list li>button{width:44px}
}
@media print{#lunch-prototype .lp-mobile-navigation,#lunch-prototype .lp-navigation-trail{display:none!important}}

@media screen and (min-width:601px) and (max-width:850px){
 #lunch-prototype .lp-mobile-cards{display:block;min-width:0;width:100%;border:0}
 #lunch-prototype .lp-mobile-cards thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #lunch-prototype .lp-mobile-cards tbody{display:grid;gap:12px;padding:12px}
 #lunch-prototype .lp-mobile-cards tbody tr{display:grid;grid-template-columns:minmax(0,1fr);border:1px solid var(--lp-line);border-radius:10px;overflow:hidden;background:var(--lp-surface)}
 #lunch-prototype .lp-mobile-cards tbody td{display:block;width:auto!important;height:auto;min-width:0;padding:10px 12px;text-align:left;white-space:normal;overflow-wrap:anywhere;border:0}
 #lunch-prototype .lp-mobile-cards tbody td+td{border-top:1px solid var(--lp-line)}
 #lunch-prototype .lp-mobile-cards td[data-label]::before{content:attr(data-label);display:block;font-size:12px;line-height:1.5;font-weight:400;color:var(--lp-muted);margin-bottom:5px}
 #lunch-prototype .lp-mobile-cards td:first-child{font-weight:500}
 #lunch-prototype .lp-mobile-cards .lp-teacher-row-actions{display:flex;justify-content:flex-end;gap:10px}
 #lunch-prototype .lp-mobile-cards .lp-teacher-actions-column{width:auto}
 #lunch-prototype .lp-mobile-cards button.lp-teacher-edit,#lunch-prototype .lp-mobile-cards button.lp-teacher-delete{width:44px;height:44px}
 #lunch-prototype .lp-mobile-cards .lp-committee-use{padding:10px 0;margin:0;min-height:44px}
 #lunch-prototype .lp-mobile-cards.lp-users-table tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))}
 #lunch-prototype .lp-users-table.lp-mobile-cards td:first-child,#lunch-prototype .lp-users-table.lp-mobile-cards td:nth-child(2),#lunch-prototype .lp-users-table.lp-mobile-cards td:last-child{grid-column:1/-1}
 #lunch-prototype .lp-mobile-cards.lp-materials tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))}
 #lunch-prototype .lp-materials.lp-mobile-cards td:first-child,#lunch-prototype .lp-materials.lp-mobile-cards td:last-child{grid-column:1/-1}
 #lunch-prototype .lp-materials.lp-mobile-cards td input{width:100%;text-align:left}
 #lunch-prototype .lp-materials.lp-mobile-cards [data-line-total]{font-size:18px;font-weight:600}
 #lunch-prototype .lp-users-table small{max-width:none;font-size:11px}
 #lunch-prototype .lp-table-wrap:has(.lp-mobile-cards){overflow:visible}

#lunch-prototype .lp-menu-row-tools{flex-wrap:wrap;justify-content:flex-end;gap:8px}
}

/* Compact login panels keep the full cover and allow content to grow on phones. */
@media screen{
 #lunch-prototype .lp-auth-card .lp-login-layout{padding:18px;gap:20px}
 #lunch-prototype .lp-auth-card .lp-login-guide{padding:20px}
 #lunch-prototype .lp-auth-card .lp-login-steps{margin:16px 0 0;gap:10px}
 #lunch-prototype .lp-auth-card .lp-login-steps li{padding:12px;gap:12px;align-items:center}
 #lunch-prototype .lp-auth-card .lp-step-number{width:34px;height:34px;font-size:18px;border-radius:8px}
 #lunch-prototype .lp-auth-card .lp-login-steps h3{margin:0 0 4px}
 #lunch-prototype .lp-auth-card .lp-login-steps p{line-height:1.65}
 #lunch-prototype .lp-auth-card .lp-login-card-brand{padding:18px 20px}
 #lunch-prototype .lp-auth-card .lp-login-card-brand h2{margin:0 0 4px}
 #lunch-prototype .lp-auth-card .lp-login-form{padding:18px 24px;gap:12px}
 #lunch-prototype .lp-auth-card .lp-login-form input:not([type=checkbox]){height:44px}
 #lunch-prototype .lp-auth-card .lp-login-submit{min-height:44px}
}
@media screen and (max-width:700px){
 #lunch-prototype .lp-auth-card .lp-login-layout{padding:12px;gap:12px}
 #lunch-prototype .lp-auth-card .lp-login-guide{padding:16px}
 #lunch-prototype .lp-auth-card .lp-login-card-brand{padding:16px}
 #lunch-prototype .lp-auth-card .lp-login-form{padding:16px;gap:10px}
 #lunch-prototype .lp-auth-card .lp-login-steps li{padding:10px;gap:10px}
 #lunch-prototype .lp-auth-card .lp-login-steps li>div{min-width:0;overflow-wrap:anywhere}
}

/* Monthly history is a filterable list, using the shared mobile table cards. */
#lunch-prototype .ms-filters{display:grid;grid-template-columns:200px 240px minmax(160px,1fr) minmax(195px,.7fr) auto;gap:12px;align-items:start;padding:16px;margin-bottom:16px}
#lunch-prototype .ms-filters>label{display:grid;grid-template-rows:22px 48px auto;gap:6px;min-width:0;margin:0;line-height:22px}
#lunch-prototype .ms-filters input,#lunch-prototype .ms-filters select{width:100%;min-width:0;min-height:48px;height:48px;margin:0}
#lunch-prototype .ms-filters .lp-date-hint{margin:0;line-height:16px}
#lunch-prototype .ms-filters .ms-filter-actions{padding-top:28px}
#lunch-prototype .ms-filter-actions,#lunch-prototype .ms-row-actions{display:flex;align-items:center;gap:8px}
#lunch-prototype .ms-filter-actions>*{min-height:48px;height:48px;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center}
#lunch-prototype .ms-row-actions{justify-content:flex-end}
#lunch-prototype .ms-row-actions form{margin:0}
#lunch-prototype .ms-actions-column{width:110px;text-align:right}
#lunch-prototype .ms-table td{padding:9px 12px;vertical-align:middle;overflow-wrap:anywhere}
#lunch-prototype .ms-table td:first-child{white-space:nowrap}
#lunch-prototype .ms-table td:last-child{width:110px}
#lunch-prototype .ms-table .lp-food-action{display:inline-flex;align-items:center;justify-content:center}
#lunch-prototype .ms-table button:disabled{opacity:.45;cursor:not-allowed}
#lunch-prototype .ms-error{margin:12px 16px}
#lunch-prototype .ms-empty{text-align:center;padding:24px!important}
@media screen and (max-width:1400px){#lunch-prototype .ms-filters{grid-template-columns:repeat(2,minmax(0,1fr))}#lunch-prototype .ms-filters .ms-filter-actions{grid-column:1/-1;padding-top:0}}
@media screen and (max-width:600px){
 #lunch-prototype .ms-filters{grid-template-columns:minmax(0,1fr);padding:12px;gap:10px}
 #lunch-prototype .ms-table.lp-mobile-cards td:first-child{white-space:normal}
 #lunch-prototype .ms-table.lp-mobile-cards td:last-child{width:auto}
 #lunch-prototype .ms-row-actions .lp-food-action{width:44px;height:44px}
 #lunch-prototype .ms-filter-actions>*{flex:1;text-align:center;justify-content:center}
}

#lunch-prototype .ms-table .lp-food-action{width:34px;height:34px;padding:7px;border:1px solid var(--lp-line);border-radius:7px;background:var(--lp-surface);text-decoration:none}
#lunch-prototype .ms-table .lp-food-edit{color:#d18a13;border-color:#ffe1b0}
#lunch-prototype .ms-table .lp-food-edit:hover{background:var(--lp-warm)}
#lunch-prototype .ms-table .lp-food-view{color:var(--lp-accent);border-color:#b3e4ff}
#lunch-prototype .ms-table .lp-food-delete{color:var(--lp-error);border-color:#ffd3dc}
#lunch-prototype .ms-table .lp-food-delete:not(:disabled):hover{background:var(--lp-bg)}
@media screen and (max-width:600px),(pointer:coarse){#lunch-prototype .ms-table .lp-food-action{width:44px;height:44px}}

/* Catalog templates share the daily ingredient table and controls. */
#lunch-prototype #menu-add-dialog{width:min(1120px,calc(100% - 24px))}
#lunch-prototype #menu-add-dialog .cm-template-group{margin-top:16px}
#lunch-prototype #menu-add-dialog .cm-template-table th:first-child{width:30%}
#lunch-prototype #menu-add-dialog .cm-template-table .mp-action{width:98px}
#lunch-prototype #menu-add-dialog .cm-template-table input[data-field=Name]{max-width:none;width:100%}
#lunch-prototype #menu-add-dialog .cm-template-table [data-field=Unit]{list-style:none}
#lunch-prototype #menu-add-dialog .cm-ingredient-entry{grid-template-columns:minmax(0,1fr) 100px 120px 130px auto}
#lunch-prototype #menu-add-dialog .cm-template-note{margin-top:12px}
#lunch-prototype #menu-add-dialog .cm-ingredient-order{color:var(--lp-muted);margin-right:4px}
@media screen and (max-width:850px){
 #lunch-prototype #menu-add-dialog .cm-template-table th:first-child{width:auto}
 #lunch-prototype #menu-add-dialog .cm-ingredient-entry{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px}
 #lunch-prototype #menu-add-dialog .cm-ingredient-entry>label:first-child,#lunch-prototype #menu-add-dialog .cm-ingredient-entry>button{grid-column:1/-1}
 #lunch-prototype #menu-add-dialog .cm-ingredient-entry input,#lunch-prototype #menu-add-dialog .cm-ingredient-entry button{height:44px;min-height:44px;font-size:16px}
 #lunch-prototype #menu-add-dialog .mp-group-heading{flex-wrap:wrap}
}

#lunch-prototype .mp-ingredient-entry select{width:100%;min-width:0;height:38px;min-height:38px;font-size:13px;padding:5px 8px}
@media screen and (max-width:850px){#lunch-prototype .mp-ingredient-entry select{height:44px;min-height:44px;font-size:16px}}

/* Keep catalog ingredient entry above the list and emphasize the menu total. */
#lunch-prototype #menu-add-dialog .cm-template-group>.mp-group-heading{background:var(--lp-soft,#e5f5ff)}
#lunch-prototype #menu-add-dialog .cm-template-group>.mp-group-heading h3{font-weight:600}
#lunch-prototype #menu-add-dialog .cm-template-summary{font-size:14px;font-weight:700;color:var(--lp-ink);white-space:nowrap}
#lunch-prototype #menu-add-dialog .cm-template-group>.cm-ingredient-entry{border-top:0;border-bottom:1px solid var(--lp-line)}

#lunch-prototype .lp-menu-total{white-space:nowrap}
#lunch-prototype .lp-menu-total strong{font-weight:600}
#lunch-prototype .lp-menu-total small{display:inline;font-size:11px;color:var(--lp-muted)}
@media print{#lunch-prototype .lp-menu-total-heading>span{display:none}#lunch-prototype .lp-menu-total-heading::after{content:"วัตถุดิบและปริมาณ"}}

#lunch-prototype .ms-table .ms-amount{white-space:nowrap;font-variant-numeric:tabular-nums}

/* Keep the searchable unit list anchored to its field, including inside a modal. */
#lunch-prototype #menu-add-dialog .cm-unit-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;padding:8px 10px;border:1px solid var(--lp-line);border-radius:8px;background:var(--lp-surface);color:var(--lp-ink);font:inherit;text-align:left;white-space:nowrap;cursor:pointer}
#lunch-prototype #menu-add-dialog .cm-unit-trigger::after{content:'▾';flex-shrink:0}
#lunch-prototype #menu-add-dialog .cm-unit-picker{position:fixed;inset:auto;margin:0;padding:8px;border:1px solid var(--lp-line);border-radius:10px;background:var(--lp-surface);color:var(--lp-ink);box-shadow:0 8px 28px #142c4830;box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100dvh - 16px);overflow:auto}
#lunch-prototype #menu-add-dialog .cm-unit-search{display:block;box-sizing:border-box;width:100%;min-width:0;font-size:16px;margin-bottom:6px}
#lunch-prototype #menu-add-dialog .cm-unit-options{display:block;max-height:min(220px,40dvh);overflow-y:auto;overscroll-behavior:contain}
#lunch-prototype #menu-add-dialog .cm-unit-options>button{display:block;box-sizing:border-box;width:100%;min-height:36px;padding:8px 10px;border:0;border-radius:5px;text-align:left;background:transparent;color:var(--lp-ink);font:inherit;cursor:pointer}
#lunch-prototype #menu-add-dialog .cm-unit-options>button:hover,#lunch-prototype #menu-add-dialog .cm-unit-options>button.is-active{background:var(--lp-soft)}
#lunch-prototype #menu-add-dialog .cm-unit-options>button[aria-selected=true]{font-weight:600;color:var(--lp-accent)}
#lunch-prototype #menu-add-dialog .cm-unit-trigger:focus-visible,#lunch-prototype #menu-add-dialog .cm-unit-search:focus-visible{outline:2px solid var(--lp-accent);outline-offset:2px}
#lunch-prototype #menu-add-dialog .cm-unit-empty{margin:8px;color:var(--lp-muted)}
@media(max-width:850px){#lunch-prototype #menu-add-dialog .cm-unit-trigger,#lunch-prototype #menu-add-dialog .cm-unit-options>button{min-height:44px}}

/* Match header text to the rows and place amounts beside the food names. */
#lunch-prototype .ms-table th{font-size:14px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
@media screen and (min-width:851px){
 #lunch-prototype .ms-table{table-layout:fixed}
 #lunch-prototype .ms-table th:nth-child(1){width:26%}
 #lunch-prototype .ms-table th:nth-child(2){width:30%}
 #lunch-prototype .ms-table th:nth-child(3){width:12%}
 #lunch-prototype .ms-table th:last-child{width:32%}
 #lunch-prototype .ms-table td:first-child{white-space:normal}
 #lunch-prototype .ms-table td:last-child{width:auto}
}
/* Thai calendars replace browser-localized date and month popups. */
#lunch-prototype .lp-thai-calendar{position:fixed;inset:auto;margin:0;width:324px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto;box-sizing:border-box;padding:12px;background:var(--lp-surface,#fff);color:var(--lp-text,#17324d);border:1px solid var(--lp-line,#dce6ef);border-radius:14px;box-shadow:0 12px 40px #18374c30;z-index:10000;font-size:14px}
#lunch-prototype .lp-calendar-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;gap:8px}
#lunch-prototype .lp-thai-calendar button{min-width:0;min-height:36px;padding:4px;border:0;border-radius:7px;background:transparent;color:inherit;box-shadow:none;font-size:14px;line-height:1.4}
#lunch-prototype .lp-thai-calendar button:hover{background:var(--lp-soft,#e4f4ff)}
#lunch-prototype .lp-thai-calendar button:focus-visible{outline:2px solid #009fe8;outline-offset:-2px}
#lunch-prototype .lp-thai-calendar button:disabled{opacity:.35;cursor:default}
#lunch-prototype .lp-thai-calendar .lp-calendar-close{width:36px;height:36px;font-size:24px;color:var(--lp-muted,#71849f)}
#lunch-prototype .lp-calendar-toolbar{display:flex;align-items:center;gap:4px;margin-bottom:10px}
#lunch-prototype .lp-calendar-toolbar>button{width:30px;flex:none;font-size:24px}
#lunch-prototype .lp-calendar-toolbar select{min-width:0;height:38px;min-height:38px;margin:0;padding:4px 24px 4px 8px;font-size:14px;flex:1}
#lunch-prototype .lp-calendar-toolbar select[aria-label="เดือนในปฏิทิน"]{flex:1.55}
#lunch-prototype .lp-calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}
#lunch-prototype .lp-calendar-weekday{padding:6px 0;font-size:12px;color:var(--lp-muted,#71849f)}
#lunch-prototype .lp-calendar-months{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
#lunch-prototype .lp-calendar-months button{min-height:44px;font-size:12px}
#lunch-prototype .lp-thai-calendar .is-outside{color:var(--lp-muted,#71849f);opacity:.6}
#lunch-prototype .lp-thai-calendar button[aria-current="date"]{box-shadow:inset 0 0 0 1px #009fe8}
#lunch-prototype .lp-thai-calendar button.is-selected{background:#009fe8;color:#fff;opacity:1;font-weight:600}
#lunch-prototype .lp-calendar-footer{display:flex;justify-content:space-between;margin-top:10px;padding-top:8px;border-top:1px solid var(--lp-line,#dce6ef)}
#lunch-prototype .lp-calendar-footer button{padding:4px 12px;color:#0088cf}
#lunch-prototype .ms-filters .lp-date-hint[hidden]{display:none}
#lunch-prototype .ms-filters>label{grid-template-rows:22px 48px}
#lunch-prototype .ms-table .ms-select-row{display:flex;align-items:center;gap:12px;margin:0;font-size:inherit;color:inherit;line-height:inherit;cursor:pointer}
#lunch-prototype .ms-table .ms-select-row input[type=checkbox]{appearance:auto;flex:none;width:18px;height:18px;min-height:18px;margin:0;padding:0;accent-color:#009fe8;cursor:pointer}
#lunch-prototype .ms-totals{display:flex;align-items:center;justify-content:flex-end;gap:28px;padding:18px 20px;border-top:1px solid var(--lp-line,#e1e9f1);background:var(--lp-soft,#f4faff);border-radius:0 0 14px 14px}
#lunch-prototype .ms-totals>small{margin-right:auto;color:var(--lp-muted,#71849f);font-size:12px}
#lunch-prototype .ms-totals>div{display:flex;flex-direction:column;gap:4px;text-align:right}
#lunch-prototype .ms-totals>div>span{font-size:12px;color:var(--lp-muted,#71849f)}
#lunch-prototype .ms-totals strong{font-size:20px;font-variant-numeric:tabular-nums;white-space:nowrap}
#lunch-prototype .ms-totals strong small{font-size:12px;font-weight:400}
#lunch-prototype .ms-selected-total strong{color:#0088cf}
@media(max-width:600px){#lunch-prototype .ms-totals{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:16px}#lunch-prototype .ms-totals>small{grid-column:1/-1}#lunch-prototype .ms-totals>div{text-align:left}}
#lunch-prototype .lp-thai-calendar{padding:10px}
#lunch-prototype .lp-calendar-heading{margin-bottom:6px}
#lunch-prototype .lp-thai-calendar .lp-calendar-close{width:30px;height:30px;min-height:30px}
#lunch-prototype .lp-calendar-toolbar{margin-bottom:6px}
#lunch-prototype .lp-calendar-toolbar select{height:34px;min-height:34px}
#lunch-prototype .lp-calendar-weekday{padding:2px 0}
#lunch-prototype .lp-calendar-days>button{height:32px;min-height:32px}
#lunch-prototype .lp-calendar-footer{margin-top:8px;padding-top:6px}
#lunch-prototype .lp-calendar-footer button{min-height:32px}
#lunch-prototype .ms-table .ms-select-row{flex-direction:row;justify-content:flex-start;text-align:left}
#lunch-prototype .ms-totals strong small{display:inline}
