/* F5.2: adaptive branding, navigation, photography and dark theme. */
.ui-icon{width:22px;height:22px;flex:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;fill:none;vertical-align:middle}.top-menu,#themeToggle[hidden]{display:none!important}.cart-float>span:first-child{display:flex;align-items:center;gap:8px}
html[data-bg-design=modern]{--brand-size:56px;--brand-mobile:44px;--content-width:1320px}
html[data-bg-logo=small]{--brand-size:44px;--brand-mobile:36px}html[data-bg-logo=large]{--brand-size:68px;--brand-mobile:52px}html[data-bg-logo=custom]{--brand-size:var(--logo-custom);--brand-mobile:clamp(32px,var(--logo-custom),60px)}
html[data-bg-width=compact]{--content-width:1080px}html[data-bg-width=wide]{--content-width:1500px}
html[data-bg-design=modern] .page-wrap{max-width:var(--content-width);padding-inline:clamp(16px,3vw,36px)}
html[data-bg-design=modern] .topbar{height:auto;min-height:88px;gap:10px;padding-block:12px}
html[data-bg-design=modern] .brand{min-width:0;gap:12px;letter-spacing:.015em;font-size:24px;line-height:1.15;color:var(--bg-bodytext)}
html[data-bg-design=modern] .brand>span:last-child{min-width:0;overflow-wrap:anywhere}
html[data-bg-design=modern] .brand small{font-size:13px;line-height:1.35;letter-spacing:.025em;color:var(--bg-bodytext);opacity:.8}
html[data-bg-design=modern] .brand-icon{width:var(--brand-size);height:var(--brand-size);flex:none;background:transparent;border-radius:0;overflow:hidden}
html[data-bg-logo-shape=rounded] .brand-icon{border-radius:14px}html[data-bg-logo-shape=circle] .brand-icon{border-radius:50%}
html[data-bg-branding=logo] .brand>span:last-child{display:none}html[data-bg-branding=name] .brand small{display:none}
html[data-bg-design=modern] .top-actions{flex:none;gap:8px}html[data-bg-design=modern] .cart-trigger{min-height:44px;padding:10px 12px;gap:7px;font-size:14px;font-weight:700}html[data-bg-design=modern] #themeToggle{min-width:44px;justify-content:center}
html[data-bg-design=modern] .customer-nav svg{width:23px;height:23px;stroke-width:1.8}html[data-bg-icon=solid] :is(#navMenu,#navCart,#top-cart,.cart-float) svg{fill:currentColor;stroke-width:1.4}html[data-bg-icon=solid] :is(#navCart,#top-cart,.cart-float) svg{fill-opacity:.22;stroke-width:2.5}html[data-bg-icon=solid] :is(#navOrders,#top-orders) svg{stroke-width:2.5}html[data-bg-icon=solid] .design-category-icon{fill:currentColor;fill-opacity:.15;stroke-width:2.5}
html[data-bg-design=modern] .demo-table-status{font-size:13px;line-height:1.45;margin-bottom:10px;color:var(--bg-bodytext);font-weight:600}html[data-bg-design=modern] .demo-table-status.in-catalog{padding:0;margin:0 0 10px}
html[data-bg-design=modern] .hero[data-bg-photo=true]{background-image:linear-gradient(90deg,#10150eea,#10150e55),var(--hero-desktop);background-size:cover;background-position:center}
html[data-bg-design=modern] .hero :is(h1 em,.eyebrow){color:var(--hero-accent,#F1C77F)}html[data-bg-design=modern] .hero p{color:#F1F0EA}
html[data-bg-design=modern] .hero{min-height:clamp(220px,27vw,370px);padding:clamp(22px,4vw,48px)}
html[data-bg-design=modern][data-bg-hero=compact] .hero{min-height:170px;padding:22px 28px}
html[data-bg-design=modern][data-bg-hero=split] .hero{background-image:none!important;background-color:var(--bg-surface);color:var(--bg-text);min-height:240px;isolation:isolate}html[data-bg-design=modern][data-bg-hero=split] .hero .hero-copy{width:52%;max-width:none;padding-right:12px}html[data-bg-design=modern][data-bg-hero=split] .hero h1{font-size:clamp(28px,4.1vw,56px)}html[data-bg-design=modern][data-bg-hero=split] .hero[data-bg-photo=true]::after{content:""!important;display:block!important;position:absolute;inset:0 0 0 54%;width:auto;height:auto;border:0;border-radius:0;background:var(--hero-desktop) center/cover no-repeat;z-index:-1}html[data-bg-design=modern][data-bg-hero=split] .hero p,html[data-bg-design=modern][data-bg-hero=minimal] .hero p{color:var(--bg-text)}html[data-bg-design=modern]:is([data-bg-hero=split],[data-bg-hero=minimal]) .hero :is(.eyebrow,h1 em){color:var(--bg-price)}
html[data-bg-design=modern][data-bg-hero=minimal] .hero{background-image:none!important;background:var(--bg-surface);color:var(--bg-text);min-height:140px;padding:24px;text-align:center;justify-content:center}html[data-bg-design=modern][data-bg-hero=minimal] .hero h1{font-size:clamp(28px,4vw,50px);margin:8px 0}html[data-bg-design=modern][data-bg-hero=minimal] .hero p{margin:8px auto}
html[data-bg-design=modern] .menu-section{margin-top:26px}html[data-bg-design=modern] .section-heading h2{margin-bottom:8px}html[data-bg-design=modern] .menu-count{margin-bottom:10px;color:var(--bg-bodytext);opacity:.8}html[data-bg-design=modern] .section-heading .eyebrow{color:var(--bg-pricebackground)}
html[data-bg-design=modern] .search{border:1px solid transparent;gap:10px}html[data-bg-design=modern] .search input{min-width:0;outline:none!important;box-shadow:none}html[data-bg-design=modern] .search:focus-within{outline:2px solid var(--bg-pricebackground);outline-offset:2px}html[data-bg-design=modern] .search .ui-icon{color:var(--bg-muted);width:20px;height:20px}
html[data-bg-design=modern] :is(button,a,input,textarea):focus-visible{outline-color:var(--bg-pricebackground);outline-offset:2px}html[data-bg-design=modern] .menu-filters .categories{scrollbar-width:none;padding-bottom:5px}html[data-bg-design=modern] .categories::-webkit-scrollbar{display:none}
html[data-bg-design=modern] .menu-card p{font-size:14px;line-height:1.5}html[data-bg-design=modern] .menu-card .btn-primary{min-height:44px}html[data-bg-design=modern] .menu-card .price{font-size:clamp(14px,1.4vw,19px)}
html[data-bg-photo-style=cutout] .menu-card .media{background:var(--bg-surface);padding:10px}html[data-bg-photo-style=cutout] .menu-card .media img{object-fit:contain!important}html[data-bg-photo-style=editorial] .menu-card .media{aspect-ratio:4/3}html[data-bg-photo-style=editorial] .menu-card .media img{object-fit:cover!important}
html[data-bg-mode=dark] .sheet-close{background:var(--bg-surface);color:var(--bg-text);border:1px solid color-mix(in srgb,var(--bg-text) 25%,transparent)}html[data-bg-mode=dark] .customer-nav{box-shadow:0 8px 25px #0007}html[data-bg-mode=dark] .menu-card{border:1px solid color-mix(in srgb,var(--bg-text) 8%,transparent)}
html[data-bg-nav=adaptive] #top-orders{display:none}html[data-bg-nav=adaptive] .cart-float{bottom:calc(84px + env(safe-area-inset-bottom));max-width:430px}html[data-bg-nav=adaptive] footer{padding-bottom:170px}html[data-bg-nav=adaptive] .toast{bottom:calc(150px + env(safe-area-inset-bottom))}
@media(min-width:900px){html[data-bg-design=modern]:is([data-bg-nav=adaptive],[data-bg-nav=header]) .customer-nav{display:none!important}html[data-bg-design=modern]:is([data-bg-nav=adaptive],[data-bg-nav=header]) #top-orders{display:flex}html[data-bg-design=modern]:is([data-bg-nav=adaptive],[data-bg-nav=header]) .top-menu{display:inline-flex!important;align-items:center;min-height:44px;padding:0 10px;color:var(--bg-bodytext);font-weight:700;text-decoration:none}html[data-bg-design=modern]:is([data-bg-nav=adaptive],[data-bg-nav=header]) .cart-float{bottom:20px;max-width:340px}html[data-bg-design=modern][data-bg-desktop-cart=corner]:is([data-bg-nav=adaptive],[data-bg-nav=header]) .cart-float{left:auto;right:24px;transform:none;width:min(340px,calc(100% - 48px))}html[data-bg-design=modern][data-bg-desktop-cart=header]:is([data-bg-nav=adaptive],[data-bg-nav=header]) .cart-float{display:none!important}html[data-bg-nav=adaptive] footer{padding-bottom:105px}html[data-bg-nav=adaptive] .toast{bottom:90px}}
@media(max-width:560px){html[data-bg-design=modern] .page-wrap{padding-inline:14px}html[data-bg-design=modern] .topbar{min-height:70px;padding-block:10px}html[data-bg-design=modern] .brand{gap:8px;font-size:19px}html[data-bg-design=modern] .brand small{font-size:11px}html[data-bg-design=modern] .brand-icon{width:var(--brand-mobile);height:var(--brand-mobile)}html[data-bg-design=modern] .top-actions{gap:4px}html[data-bg-design=modern] .cart-trigger{padding:8px;min-height:44px}html[data-bg-design=modern] .top-actions #top-orders{font-size:11px}html[data-bg-design=modern] .hero[data-bg-photo=true]{background-image:linear-gradient(90deg,#10150eea,#10150e77),var(--hero-mobile)}html[data-bg-design=modern] .hero{min-height:180px;padding:20px}html[data-bg-design=modern] .hero h1{font-size:clamp(30px,8vw,43px);margin:10px 0}html[data-bg-design=modern] .hero p{font-size:13px;line-height:1.5;margin:8px 0}html[data-bg-design=modern][data-bg-hero=compact] .hero{min-height:150px;padding:18px}html[data-bg-design=modern][data-bg-hero=split] .hero[data-bg-photo=true]::after{background-image:var(--hero-mobile)}html[data-bg-design=modern][data-bg-hero=split] .hero{min-height:170px;padding:15px}html[data-bg-design=modern][data-bg-hero=split] .hero h1{font-size:clamp(20px,5vw,29px)}html[data-bg-design=modern][data-bg-hero=split] .hero p{font-size:12px}html[data-bg-design=modern] .menu-section{margin-top:20px}html[data-bg-design=modern] .menu-card p{font-size:12px}html[data-bg-design=modern] .section-heading h2{font-size:clamp(25px,7vw,34px)}html[data-bg-design=modern] .customer-nav button{font-size:11px;min-height:48px}html[data-bg-design=modern] .customer-nav svg{width:22px;height:22px}}
@media(max-width:359px){html[data-bg-design=modern] .brand{font-size:17px}html[data-bg-design=modern] .top-actions #top-orders .ui-icon{display:none}html[data-bg-design=modern] .brand-icon{max-width:46px;max-height:46px}}
@media(prefers-reduced-motion:no-preference){html[data-bg-design=modern]:is([data-bg-motion=subtle],[data-bg-motion=expressive]) :is(.menu-card,.btn-primary,.cart-trigger,.cat-btn,.customer-nav button){transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}html[data-bg-design=modern]:is([data-bg-motion=subtle],[data-bg-motion=expressive]) :is(.btn-primary,.cart-trigger,.cat-btn,.customer-nav button):active{transform:scale(.97)}@media(hover:hover){html[data-bg-design=modern]:is([data-bg-motion=subtle],[data-bg-motion=expressive]) .menu-card:hover{transform:translateY(-3px);box-shadow:0 10px 24px #0002}}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}html[data-bg-design=modern] :is(.menu-card,.btn-primary,.cart-trigger,.cat-btn,.customer-nav button){animation:none!important;transition:none!important}}

@media(max-width:560px){html[data-bg-design=modern][data-bg-nav=header] .topbar{flex-wrap:wrap}html[data-bg-design=modern][data-bg-nav=header] .top-actions{margin-left:auto;max-width:100%}html[data-bg-design=modern] .brand>span:last-child{overflow-wrap:anywhere}html[data-bg-design=modern] .brand{flex:1 1 auto}}

/* F5.2 final: compact service indicator outside the hero; no transaction changes. */
.service-chip{display:inline-flex;align-items:center;flex-wrap:wrap;max-width:100%;gap:6px 8px;border-radius:999px;padding:6px 11px;line-height:1.4;background:var(--bg-surface,#fff);color:var(--bg-text,var(--text,#242321));border:1px solid color-mix(in srgb,currentColor 15%,transparent);font-size:12px;vertical-align:middle;}
.service-chip-icon{width:16px;height:16px;flex:0 0 16px;color:var(--bg-price,var(--text,#242321));}
.service-chip-title{color:var(--bg-price,var(--text,#242321));font-weight:700;}
.service-chip-description{font-weight:500;color:var(--bg-text,var(--text,#242321));min-width:0;overflow-wrap:anywhere;}
.service-chip-description::before{content:'·';margin-inline-end:7px;}
.service-chip-invalid{border-radius:12px;border:1px solid currentColor;}
.service-chip-invalid .service-chip-description{flex-basis:100%;}
.service-chip-invalid .service-chip-description::before{content:none;}
html[data-bg-design=modern] :is(.menu-card,.featured-card) .btn-primary{min-height:46px;padding-block:10px;padding-inline:12px;font-size:13px;line-height:1.25;}
@media(max-width:560px){html[data-bg-design=modern] :is(.menu-card,.featured-card) .btn-primary{font-size:12px;padding-inline:8px;} .service-chip{font-size:11px;gap:4px 6px;padding:6px 9px;}}

/* F5.2 physical mobile QA: retain user zoom, prevent focus zoom and fit the keyboard. */
@media (max-width: 899px), (hover: none) and (pointer: coarse) {
  .search input, .field input:not([type=radio]):not([type=checkbox]), .field textarea, .field select {
    font-size: 16px !important;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .cart-sheet, .cart-sheet #cartBody, .cart-sheet .checkout-choice, .cart-sheet .bill { min-width: 0; max-width: 100%; }
  .cart-sheet .bill-row > span { min-width: 0; overflow-wrap: anywhere; }
  .cart-sheet .bill-row > strong { flex-shrink: 0; }
}
/* Only while the on-screen keyboard actually shrinks the visible viewport. */
html.bg-keyboard-open #customerNav,
html.bg-keyboard-open #cartFloat { visibility: hidden; pointer-events: none; }
html.bg-keyboard-open #cartOverlay {
  top: var(--bg-keyboard-top, 0px);
  bottom: auto;
  height: var(--bg-keyboard-height, 100vh);
  align-items: flex-end;
  padding: 0;
}
html.bg-keyboard-open #cartOverlay .cart-sheet {
  max-height: 100%;
  min-height: 0;
  width: min(100%, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 12px;
  padding-bottom: 16px;
}

/* F5.2 Slim Adaptive Cart: mobile only; independent of transactions. */
@media (max-width: 767px) {
  html[data-bg-mobile-cart] {
    --bg-mobile-bottom: max(10px, env(safe-area-inset-bottom, 0px), var(--bg-viewport-bottom, 0px));
    --bg-mobile-nav-height: 58px;
    --bg-mobile-cart-height: 44px;
  }
  html[data-bg-mobile-cart] #customerNav {
    bottom: var(--bg-mobile-bottom);
    padding: 4px;
  }
  html[data-bg-mobile-cart] #customerNav button { min-height: 48px; padding: 3px 4px; }
  html[data-bg-mobile-cart] #cartFloat {
    bottom: var(--bg-mobile-bottom);
    min-height: var(--bg-mobile-cart-height);
    padding: 8px 14px;
    gap: 8px;
    font-size: 13px;
    line-height: 1.25;
    max-width: 430px;
    width: calc(100% - 28px);
    box-shadow: 0 4px 14px #0003;
    opacity: 1;
    visibility: visible;
  }
  html[data-bg-mobile-cart] #cartFloat .ui-icon { width: 18px; height: 18px; }
  html[data-bg-mobile-cart] #cartFloat strong { font-size: 13px; }
  html[data-bg-mobile-cart] #cartFloat > span:first-child { gap: 6px; }
  html[data-bg-mobile-cart] #cartFloat > span:nth-child(2) { margin-inline-start: auto; font-size: 14px; }
  html[data-bg-mobile-cart].bg-mobile-nav-present #cartFloat {
    bottom: calc(var(--bg-mobile-bottom) + var(--bg-mobile-nav-height) + 7px);
  }
  html[data-bg-mobile-cart] footer {
    padding-bottom: max(100px, calc(var(--bg-mobile-bottom) + var(--bg-mobile-cart-height) + 20px));
  }
  html[data-bg-mobile-cart].bg-mobile-nav-present footer {
    padding-bottom: max(100px, calc(var(--bg-mobile-bottom) + var(--bg-mobile-nav-height) + var(--bg-mobile-cart-height) + 27px));
  }
  html[data-bg-mobile-cart] .toast {
    bottom: calc(var(--bg-mobile-bottom) + var(--bg-mobile-cart-height) + 12px);
  }
  html[data-bg-mobile-cart].bg-mobile-nav-present .toast {
    bottom: calc(var(--bg-mobile-bottom) + var(--bg-mobile-nav-height) + var(--bg-mobile-cart-height) + 19px);
  }
  html[data-bg-mobile-cart].bg-cart-scroll-hidden #cartFloat,
  html[data-bg-mobile-cart].bg-cart-dialog-open #cartFloat,
  html[data-bg-mobile-cart].bg-keyboard-open #cartFloat {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  @media (prefers-reduced-motion: no-preference) {
    html[data-bg-mobile-cart]:is([data-bg-motion=subtle],[data-bg-motion=expressive]) #cartFloat {
      transition: opacity 160ms ease, visibility 160ms ease;
    }
    html[data-bg-mobile-cart].bg-keyboard-open #cartFloat,
    html[data-bg-mobile-cart].bg-cart-dialog-open #cartFloat { transition: none; }
  }
}
