/* Shared layout constraints: let content wrap instead of widening the page. */
/* A shared product photo belongs to one product, with sizes shown as information. */
.public-page #fries-details .fries-catalog{grid-template-columns:minmax(0,1fr);gap:18px;margin:8px 0 24px}
.public-page #fries-details .fries-product{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);border-radius:18px;border:1px solid #dedfcf;background:#fffdf8;overflow:hidden}
.public-page #fries-details .fries-product>.photo{display:block;align-self:center;background:#f0ede3;border-radius:0;min-width:0}
.public-page #fries-details .fries-product .menu-picture{aspect-ratio:1;height:auto;max-height:420px;border-radius:0;background:#f0ede3}
.public-page #fries-details .fries-product .menu-picture img{height:100%;width:100%;object-fit:contain;aspect-ratio:1}
.public-page #fries-details .fries-product .dish-body{padding:clamp(18px,3vw,32px);align-self:center}
.public-page #fries-details .fries-product h3{font-size:clamp(21px,2.8vw,28px);margin:0 0 8px;line-height:1.4}
.fries-product-description{font-size:14px;line-height:1.7;color:#617063;margin:0 0 18px}
.fries-price-caption{font-size:12px;color:#617063;margin:0 0 8px}
.fries-variant-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,95px),1fr));gap:8px;margin:0}
.fries-variant-list>div{min-width:0;padding:14px 8px;background:#f6f1e5;border:1px solid #e5ddca;border-radius:12px;text-align:center}
.fries-variant-list dt{font-size:13px;color:#34503d;font-weight:bold;overflow-wrap:anywhere}
.fries-variant-list dd{margin:8px 0 0;font-size:clamp(20px,2.4vw,27px);font-weight:bold;color:#b94f29;line-height:1.4;overflow-wrap:anywhere}
.fries-variant-list p,.fries-photo-note{font-size:11px;line-height:1.6;color:#617063}
.fries-photo-note{margin:14px 0 0}
.public-page #fries-details .fries-gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.public-page #fries-details .fries-gallery-title{font-size:15px;font-weight:bold;color:#34503d;margin:20px 0 12px}
@media(max-width:639px){
 .public-page #fries-details .fries-product{grid-template-columns:minmax(0,1fr)}
 .public-page #fries-details .fries-product .menu-picture{width:100%;max-height:320px;aspect-ratio:4/3}
 .public-page #fries-details .fries-product .menu-picture img{aspect-ratio:auto;height:100%;max-height:320px}
 .public-page #fries-details .fries-product .dish-body{padding:18px 14px}
 .public-page #fries-details .fries-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .fries-variant-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .fries-variant-list>div{padding:12px 6px}
 .fries-variant-list dd{font-size:21px}
}
html{scroll-padding-top:16px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-wrap:break-word}
button,input,select,textarea{max-width:100%;box-sizing:border-box}
input,select,textarea{min-width:0;font-size:16px}
button,a{-webkit-tap-highlight-color:transparent}
img,svg{max-width:100%}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}}

/* Seller dashboard */
.seller-page main{width:100%;padding:clamp(12px,3vw,24px)}
.seller-page h1{font-size:clamp(22px,4.5vw,27px);line-height:1.4}
.seller-page h2{font-size:clamp(18px,3vw,20px);line-height:1.5}
.seller-page h3,.seller-page #account,.seller-page #users{overflow-wrap:anywhere}
.seller-page section,.seller-page .card,.seller-page details,.seller-page form{min-width:0}
.seller-page .cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
.seller-page .card{min-width:0}
.seller-page .status-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-content:start}
.seller-page .status-card>h3,.seller-page .status-card>p{grid-column:1/-1;margin:0 0 6px}
.seller-page .status-card>.status-pill{justify-self:start}
.seller-page .status-card>button{width:100%;margin:0;min-height:44px}
.seller-page button{min-height:44px;line-height:1.4;white-space:normal}
.seller-page label{line-height:1.6}
.seller-page input,.seller-page select,.seller-page textarea{font-size:16px;width:100%;min-width:0}
.seller-page input[type=file]{padding:8px;font-size:14px}
.seller-page .table-wrap,.seller-page .chart-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.seller-page .chart-scroll{padding:4px 0 10px}
.seller-page .chart{min-width:480px;gap:4px}
.seller-page .hour{min-width:0;font-size:10px}
.seller-page table{min-width:340px}
.seller-page .editor-item{grid-template-columns:80px minmax(0,1fr)}
.seller-page .editor-item>div{min-width:0}
.seller-page .editor-item h3,.seller-page .editor-item p{overflow-wrap:anywhere}
.seller-page #menu-form>div:last-child{display:flex;flex-wrap:wrap;gap:8px}
.seller-page #menu-form>div:last-child>button{margin:0;flex:1 1 160px}
.seller-page #menu-editor-toggle>summary{overflow-wrap:anywhere}
@media(max-width:560px){
 .seller-page section,.seller-page .card{padding:14px;border-radius:13px}
 .seller-page #shops{grid-template-columns:1fr}
 .seller-page #metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .seller-page #metrics .card{padding:10px 7px}
 .seller-page #metrics p{font-size:12px;line-height:1.5;margin:0 0 8px}
 .seller-page .metric{font-size:25px;overflow-wrap:anywhere}
 .seller-page #menu-editor-toggle>summary{font-size:18px}
 .seller-page .menu-toggle-hint{font-size:12px}
 .seller-page .editor-item{grid-template-columns:64px minmax(0,1fr);gap:10px}
 .seller-page .editor-item button{font-size:14px;padding:8px 10px}
 .seller-page #menu-preview{width:min(160px,100%)}
}

/* Public catalogue: retain five category buttons and three menu columns. */
.public-page header,.public-page main,.public-page footer,.public-page .sponsors{width:100%;min-width:0}
.public-page .brand-block,.public-page .brand-image,.public-page .sponsor-copy,.public-page .store-title-row{min-width:0}
.public-page .brand-image img{max-width:100%;height:auto}
.public-page .sponsor-card{flex-basis:0;min-width:0}
.public-page .sponsor-copy strong{overflow-wrap:anywhere}
.public-page .store-info h2,.public-page .store-info h3{overflow-wrap:anywhere}
.public-page .shop-view-bar{min-width:0}
.public-page #shop-view-title{min-width:0;overflow-wrap:anywhere}
.public-page .shop-contact-buttons>a{max-width:100%;overflow-wrap:anywhere;text-align:center}
.public-page .shop-menu-tabs button{min-height:44px}
.public-page .menus,.public-page #menu .menus{grid-template-columns:repeat(3,minmax(0,1fr))}
.public-page .dish,.public-page .dish-body{min-width:0}
.public-page .dish h3,.public-page .dish .price{overflow-wrap:anywhere}
.public-page .ads-table-wrap{max-width:100%;overflow-x:auto}
.public-page #viewer{max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}
.public-page #shop-view{height:100dvh}
@media(max-width:600px){
 .public-page header,.public-page main,.public-page footer{padding-left:14px;padding-right:14px}
 .public-page .sponsors{padding-left:14px;padding-right:14px}
 .public-page header{gap:8px}
 .public-page header .brand-block{flex:1 1 0;max-width:180px}
 .public-page header .fortune{flex:0 0 auto}
 .public-page .store{grid-template-columns:clamp(72px,22vw,100px) minmax(0,1fr)}
 .public-page .store-info{padding:11px}
 .public-page .store-title-row h2,.public-page .store-title-row h3{font-size:clamp(16px,4.2vw,19px)}
 .public-page .community-heading p{white-space:normal;font-size:11px;line-height:1.7}
 .public-page .shop-contact-buttons{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}
 .public-page .shop-contact-buttons a{width:100%;min-height:44px;padding:10px;font-size:13px}
 .public-page .shop-view-bar{padding-left:12px;padding-right:12px;gap:8px}
 .public-page #shop-back{padding:8px;font-size:12px;flex:0 0 auto}
 .public-page #shop-view-title{font-size:16px}
 .public-page #shop-view-content{padding:14px 12px 30px}
 .public-page .menus,.public-page #menu .menus{gap:6px}
 .public-page .managed-menus .dish-body{padding:8px 6px}
 .public-page .managed-menus h3,.public-page #menu .managed-menus h3{font-size:12px;line-height:1.5}
 .public-page .managed-menus .price,.public-page #menu .managed-menus .price{font-size:14px;line-height:1.6;margin:8px 0}
 .public-page .managed-description{font-size:11px;line-height:1.6}
 .public-page .ads-trainer-table{min-width:360px}
}
@media(max-width:360px){
 .public-page header .fortune-scene,.public-page header .fortune-art{width:34px;height:50px}
 .public-page .fortune-action{padding:8px 7px;font-size:11px}
 .public-page .brand-location{font-size:10px}
 .public-page .shop-view-bar{gap:6px}
 .public-page #shop-view-title{font-size:14px}
}

