/* Shared width contract: reflow content first, then contain horizontal overscroll. */
html{max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%}
body{min-width:0;max-width:100%;overscroll-behavior-x:none}
main,section,article,aside,nav,form,fieldset,dialog,.row,.toolbar,.panel,.portal-shell,.portal-content,.workspace,.shop,.basket,.table-wrap{box-sizing:border-box;min-width:0}
img,video,canvas,iframe{max-width:100%}input,select,textarea{box-sizing:border-box;max-width:100%}fieldset{min-inline-size:0}p,li,h1,h2,h3,h4,label,.notice{overflow-wrap:break-word}
@media screen and (max-width:1366px){
 .nav,.tabs,.filters,.cash-tabs,.cash-toolbar,.cash-quick-nav,.portal-nav,.portal-content #beverage-subtabs,.invoice-window-tabs,.event-window-tabs,.portal-board-tabs{flex-wrap:wrap!important;overflow-x:visible!important;max-width:100%;min-width:0}
 .tabs>*,.filters>*,.cash-toolbar>*,.toolbar>*,.row>*{min-width:0;max-width:100%}
 .tabs button,.nav button,.filters button,.portal-nav a,.portal-nav button,.toolbar button,.file-button{white-space:normal!important;overflow-wrap:break-word}
 .invoice-window-tabs{gap:6px;padding-bottom:7px;margin-left:0;margin-right:0}
 .invoice-window-tab{flex:1 1 180px;min-width:0;max-width:100%}
 .invoice-window-tabs .invoice-tab-name{white-space:normal;overflow-wrap:anywhere}
 .invoice-window-tabs>button{flex:1 1 150px;white-space:normal;min-width:0;max-width:100%}
 body .event-workspace .event-window-tabs{position:static!important;flex-wrap:wrap!important;overflow:visible!important;height:auto}
 body .event-workspace .event-window-tab{min-width:0!important;max-width:100%;flex:1 1 170px}
 body .event-workspace .event-window-tab>button:first-child{white-space:normal!important;overflow-wrap:anywhere;min-width:0}
 body .event-workspace .event-window-home,body .event-workspace .plan-calendar-tab{white-space:normal;min-width:0;max-width:100%}
 body .planning-board .portal-board-tabs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible!important;width:100%}
 body .planning-board .portal-board-tabs button{min-width:0!important;width:100%!important;max-width:100%!important;height:auto!important;white-space:normal!important;flex-wrap:wrap;padding:9px!important}
 body .planning-board .portal-board-navigation{flex-wrap:wrap;max-width:100%}
 body .planning-board .b-content .portal-kanban{grid-template-columns:repeat(3,minmax(0,1fr))!important;overflow:visible!important;max-height:none!important;scroll-snap-type:none}
 body .planning-board .portal-kanban>.c-column{min-width:0!important;max-height:none!important;height:auto;overflow:visible!important}
 body .planning-board .portal-kanban-card{min-width:0;max-width:100%;overflow-wrap:anywhere}
 body .planning-board .portal-card-meta{flex-wrap:wrap}
 .board-media-gallery,.plan-people{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
 .table-wrap{max-width:100%;overflow-x:visible}table{max-width:100%;table-layout:fixed}td,th{min-width:0;overflow-wrap:anywhere;white-space:normal}td input,td select{min-width:0!important;max-width:100%}
 .saved-row,.invoice-payment,.b-document,.journal-row,.journal-right{flex-wrap:wrap;min-width:0;max-width:100%}
 .saved-row>*,.invoice-payment>*,.b-document>*,.journal-row>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
 .invoice-payment select{min-width:0!important;flex:1 1 150px}
 .portal-sidebar{max-width:calc(100vw - 16px)}
 .register-settings-sidebar{min-width:0;max-width:100%;overflow-x:visible!important}
 .register-settings-sidebar button{white-space:normal!important;min-width:0;max-width:100%}
 .catalog-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.catalog-row>*{min-width:0;max-width:100%}
 .topbar .brand,.topbar .top-status,.topbar .cash-register-control{min-width:0;max-width:100%}
 body:not(.cash-phone-register) .topbar{flex-wrap:wrap!important}.topbar .top-status{flex-wrap:wrap}
 .cash-register-control{flex-wrap:wrap}.cash-register-control>strong{overflow-wrap:anywhere;white-space:normal;max-width:100%}
 .section-top,.cashier-row{flex-wrap:wrap}.shift-pill{white-space:normal}
 .hot-drink-group,.cold-drink-sections,.cold-category-frame,.cold-drink-grid,.donation-grid,.product-grid,.hot-drink-layout{min-width:0;max-width:100%}
 .hot-drink-group .product-name{overflow-wrap:break-word}.cart-lines,.cash-payment-fields,#round-products-grid{overflow-x:hidden!important}
 .cart-item-heading{flex-wrap:wrap}.cart-line{min-width:0}.cart-line .qty{max-width:100%;flex-wrap:wrap}
 .cold-category-frame .cold-drink-grid{grid-template-columns:repeat(auto-fit,minmax(105px,1fr))!important}
 dialog,.b-modal,.c-modal{box-sizing:border-box;max-width:calc(100vw - 16px)!important;overflow-x:hidden}
 dialog .row,dialog .toolbar{flex-wrap:wrap}dialog fieldset{min-width:0}
 .plan-answer,.b-answer-top,.board-order-row{min-width:0;flex-wrap:wrap}.board-order-name{overflow-wrap:anywhere}
 /* Public pages: keep the header and all grids inside the viewport. */
 header>.nav{gap:12px;flex-wrap:wrap}.brand-copy{min-width:0}.brand-copy b{overflow-wrap:break-word}
 header>.nav .links{flex-wrap:wrap}header>.nav .links a{max-width:100%;overflow-wrap:break-word}
 .wrap,.hero-inner,.section-head,.event-feature,.location,.footer-grid,.inquiry-layout,.inquiry-form{min-width:0;max-width:100%}
 .section-head>*,.event-feature>*,.location>*,.footer-grid>*,.cards>*,.social-grid>*{min-width:0}
 .brand-motto,.brand-motto-inline{overflow-wrap:anywhere;max-width:100%}
}
@media screen and (max-width:1100px){
 .table-wrap.app-mobile-table{overflow:visible!important}
 .app-mobile-table table,.app-mobile-table tbody,.app-mobile-table tr,.app-mobile-table td{display:block!important;width:100%!important;min-width:0!important;max-width:100%;box-sizing:border-box}
 .app-mobile-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
 .app-mobile-table tr{border:1px solid #d8cce1;border-radius:10px;padding:8px;margin:10px 0}
 .app-mobile-table td{border:0;padding:8px;text-align:left!important;white-space:normal!important}
 .app-mobile-table td[data-column-label]::before{content:attr(data-column-label);display:block;font-size:12px;font-weight:700;color:#796b85;margin-bottom:5px}
 .app-mobile-table td input,.app-mobile-table td select{width:100%;min-width:0!important;max-width:100%}
 .app-mobile-table td button{min-height:44px;max-width:100%;white-space:normal}
 .register-settings-layout,.settings-grid,.report-layout{grid-template-columns:minmax(0,1fr)!important}
 .register-settings-sidebar{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));position:static!important;gap:6px}
 .register-settings-sidebar>*{min-width:0;width:100%!important}
 body .planning-board .b-content .portal-kanban{grid-template-columns:minmax(0,1fr)!important}
 body .planning-board .portal-kanban>.c-column>h3{position:static}
 .lz-cal-layout{grid-template-columns:minmax(0,1fr)}
}
@media screen and (max-width:700px){
 body .planning-board .portal-board-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
 .register-settings-sidebar{grid-template-columns:repeat(3,minmax(0,1fr))}
 .catalog-row,.report-layout,.settings-grid{grid-template-columns:minmax(0,1fr)!important}
 .row>*{flex:1 1 100%;min-width:0}.row input,.row select{min-width:0;width:100%}
 .plan-people,.board-media-gallery{grid-template-columns:minmax(0,1fr)}
 header>.nav{padding-left:12px;padding-right:12px;gap:8px}.brand{min-width:0;max-width:calc(100% - 120px)}.topbar .brand{max-width:none}
 .brand-logo{flex:0 0 42px;width:42px;height:42px}.brand-copy b{font-size:12px!important}.brand-copy .brand-motto-inline{font-size:11px}
 .lz-cal-head{flex-wrap:wrap}.lz-cal-controls{gap:3px}.lz-cal-controls select{min-width:0;max-width:100%}
 .social{gap:10px;padding:20px}.social>span{min-width:0}.event-copy h3,.location-copy address{overflow-wrap:anywhere}
}
/* Order-first layout for portrait tablets and landscape phones as well. */
@media screen and (max-width:1000px) and (orientation:portrait),screen and (max-width:1000px) and (max-height:500px){
 body.cash-phone-list .workspace{display:block!important}
 #round-products{position:fixed!important;top:6px!important;left:6px!important;right:6px!important;bottom:auto!important;transform:none!important;margin:0!important;width:calc(100vw - 12px)!important;height:calc(var(--cash-viewport-height,100vh) - 12px)!important;max-height:none;padding:10px}
 #round-products-grid{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}
 #round-products-grid .hot-drink-layout,#round-products-grid .hot-fixed-layout{grid-template-columns:minmax(0,1fr)!important}
 #round-products-grid .hot-fixed-layout>.hot-drink-group{grid-column:auto!important;grid-row:auto!important}
 #round-products-categories{display:flex;flex-wrap:wrap;gap:5px}
 #round-products-categories button{min-width:0;flex:1 1 100px;white-space:normal}
}
@media screen and (max-height:600px) and (max-width:1000px){
 body.cash-phone-list .basket{overflow-y:auto!important;overflow-x:hidden!important;display:flex!important;min-height:0}
 body.cash-phone-list .basket>.cart-lines{height:auto!important;flex:0 0 auto!important;min-height:120px!important;max-height:none!important;overflow:visible!important}
 body.cash-phone-list .basket>.cash-payment-fields{flex:0 0 auto!important;overflow:visible!important}
 body.cash-phone-list .basket>*{flex-shrink:0}
}
@media screen and (max-width:1366px){
 body .planning-board .b-content .portal-kanban.portal-entry-list{grid-template-columns:minmax(0,1fr)!important}
 body .planning-board .b-content .portal-kanban.portal-file-board{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body .planning-board .portal-flat-column{min-width:0;max-width:100%}
 body.portal-menu-ready>header{flex-wrap:wrap!important;max-width:100%;min-width:0}
 body.portal-menu-ready>header .event-header-caption{min-width:0;max-width:100%;overflow-wrap:anywhere}
 .b-point-row textarea,.b-answer-row input{min-width:0;max-width:100%}
}
@media screen and (max-width:1100px){body .planning-board .b-content .portal-kanban.portal-file-board{grid-template-columns:minmax(0,1fr)!important}}
@media screen and (max-width:700px){body .planning-board .portal-entry-list>.portal-flat-column{grid-template-columns:minmax(0,1fr)!important}}
