/* Layout follows available space, without device-name detection or hidden content. */
html{max-width:100%;-webkit-text-size-adjust:100%}
body{max-width:100%;overflow-wrap:break-word}
main,.portal-shell,.portal-content,.b-content,.c-layout,.workspace,.basket,.portal-context{min-width:0;max-width:100%}
button,input,select,textarea{touch-action:manipulation}
@media(max-width:700px){
 main{padding-left:10px;padding-right:10px;padding-bottom:calc(16px + env(safe-area-inset-bottom))}
 body.portal-menu-ready>header{display:flex;flex-wrap:wrap;gap:7px;padding:8px 10px!important}
 body.portal-menu-ready>header>div:first-of-type{flex:1 1 140px;min-width:0}
 body.portal-menu-ready>header .portal-brand{font-size:15px;gap:6px}
 body.portal-menu-ready>header .portal-brand img{width:30px;height:36px}
 body.portal-menu-ready>header .portal-key{display:none}
 body.portal-menu-ready>header #member-greeting{display:none}
 body.portal-menu-ready>header .event-menu-button,body.portal-menu-ready>header .event-header-back{width:40px!important;min-width:40px;height:40px!important}
 body.portal-menu-ready>header .event-header-caption{order:5!important;flex:1 1 100%;font-size:.95rem!important;margin:0!important}
 body.portal-menu-ready>header #logout{font-size:.78rem;padding:10px}
 body.portal-menu-ready>header .portal-online{margin:0;min-width:0}
 body.portal-menu-ready>header #portal-online-toggle{font-size:.75rem;padding:8px}
 .portal-online-panel{position:fixed!important;left:10px!important;right:10px!important;top:var(--event-header-height,100px)!important;max-width:none!important;width:auto!important}
 .portal-context{flex-wrap:wrap;height:auto;padding:10px!important;gap:8px}
 .portal-content #beverage-subtabs{display:flex;flex-wrap:wrap!important;overflow:visible!important}
 .portal-content #beverage-subtabs>*{white-space:normal!important;min-width:44px;max-width:100%}
 body .event-workspace .event-window-tabs{position:static!important;display:flex;flex-wrap:wrap!important;overflow:visible!important;height:auto;gap:6px;padding:8px}
 body .event-workspace .event-window-tab{min-width:0!important;max-width:100%;flex:1 1 130px}
 body .event-workspace .event-window-tab>button:first-child{min-width:0;white-space:normal!important;overflow-wrap:anywhere}
 body .event-workspace .event-window-home,body .plan-calendar-tab{min-width:0;flex:1 1 110px;white-space:normal!important;min-height:44px}
 body .event-workspace .event-grid-panel{padding:10px}
 body .event-workspace .event-grid{grid-template-columns:minmax(0,1fr)!important;gap:12px}
 body .event-workspace .event-grid-heading{display:flex;flex-wrap:wrap;gap:8px}
 body .event-workspace .event-grid-heading .b-main-toolbar{width:100%;min-width:0;flex-wrap:wrap}
 body .event-workspace .event-grid-controls{flex-wrap:wrap}
 body .event-workspace .event-grid-controls>*{min-width:0!important;width:100%;max-width:none}
 body .planning-board .b-content .portal-kanban,body .planning-board .b-content .portal-file-board,body .planning-board .b-content .portal-entry-list{display:grid!important;grid-template-columns:minmax(0,1fr)!important;overflow:visible!important;max-height:none!important;gap:12px;scroll-snap-type:none}
 body .planning-board .portal-kanban>.c-column{height:auto!important;max-height:none!important;min-width:0!important;overflow:visible!important}
 body .planning-board .portal-kanban>.c-column>h3{position:static}
 body .event-workspace .portal-board-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important;gap:7px;width:100%}
 body .event-workspace .portal-board-tabs .portal-symbol-action{width:100%!important;min-width:0!important;max-width:none!important;min-height:68px;height:auto!important;padding:9px!important;flex-wrap:wrap;white-space:normal!important}
 body .event-workspace .portal-board-navigation{max-width:100%;display:flex;flex-wrap:wrap}
 body .event-workspace .portal-board-overview{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body .event-workspace .portal-summary-tile{min-width:0;overflow-wrap:anywhere;padding:12px}
 body .event-workspace .portal-summary-tile span{font-size:.86rem}
 body .event-workspace .b-content{padding:10px!important}
 body .event-workspace .portal-kanban-card{max-width:100%;overflow-wrap:anywhere}
 body .event-workspace .portal-card-meta{flex-wrap:wrap}
 .plan-month-grid{gap:3px}.plan-day{padding:4px;min-width:0;min-height:57px}
 .plan-month-controls strong{font-size:.95rem}.plan-appointment{padding:12px}
 .b-modal,.c-modal,.plan-settings-dialog,.plan-file-dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(var(--app-vh,1vh)*100 - 16px)!important;box-sizing:border-box;padding:16px!important;margin:8px auto!important}
 .b-modal .row{display:flex;flex-direction:column;align-items:stretch}
 .b-modal .row>*{width:100%;min-width:0;flex:auto}
 .b-modal .toolbar{flex-wrap:wrap;gap:8px}
 .b-modal input,.b-modal select,.b-modal textarea,#auth input,#auth select{font-size:16px;min-width:0;max-width:100%}
 .b-modal .b-point-row{grid-template-columns:14px minmax(0,1fr) 40px}
 .b-modal .b-point-row textarea{width:100%}
 .b-modal fieldset{min-width:0}
 .b-modal .b-answer-row{display:flex;flex-wrap:nowrap;gap:5px}
 .b-modal .b-answer-row input{min-width:0}
 .table-wrap.app-mobile-table{overflow:visible}
 .app-mobile-table table,.app-mobile-table tbody,.app-mobile-table tr,.app-mobile-table td{display:block;width:100%;min-width:0}
 .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;white-space:normal!important}
 .app-mobile-table td[data-column-label]::before{content:attr(data-column-label);display:block;color:#796b85;font-weight:700;font-size:.75rem;margin-bottom:5px}
 .app-mobile-table td input,.app-mobile-table td select{min-width:0;width:100%}
 .app-mobile-table td button{min-height:44px}
 .topbar{flex-wrap:wrap;min-width:0}
 .topbar .brand{min-width:0;max-width:100%}
 .cash-toolbar,.cash-tabs,.tabs{flex-wrap:wrap!important;max-width:100%}
 .cash-toolbar button,.cash-tabs button{min-width:44px;max-width:100%}
 body.cash-sale-focus .workspace{grid-template-columns:minmax(0,1fr)!important}
 .cash-portal-drawer{max-width:88vw}
}
@media(min-width:701px) and (max-width:1100px){
 body .planning-board .b-content .portal-kanban{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
 body .planning-board .portal-kanban-card{padding:11px;overflow-wrap:anywhere}
 body .event-workspace .event-window-tabs{flex-wrap:wrap;overflow:visible}
 body .event-workspace .event-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body .event-workspace .portal-board-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible}
 body .event-workspace .portal-board-tabs .portal-symbol-action{min-width:0!important;width:100%!important;max-width:none;min-height:70px;height:auto}
 body .planning-board .portal-kanban>.c-column{padding:9px}
}
@media(prefers-reduced-motion:reduce){.event-grid-card,.portal-summary-tile{transition:none!important}}
@media(max-width:700px){body.portal-menu-ready>header>div:first-of-type{display:block!important}body .event-workspace .portal-meeting-header .toolbar{flex-wrap:wrap}}
@media(max-width:430px){body.portal-menu-ready>header>div:first-of-type{flex:0 0 32px!important}body.portal-menu-ready>header .portal-brand>span{display:none}body.portal-menu-ready>header .portal-brand img{margin:0}}
