/* Mobile interaction and layout safeguards; shared by all marketplace views. */
h1,h2,h3,h4,summary,strong{overflow-wrap:anywhere}
.profile-heading>h2,.dashboard-top>div,.chat-message>div{min-width:0}
.offer-compare-scroll{overscroll-behavior-x:contain}
.offer-compare-scroll:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
.job-unsaved-dialog,.profile-save-dialog{max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
.photo-lightbox{overscroll-behavior:contain}
body:has(.photo-lightbox){overflow:hidden}
@media(max-width:768px){
 input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea{font-size:16px!important}
 summary{min-height:44px}
 button:not(.goklus-photo-thumb),.dashboard-top button,.filterbar button,#jobs .card button,.job-ad-edit,.notification-tabs button,.notification-all,.pro-review-item button,header #logout{min-height:44px}
 .guest-nav .header-cta{display:inline-flex;align-items:center;min-height:44px}
 .pro-specialty,.notification-settings-row>label,.pro-photo-picker{min-height:44px;display:flex;align-items:center;justify-content:center}
 .pro-specialty{justify-content:flex-start}
 .notification-settings-row>label{margin:0}
 .theme-toggle{height:44px;padding-block:4px}
 .theme-toggle:before{top:8px}
 .notification-trigger{min-width:44px}
 .stat span{font-size:12px}
 .filterbar button{font-size:12px}
 .work-photo-delete{width:44px;height:44px;top:3px;right:3px}
 .photo-upload-controls{padding:10px}
 .photo-upload-controls button{width:100%}
 .job-ad-edit-form,.bid-edit-form{padding:14px}
 .job-ad-heading{flex-direction:column}
 .job-ad-edit{align-self:flex-start}
 .offer-compare{padding:18px}
 .offer-compare table{min-width:0;table-layout:fixed;font-size:12px}
 .offer-compare th,.offer-compare td{padding:10px 4px;overflow-wrap:anywhere;vertical-align:top}
 .offer-compare th:first-child{width:18%}
 .offer-tools{display:grid;grid-template-columns:1fr;gap:8px}
 .offer-tools select{width:100%;max-width:none}
 .job-unsaved-dialog,.profile-save-dialog{padding:22px}
}
@media(max-width:360px){
 .is-authenticated header{gap:8px;padding-inline:12px;flex-wrap:wrap}
 .is-authenticated header>.row{gap:6px}
 .is-authenticated .brand-home{gap:5px}
 .is-authenticated b.brand{font-size:20px}
 .is-authenticated b.brand small{font-size:12px}
 .is-authenticated .brand-symbol{width:29px;height:29px}
 .is-authenticated header #logout{padding-inline:8px}
 .stats{grid-template-columns:1fr}
 .stat{display:flex;align-items:baseline;gap:12px;padding:13px 17px}
 .stat strong{font-size:25px;margin:0}
}
@media(max-height:480px){
 .photo-lightbox{padding:54px 64px 46px}
 .photo-lightbox-image{max-height:calc(100dvh - 105px)}
 .photo-lightbox-counter{bottom:9px}
 .photo-lightbox-close{top:6px;right:10px}
 .photo-lightbox-prev,.photo-lightbox-next{top:calc(50% - 23px);bottom:auto}
}

.chat-history-tools{display:flex;flex-wrap:wrap;gap:8px;margin-block:12px}.chat-history-tools button{min-height:44px;max-width:100%;white-space:normal}#chat-status{overflow-wrap:anywhere}.chat-message p{white-space:pre-wrap;overflow-wrap:anywhere}
#chat-history{max-height:55vh;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}#chat-history:focus-visible{outline:2px solid var(--accent);outline-offset:4px}#chat-history #chat-older{min-height:44px;max-width:100%;white-space:normal;margin-bottom:12px}
