/* Shared mobile layout, loaded last on every application page. */
@media screen and (max-width: 900px){
 *,*::before,*::after{box-sizing:border-box}
 html{scroll-padding-top:16px}
 body{overflow-wrap:anywhere}
 main,section,article,form,fieldset,details,dialog,label,nav,header{min-width:0}
 .calendar-shell,.request-shell,.offers-shell,.guest-shell{width:100%;max-width:100%}
 input,select,textarea{min-width:0;max-width:100%;font-size:16px}
 input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select{min-height:46px;width:100%}
 textarea{width:100%;line-height:1.5}
 button,.primary,.small-button{min-height:44px;max-width:100%;white-space:normal;touch-action:manipulation}
 input[type=checkbox],input[type=radio]{width:20px;height:20px;min-height:20px;flex:0 0 20px}
 label.check,.archive-toggle{align-items:flex-start;gap:10px;line-height:1.5}
 nav{display:flex;flex-wrap:wrap;gap:8px 14px}
 nav a,summary{min-height:44px;padding-top:10px;padding-bottom:10px}
 nav span{flex-basis:100%;margin-left:0}
 pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}
 dialog{width:calc(100% - 24px);max-width:700px;max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;padding:20px 16px}
 .dialog-heading{align-items:flex-start;gap:12px}
 .dialog-heading h2{flex:1;min-width:0}
 .calendar-scroll{max-width:100%;max-height:70dvh;overflow:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .calendar-scroll .booking-bar{min-height:98px;white-space:normal}
 .calendar-scroll{--label-width:130px}
 .toolbar{gap:10px;align-items:end}
 .toolbar label{flex:1 1 160px;min-width:0}
 #bulkApartments{max-height:45dvh;overflow:auto;overscroll-behavior:contain;padding:8px}
 #bulkApartments label{min-height:44px}
 #jobs article,.inquiry-card,.draft,#revenueResults article{overflow-wrap:anywhere;min-width:0}
}
@media screen and (max-width:600px){
 body{padding:0}
 main.calendar-shell,main.request-shell,main.offers-shell{padding:16px 12px calc(24px + env(safe-area-inset-bottom))}
 .guest-shell{margin:12px auto;padding:24px 16px}
 body:has(.rail)>main{padding:0 12px calc(24px + env(safe-area-inset-bottom))}
 .rail{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:12px}
 .rail .brand{grid-column:1/-1;width:100%;font-size:19px}
 .rail .nav{font-size:13px;padding:10px 8px;min-height:44px}
 .workspace,.offers-grid,.two{grid-template-columns:minmax(0,1fr)!important;gap:12px}
 .card,.editor,.settings-card,.mail-card{padding:16px 12px}
 .title-row,header,.section-head{flex-wrap:wrap;gap:12px}
 h1,.offers-shell h1{font-size:clamp(24px,7vw,30px);line-height:1.2}
 h2{font-size:21px;line-height:1.3}
 .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .toolbar label{min-width:0;margin:0}
 .toolbar>button{grid-column:1/-1}
 .toolbar button,form>button,fieldset>button,.draft button,.inquiry-actions button{width:100%;margin:6px 0}
 .inquiry-actions,.link-actions,.actions{display:flex;flex-direction:column;align-items:stretch;gap:8px}
 .link-actions a,.inquiry-actions a{min-height:44px;display:flex;align-items:center}
 #bookingList{display:grid;grid-template-columns:minmax(0,1fr);max-height:50dvh;overflow:auto;scroll-snap-type:none;padding:0 0 8px}
 .booking-card{width:100%;max-width:100%;min-width:0;flex:auto}
 .calendar-scroll{--label-width:112px}
 .calendar-scroll:not(.density-wide):not(.density-narrow):not(.density-compact){--day-width:80px}
 .calendar-scroll th:first-child{font-size:11px;line-height:1.4}
 .calendar-legend{gap:6px;font-size:12px}
 .offer-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .offer-tabs button{width:100%;font-size:14px}
 .toast{max-width:calc(100% - 24px);bottom:calc(12px + env(safe-area-inset-bottom))}
}
@media screen and (max-width:360px){.toolbar{grid-template-columns:minmax(0,1fr)}.calendar-scroll{--label-width:96px}}
