.b3gu .mobile-app-nav,.b3gu .mobile-menu-toggle,.b3gu .mobile-filter-toggle,.b3gu .pwa-install{display:none}
@media screen and (max-width:767px){
  .b3gu{padding:0 16px;padding-bottom:calc(88px + env(safe-area-inset-bottom));max-width:100%}
  .b3gu main{padding:20px 0 28px;min-height:60vh}
  .b3gu h1{font-size:28px;line-height:1.15;margin-bottom:20px}
  .b3gu h2{font-size:22px}.b3gu h3{font-size:19px}
  .b3gu .site-header{min-height:72px;padding:12px 0;gap:12px;flex-wrap:wrap}
  .b3gu .brand{flex:1;min-width:0}.b3gu .brand img{max-width:200px;width:100%;height:auto}
  .b3gu .mobile-menu-toggle,.b3gu .mobile-filter-toggle{display:inline-flex;align-items:center;justify-content:center}
  .b3gu .site-header.mobile-menu-ready nav{display:none}
  .b3gu .site-header.mobile-menu-open nav{display:flex;width:100%;gap:8px;align-items:stretch}
  .b3gu .site-header nav .nav-link,.b3gu .site-header nav .nav-logout,.b3gu .site-header nav .nav-upgrade{min-height:44px;padding:12px;font-size:14px}
  .b3gu .site-header .user-greeting{flex-wrap:wrap;overflow-wrap:anywhere;max-width:100%}
  .b3gu .mobile-app-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;z-index:50;bottom:0;left:0;right:0;gap:0;padding:6px 8px calc(6px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #d9e6ef;box-shadow:0 -4px 20px #174d7912}
  .b3gu .mobile-app-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:56px;gap:2px;text-decoration:none;font-size:11px;font-weight:700;border-radius:10px;color:#52647a;text-align:center}
  .b3gu .mobile-app-nav a span{font-size:25px;line-height:1}.b3gu .mobile-app-nav a[aria-current]{background:#e9f5fc;color:#174d79}
  .b3gu .pwa-install{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:16px;margin:0 0 20px;background:#e9f5fc;border:1px solid #bcdced;border-radius:14px}
  .b3gu .pwa-install>div{flex:1 1 180px}.b3gu .pwa-install p{font-size:14px;margin:4px 0 0}.b3gu .pwa-install .button{flex:1 1 140px}
  .b3gu .button,.b3gu .cost-simulator-controls .button{min-height:44px;font-size:15px;padding:12px;white-space:normal}
  .b3gu input,.b3gu select,.b3gu textarea,.b3gu .compact-filters input,.b3gu .compact-filters select{font-size:16px;min-height:44px}
  .b3gu .compact-filters input[type=checkbox]{min-height:22px;width:22px;height:22px}
  .b3gu .plans,.b3gu .records,.b3gu .form-grid,.b3gu .compact-filters .form-grid,.b3gu .home-overview{grid-template-columns:minmax(0,1fr);gap:16px}
  .b3gu .home-central-zone{height:auto;max-height:none;overflow:visible}
  .b3gu .home-central-zone .home-overview{min-width:0;grid-template-columns:minmax(0,1fr)}.b3gu .chart-card{padding:16px}
  .b3gu .home-central-zone .home-overview>.chart-card{padding:20px 0;border-right:0;border-bottom:1px solid #d9e6ef}
  .b3gu .home-access-plans .plans{min-width:0;grid-template-columns:minmax(0,1fr)}
  .b3gu .plan,.b3gu .plan.featured,.b3gu .panel,.b3gu .bel-card{padding:16px;min-width:0}
  .b3gu .bel-card h3{font-size:20px;line-height:1.3}.b3gu .bel-summary{font-size:15px;line-height:1.5}
  .b3gu .bel-card .actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
  .b3gu .bel-card .actions>*{width:100%;min-width:0}
  .b3gu #filter-fields.mobile-filters-collapsed{display:none}
  .b3gu .mobile-filter-toggle{width:100%;margin-bottom:12px}
  .b3gu .filter-actions{display:flex;gap:8px;flex-wrap:wrap}.b3gu .filter-actions .button{flex:1}
  .b3gu .toolbar{gap:8px}.b3gu .toolbar .button{flex:1 1 140px}
  .b3gu .pagination{display:grid;grid-template-columns:1fr auto 1fr;gap:8px}
  .b3gu dialog{width:calc(100% - 16px);max-width:calc(100% - 16px);max-height:calc(100dvh - 24px);padding:18px;overflow:auto;overscroll-behavior:contain}
  .b3gu .dialog-topbar{position:sticky;top:-18px;background:#fff;z-index:2;padding:10px 0}
  .b3gu .dialog-close-top{min-width:44px;min-height:44px}
  .b3gu .grant-chat{bottom:calc(84px + env(safe-area-inset-bottom))}
  .b3gu .grant-chat-window{bottom:calc(150px + env(safe-area-inset-bottom))}
  .b3gu .home-claim h1{margin:8px 0 20px}
  .b3gu .home-catalog-button{font-size:18px}
}
@media (display-mode:standalone){.b3gu .pwa-install{display:none}}

/* Mobile reflow: retain all content instead of clipping horizontal overflow.
   ID selectors deliberately override the desktop catalog's 710px minimum. */
@media screen and (max-width:767px){
  .b3gu{box-sizing:border-box;width:100%;min-width:0;overflow-wrap:anywhere}
  .b3gu .site-header{margin-left:0;margin-right:0;width:100%}
  .b3gu .site-header:before{left:-16px;right:-16px;margin-left:0;margin-right:0}
  .b3gu :where(main,section,article,form,fieldset,div,label,nav,header,footer){min-width:0}
  .b3gu :where(input,select,textarea,button,img,video,iframe){max-width:100%}
  .b3gu :where(button,a){overflow-wrap:anywhere}
  .b3gu #filter-form{width:100%;overflow:visible}
  .b3gu #filter-fields{width:100%;min-width:0;grid-template-columns:minmax(0,1fr);gap:14px}
  .b3gu #filter-fields .checkbox-filter{white-space:normal;align-items:flex-start}
  .b3gu #filter-fields .checkbox-filter input{flex:0 0 22px}
  .b3gu #filter-form .filter-actions{display:flex;flex-direction:column;align-items:stretch;flex-wrap:wrap;width:100%;min-width:0;gap:12px}
  .b3gu #filter-form .filter-actions>*{flex:0 1 auto;min-width:0;width:100%;max-width:100%;margin:0}
  .b3gu #filter-form .filter-free-search{order:0;flex:0 1 auto;width:100%;min-width:0;font-size:15px}
  .b3gu #filter-form .municipality-filter,.b3gu #filter-form #save-search,.b3gu #filter-form .filter-actions>button.secondary,.b3gu #filter-form .filter-actions>button[type=submit]{width:100%;max-width:100%;white-space:normal;min-height:44px}
  .b3gu #filter-form .filter-actions>button[type=submit]{order:1}
  .b3gu .home-access-plans,.b3gu .table-wrap{overflow:visible;max-width:100%}
  .b3gu .charts-grid,.b3gu .login-layout,.b3gu .signup-layout,.b3gu .plan-service-grid,.b3gu .plan-registration-actions,.b3gu .paid-subscription-details,.b3gu .personal-profile-data,.b3gu .bel-detail-grid,.b3gu .cost-simulator-controls{grid-template-columns:minmax(0,1fr)}
  .b3gu .bel-deadline-hero{grid-template-columns:minmax(0,1fr);gap:8px}
  .b3gu .bel-card-head{flex-wrap:wrap}
  .b3gu .bel-date-row{grid-template-columns:minmax(0,1fr);gap:2px}
  .b3gu .bel-date-row strong{text-align:left}
  .b3gu .bandi-record-actions.is-paid{grid-template-columns:minmax(0,1fr)}
  .b3gu .site-header .user-greeting,.b3gu .site-header .connected-user,.b3gu .membership-status{white-space:normal;max-width:100%;overflow:visible;text-overflow:clip}
  .b3gu .personal-area-tabs{display:grid;grid-template-columns:minmax(0,1fr);width:100%}
  .b3gu .personal-area-tabs a{min-width:0;text-align:center}
  .b3gu .pagination{grid-template-columns:repeat(2,minmax(0,1fr))}
  .b3gu #page-label{grid-row:1;grid-column:1/-1;text-align:center}
  .b3gu table{width:100%;max-width:100%;table-layout:fixed}
  .b3gu th,.b3gu td{padding:10px 6px;white-space:normal;overflow-wrap:anywhere}
  .b3gu pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}
  .b3gu .chart-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 32px}
  .b3gu .chart-row>span:first-child{white-space:normal;overflow:visible;text-overflow:clip}
  .b3gu .chart-tooltip{white-space:normal;max-width:100%;left:0!important;right:0}
  .b3gu #b3gu-dialog{padding:18px}
  .b3gu .dialog-topbar{margin:-18px -18px 18px;padding:12px 18px;top:-18px;gap:8px}
  .b3gu .dialog-topbar #dialog-title{flex:1;min-width:0}
  .b3gu #dialog-text{min-width:0;max-width:100%;overflow-wrap:anywhere}
  .b3gu .ai-final-estimate{flex-direction:column;align-items:flex-start;gap:8px}
  .b3gu .grant-chat-window{position:fixed;left:12px;right:12px;width:auto;max-width:calc(100% - 24px)}
  .b3gu .grant-message{min-width:0;overflow-wrap:anywhere}
  .b3gu #grant-chat-form{grid-template-columns:minmax(0,1fr)}
  .b3gu #grant-chat-form .button{grid-column:1;grid-row:2}
  .b3gu #grant-chat-form .privacy-acceptance{grid-row:3}
}
