/* UI audit repairs, 24/11/2026. Scoped rules intentionally load after legacy styles. */
/* Align the checkbox with the first text line, including wrapped consent text. */
html body[data-member-page] [data-mp-host] .mp-form label.mp-consent{
 display:grid!important;grid-template-columns:18px minmax(0,1fr);align-items:start!important;
 column-gap:9px;row-gap:0;font-size:12px;line-height:20px;
}
html body[data-member-page] [data-mp-host] .mp-form label.mp-consent>input[type=checkbox]{
 grid-column:1;grid-row:1;display:block;box-sizing:border-box;
 width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;max-height:18px!important;
 margin:1px 0 0!important;padding:0!important;align-self:start!important;
}
html body[data-member-page] [data-mp-host] .mp-form label.mp-consent>span{grid-column:2;grid-row:1;min-width:0;line-height:20px}
/* Three food controls share the same rhythm on mobile and desktop. */
html body[data-customer-layout][data-menu-shell] #item-detail[data-item-kind=food] #item-option-fields{display:flex;flex-direction:column;gap:14px;margin:0!important}
html body:not(#ki0):not(#ki1):not(#ki2):not(#ki3) #item-detail[data-item-kind=food] #item-option-fields>.kb-spice-pad{margin:0!important}
@media(min-width:900px){html body[data-customer-layout][data-menu-shell] #item-detail[data-item-kind=food] .item-detail-body:has(.kb-ring){row-gap:14px!important}}
@media(max-width:899px){html body[data-customer-layout][data-menu-shell] #item-detail[data-item-kind=food] .item-quick-layout{gap:14px!important}}
html body[data-member-page=register] .member-register-card.kibou-member-card{background:radial-gradient(ellipse at 90% 0,#916552,transparent 58%),linear-gradient(125deg,#765047,#432338)!important;color:#fff7f0!important;--mc-ink:#fff7f0;--foil-ink:#fff7f0;opacity:1!important}
html body[data-member-page=register] .member-register-card.kibou-member-card :is(span,small,strong,b,i){color:#fff7f0!important}
html body[data-member-page=register] .member-register-card.kibou-member-card::before{opacity:.12!important}
.registration-icon{display:inline-block;width:18px;height:18px;vertical-align:middle;flex:none;margin-right:6px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}
.email-provider-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}
body[data-member-page] .email-provider-choices button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border:1px solid #dfbdc8;border-radius:12px;background:#fffaf6;color:#800020;font:inherit;font-weight:600;cursor:pointer}
body[data-member-page] .email-provider-choices button[aria-pressed=true]{background:#800020;color:#fff;border-color:#800020}
body[data-member-page] .email-register-form input:not([type=checkbox]){font-size:16px;min-height:44px}
body[data-member-page] .mp-form label:has(>.registration-icon){display:grid;grid-template-columns:20px 1fr;column-gap:6px;row-gap:6px;align-items:center}
body[data-member-page] .mp-form label>.registration-icon{grid-column:1;grid-row:1;margin:0}
body[data-member-page] .mp-form label:has(>.registration-icon)>:is(input,small){grid-column:1/-1}
/* Internal account cards use the same light material as the admin workspace,
   regardless of the customer menu's day/night preference. */
html body.workspace-page[data-identity-glass][data-page=users]{
 --id-bg:#fffaf6!important;--id-ink:#3c2730!important;--id-muted:#705861!important;
 --id-accent:#800020!important;--id-edge:#ecd9df!important;--id-surface:#fffcfa!important;
 --id-input:#fffaf6!important;--id-detail:#f8e8ed!important;--id-line:#dfbdc8!important;
 --id-glow:#ecd9df!important;color:#3c2730!important;color-scheme:only light;
}
@media(max-width:760px){
 html body.workspace-page[data-workspace] .workspace-nav-dialog{
  width:min(340px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px)!important;
  height:100dvh!important;max-height:100dvh!important;margin:0!important;padding:0!important;
  border:0!important;border-radius:0 20px 20px 0!important;overflow:hidden;
 }
 html body.workspace-page[data-workspace] .workspace-nav-dialog .workspace-sidebar{
  width:100%!important;height:100%!important;max-height:none!important;
  background:#fcf0f1!important;background-image:none!important;color:#3c2730!important;
  padding:16px 14px max(16px,env(safe-area-inset-bottom));overflow-y:auto;
 }
 html body.workspace-page[data-workspace] .workspace-nav-dialog .ws-brand :is(strong,small),
 html body.workspace-page[data-workspace] .workspace-nav-dialog :is(.ws-navigation a,.ws-customer,.ws-account){color:#3c2730!important}
 html body.workspace-page[data-workspace] .workspace-nav-dialog .ws-navigation a.is-active,
 html body.workspace-page[data-workspace] .workspace-nav-dialog .ws-navigation a.is-active .ws-icon{color:#fff!important;background-color:#800020!important}
 html body.workspace-page[data-workspace] .workspace-nav-dialog .ws-nav-close{background:#fffaf6!important;color:#800020!important;border-color:#dfbdc8!important}
 /* A single flex column owns modal height. No shorter form cap or second safe-area gap. */
 html body[data-customer-layout][data-menu-shell] #item-detail{padding:0!important;overflow:hidden!important}
 html body[data-customer-layout][data-menu-shell] #item-detail #item-options-form{
  display:flex!important;flex-direction:column!important;height:100%!important;max-height:none!important;
  min-height:0!important;gap:0!important;margin:0!important;padding:0!important;
 }
 html body[data-customer-layout][data-menu-shell] #item-detail #item-options-form>.dialog-head{flex:0 0 auto;position:relative;top:auto;margin:0}
 html body[data-customer-layout][data-menu-shell] #item-detail .item-detail-body{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain}
 html body[data-customer-layout][data-menu-shell] #item-detail #item-info{display:block!important;grid-template-columns:none!important}
 html body[data-customer-layout][data-menu-shell] #item-detail #item-options-form>.dialog-actions{
  flex:0 0 auto!important;position:relative!important;inset:auto!important;margin:0!important;
  padding:12px 16px!important;
 }
}
/* Food choices precede notes in the DOM on every screen size. */
body[data-customer-layout][data-menu-shell] #item-detail[data-item-kind=food] .item-quick-layout>#item-option-fields{margin-top:0}
html body:not(#ki0):not(#ki1):not(#ki2):not(#ki3) #item-detail[data-item-kind=food] #item-option-fields .topping-stack-fieldset,
html body:not(#ki0):not(#ki1):not(#ki2):not(#ki3) #item-detail[data-item-kind=food] .topping-stack{padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important}
html body:not(#ki0):not(#ki1):not(#ki2):not(#ki3) #item-detail[data-item-kind=food] .topping-stack::before,
html body:not(#ki0):not(#ki1):not(#ki2):not(#ki3) #item-detail[data-item-kind=food] .topping-stack::after{content:none!important}
body[data-member-page] .kg-entry{display:grid;grid-template-columns:46px minmax(0,1fr);gap:8px 12px}
body[data-member-page] .kg-entry>div,body[data-member-page] .kg-entry>span{min-width:0;overflow-wrap:anywhere}
body[data-member-page] .kg-entry .kg-go{grid-column:2;margin-left:0;white-space:normal}
body.workspace-page[data-workspace] #editor .quick-toggles{display:flex;flex-wrap:wrap;gap:8px 14px}
body.workspace-page[data-workspace] #editor .quick-toggles .check{min-height:32px;font-size:14px;line-height:1.5}
body.workspace-page[data-workspace] #editor .quick-item :is(input:not([type=checkbox]):not([type=radio]),select){font-size:16px;min-height:44px}
body.workspace-page[data-workspace] #editor .quick-item .field>span{font-size:14px}
body.workspace-page .work-filter-count{white-space:normal}
html:has(body.workspace-operations #op-dialog[open]),body.workspace-operations:has(#op-dialog[open]){overflow:hidden}
.filter-date-preview{font-size:13px;line-height:1.5;color:inherit}
body.workspace-page.workspace-dashboard[data-workspace] .dashboard-shell{width:100%;max-width:none;margin-inline:auto}
/* Allow a table to scroll, never the entire modal or its heading. */
body.workspace-page.workspace-operations[data-workspace] #op-dialog{
 position:fixed;inset:0;margin:auto;padding:0!important;box-sizing:border-box;
 width:min(960px,calc(100% - 24px));min-width:0;max-width:calc(100% - 24px);
 max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow:hidden;
}
body.workspace-page.workspace-operations[data-workspace] #op-dialog[open]{display:flex;flex-direction:column}
body.workspace-page.workspace-operations[data-workspace] #op-dialog>.dialog-head{display:flex;flex:none;align-items:flex-start;gap:12px;min-width:0;padding:16px;margin:0}
body.workspace-page.workspace-operations[data-workspace] #op-dialog-title{min-width:0;flex:1;overflow-wrap:anywhere;font-size:20px;line-height:1.4}
body.workspace-page.workspace-operations[data-workspace] #close-dialog{flex:0 0 44px;width:44px;height:44px;min-height:44px}
body.workspace-page.workspace-operations[data-workspace] #op-dialog-content{min-width:0;min-height:0;max-width:100%;overflow:auto;overscroll-behavior:contain;flex:1;padding:16px}
body.workspace-page.workspace-operations[data-workspace] #op-dialog-content>:not(.table-wrap){max-width:100%;min-width:0}
body.workspace-page.workspace-operations[data-workspace] #op-dialog .table-wrap{width:100%;max-width:100%;overflow-x:auto}
body.workspace-page.workspace-operations[data-workspace] #op-dialog :is(.stats,.stat,.shift-summary,.shift-form){min-width:0;overflow-wrap:anywhere}
body.workspace-page.workspace-operations[data-workspace] #op-dialog input{min-width:0;max-width:100%}
body.rules-open{overflow:hidden}
#ovRules #rCloseTop{position:sticky;top:0;z-index:2;min-height:44px}
#ovRules #rTitle{scroll-margin-top:16px}
/* These slides can contain either direct media or a zoom button wrapping picture. */
body[data-customer-layout][data-menu-shell] #hero-carousel .hero-panel>.media-open,
body[data-customer-layout][data-menu-shell] #hero-carousel .hero-panel>.customer-slide-media,
body[data-customer-layout][data-menu-shell] #hero-carousel .hero-panel>.responsive-image{
 position:absolute!important;inset:0!important;z-index:0;width:100%!important;height:100%!important;max-width:none;max-height:none;margin:0!important;padding:0!important;border:0;border-radius:0;overflow:hidden;flex:none!important;
}
body[data-customer-layout][data-menu-shell] #hero-carousel .hero-panel>.media-open :is(picture,img),
body[data-customer-layout][data-menu-shell] #hero-carousel .hero-panel>.customer-slide-media :is(.media-open,picture,img),
body[data-customer-layout][data-menu-shell] #hero-carousel .hero-panel>.responsive-image img{
 display:block;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover;object-position:center;
}
body[data-customer-layout][data-menu-shell] #hero-carousel .hero-panel .media-open-hint{display:none}
/* Short payment labels keep the radio target accessible and compact. */
html body:not(#kc0):not(#kc1):not(#kc2) #checkout #payment-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important}
html body:not(#kc0):not(#kc1):not(#kc2) #checkout #payment-choices label.kb-pay-card{display:flex!important;align-items:center;justify-content:center;gap:6px;min-height:48px!important;padding:10px 8px!important;white-space:nowrap}
html body:not(#kc0):not(#kc1):not(#kc2) #checkout #payment-choices label.kb-pay-card>svg{flex:none;width:18px;height:18px;color:currentColor}
html body:not(#kc0):not(#kc1):not(#kc2) #checkout #payment-choices label.kb-pay-card:has(input:checked)::after{width:12px;height:12px;top:3px;right:3px;background-size:9px}
html body:not(#kc0):not(#kc1):not(#kc2) #checkout #payment-choices .kb-pay-sub{display:none}
html body[data-site-tone=night]:not(#kc0):not(#kc1):not(#kc2) #checkout #payment-choices label.kb-pay-card{color:#fff2f6!important;background:#33222b!important;border-color:#ad7187!important}
html body[data-site-tone=night]:not(#kc0):not(#kc1):not(#kc2) #checkout #payment-choices label.kb-pay-card:has(input:checked){color:#fff2f6!important;background:#56243b!important;border-color:#f1b5cd!important}
html body[data-site-tone=night]:not(#kc0):not(#kc1):not(#kc2) #checkout .cash-tendered{background:#33222b;color:#fff2f6;border-color:#ad7187}
html body[data-site-tone=night]:not(#kc0):not(#kc1):not(#kc2) #checkout .cash-tendered-head :is(h3,small){color:#fff2f6}
html body[data-site-tone=night]:not(#kc0):not(#kc1):not(#kc2) #checkout .cash-tendered-chips button small{color:#6e5157!important;font-size:12px}
@media(max-width:420px){html body:not(#kc0):not(#kc1):not(#kc2) #checkout #payment-choices label.kb-pay-card>svg{display:none}}
@media(max-width:760px){
 /* Use the native scrollbar on phones; floating page dots covered categories. */
 body[data-customer-layout][data-menu-shell] .customer-scroll-dots{display:none!important}
 html.customer-dot-scroll,body[data-customer-layout][data-menu-shell] .customer-dots-managed{scrollbar-width:auto!important}
 html.customer-dot-scroll::-webkit-scrollbar,body[data-customer-layout][data-menu-shell] .customer-dots-managed::-webkit-scrollbar{display:initial!important;width:4px!important;height:4px!important}
 body[data-customer-layout][data-menu-shell] #item-detail .item-detail-body.customer-dots-managed,
 body[data-customer-layout][data-menu-shell] #item-detail[data-item-kind=food] .item-detail-body.customer-dots-managed,
 body[data-customer-layout][data-menu-shell] #checkout .checkout-scroll.customer-dots-managed{padding-right:16px}
 body[data-customer-layout][data-menu-shell] #item-detail,
 body[data-customer-layout][data-menu-shell] #item-detail[data-item-kind=food]{width:calc(100% - 20px)!important;max-width:calc(100% - 20px)!important;min-width:0;height:min(760px,calc(100vh - 20px));height:min(760px,calc(100dvh - 20px));max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px)}
 body.has-customer-dock[data-customer-layout][data-menu-shell] #customer-dock::before{width:calc((100% - 22px)/6);transform:translateX(calc(var(--dock-index,0)*100% + var(--dock-index,0)*2px))}
 body.has-customer-dock[data-customer-layout][data-menu-shell] #customer-dock[data-active=orders]{--dock-index:5}
 body[data-identity-glass][data-page=login] main.identity-layout{display:block!important;width:calc(100% - 24px);margin:16px auto 24px!important}
 body[data-identity-glass][data-page=login] .identity-story{display:none}
 body[data-identity-glass][data-page=login] .identity-login-card{padding:18px!important}
 body[data-page=login] .auth-introduction h1{font-size:27px;margin:8px 0}
 body[data-page=login] .auth-introduction>p{font-size:14px;margin-bottom:12px}
 body[data-page=login] :is(.auth-chat-panel,.auth-kibou-panel){padding:16px}
 body[data-page=login] .auth-kibou-panel form{gap:12px}
 body[data-page=login] #current-session:not([hidden]){display:flex;flex-wrap:wrap;justify-content:center;gap:4px 12px;font-size:14px}
}
@media(prefers-reduced-motion:reduce){#customer-dock::before{transition:none!important}}
