/* v216: app-style phone layout (phones only; desktop is not changed). */
html{-webkit-text-size-adjust:100%}
.m4u-bnav,.m4u-bar,.m4u-sheet-bar,.m4u-sheet-head,.m4u-backdrop,.m4u-filter-toggle{display:none}

@media (max-width:900px){
  *,*::before,*::after{box-sizing:border-box}
  img,video,canvas{max-width:100%}
  .account-layout,.pay-layout{grid-template-columns:minmax(0,1fr)!important}
  .account-layout>*,.account-content,.account-sidebar{min-width:0;max-width:100%}
  .account-content input,.account-content select,.account-content textarea{max-width:100%;width:100%}
  .listings-layout{flex-direction:column;align-items:stretch}
  .listings-layout>*{min-width:0}
  .sidebar-filters{width:100%}
  .right-ad-sidebar{width:100%;flex-direction:row;overflow-x:auto}
  .right-ad-sidebar>*{min-width:240px;flex:0 0 auto}
}

@media (max-width:700px){
  body{padding-bottom:calc(64px + env(safe-area-inset-bottom));background:#f4f6fa}
  input,select,textarea{font-size:16px}
  input[type=checkbox],input[type=radio]{width:auto}

  /* ---------- top bar: logo + language only ---------- */
  .main-header{padding:6px 14px;position:sticky;top:0;z-index:50;border-bottom:1px solid #e5e9f0}
  .header-container{flex-wrap:nowrap;gap:10px}
  .header-actions{display:contents}
  .brand-logo{margin-right:auto}
  .brand-logo img{height:30px!important}
  .btn-post-ad,.auth-container,#myChatsLink{display:none!important}
  .lang-switcher{margin:0;border:0;padding:0}
  .lang-dropdown{padding:6px 24px 6px 10px;font-size:12px;min-height:34px;background-position:right 8px center}
  .shared-page-header{padding:8px 14px;flex-wrap:nowrap;position:sticky;top:0;z-index:50}
  .shared-page-header .brand-logo img{height:28px!important}
  .page-breadcrumb{padding:0 14px;margin:10px auto;font-size:12px;white-space:nowrap;overflow-x:auto}

  /* ---------- bottom menu ---------- */
  .m4u-bnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:900;background:#fff;border-top:1px solid #e2e8f0;padding:6px 6px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -4px 16px rgba(15,23,42,.06)}
  .m4u-bnav a,.m4u-bnav button{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;background:none;border:0;padding:4px 0;font:inherit;font-size:11px;font-weight:700;color:#64748b;text-decoration:none;min-height:46px;cursor:pointer}
  .m4u-bnav svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  .m4u-bnav .on{color:#2563eb}
  .m4u-bnav a{position:relative}
  .m4u-bnav .bn-cnt{position:absolute;top:1px;left:50%;margin-left:4px;min-width:14px;height:14px;padding:0 3px;border-radius:9px;background:#dc2626;color:#fff;font-size:10px;font-weight:700;line-height:14px;text-align:center;font-style:normal;border:1.5px solid #fff;box-sizing:content-box}
  .m4u-bnav .bn-cnt[hidden]{display:none}
  .m4u-bnav .post{color:#fff}
  .m4u-bnav .post span.pb{display:flex;align-items:center;justify-content:center;width:46px;height:46px;margin-top:-22px;border-radius:50%;background:#0b9e76;box-shadow:0 4px 12px rgba(11,158,118,.4);border:3px solid #fff}
  .m4u-bnav .post svg{stroke:#fff;width:24px;height:24px}
  .m4u-bnav .post em{font-style:normal;color:#0b9e76}
  body.m4u-detail-open .m4u-bnav{display:none}

  /* ---------- home ---------- */
  .portal-hero{min-height:0;padding:34px 14px}
  .portal-hero h1{font-size:24px}

  /* ---------- Vehicles ---------- */
  #breadcrumb,.page-breadcrumb{display:block;font-size:12px;margin:8px 14px;padding:0;white-space:nowrap;overflow-x:auto;scrollbar-width:none}
  .section-hero,.vehicle-hero,.hero-section{padding:22px 14px}
  .main-layout{padding:10px 12px}
  .listings-header{display:flex;flex-wrap:wrap;gap:8px;border:0;padding:0;margin:0 0 10px;align-items:center}
  .listings-header>div:first-child{flex:1 0 100%}
  .listings-header h2{font-size:18px}
  .results-sub{font-size:12px;margin:2px 0 0}
  .sort-control{flex:1 1 0;min-width:0;display:flex}
  .sort-control>span{display:none}
  .sort-control select{width:100%;height:44px;min-height:44px;box-sizing:border-box;padding:0 12px;font-size:14px;border-radius:12px;border:1px solid #d6dde8;background:#fff}
  .m4u-filter-toggle{display:flex;flex:1 1 0;height:44px;box-sizing:border-box;align-items:center;justify-content:center;gap:8px;min-height:44px;border:1px solid #d6dde8;border-radius:12px;background:#fff;font-weight:800;font-size:14px;color:#0f172a;cursor:pointer}
  .m4u-filter-toggle svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2}
  .listings-layout{flex-direction:column;align-items:stretch;gap:12px}
  .listings-layout>*{min-width:0}
  .sidebar-filters .filter-header h3{display:none}
  .sidebar-filters .filter-header{display:flex;justify-content:flex-end;margin:0 0 4px}

  /* filters become a pull-up panel */
  .sidebar-filters{position:fixed;left:0;right:0;bottom:0;width:100%;max-height:86vh;overflow-y:auto;z-index:1001;border-radius:20px 20px 0 0;border:0;padding:0 18px 90px;transform:translateY(105%);visibility:hidden;transition:transform .25s ease,visibility 0s linear .25s;box-shadow:0 -10px 40px rgba(15,23,42,.25)}
  .sidebar-filters.m4u-open{transform:none;visibility:visible;transition:transform .25s ease}
  .m4u-sheet-head{display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:#fff;padding:16px 0 10px;margin-bottom:6px;z-index:2;font-weight:800;font-size:17px;border-bottom:1px solid #eef1f6}
  .m4u-sheet-head button{border:0;background:#f1f5f9;border-radius:50%;width:34px;height:34px;font-size:16px;cursor:pointer}
  .m4u-sheet-bar{display:block;position:fixed;left:0;right:0;bottom:0;padding:12px 18px calc(12px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e5e9f0;z-index:1002;transform:translateY(120%);visibility:hidden;transition:transform .25s ease,visibility 0s linear .25s}
  .m4u-sheet-bar.m4u-open{transform:none;visibility:visible;transition:transform .25s ease}
  .m4u-sheet-bar button{width:100%;min-height:48px;border:0;border-radius:12px;background:#2563eb;color:#fff;font-weight:800;font-size:15px;cursor:pointer}
  .m4u-backdrop{display:block;position:fixed;inset:0;background:rgba(15,23,42,.5);z-index:1000;opacity:0;pointer-events:none;transition:opacity .25s}
  .m4u-backdrop.m4u-open{opacity:1;pointer-events:auto}

  /* ads as a clean list */
  .vehicles-grid{grid-template-columns:minmax(0,1fr);gap:10px}
  .vehicles-grid>.vehicle-card{display:grid;grid-template-columns:132px minmax(0,1fr);border-radius:14px;box-shadow:0 1px 3px rgba(15,23,42,.06);position:relative}
  .vehicles-grid>.vehicle-card .card-img-wrapper{height:100%;min-height:132px;border-radius:0}
  .vehicles-grid>.vehicle-card .card-img-wrapper img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}
  .vehicles-grid>.vehicle-card .card-img-wrapper{position:relative}
  .vehicle-card .card-badges-top{top:6px;left:6px;gap:4px}
  .vehicle-card .badge-featured,.vehicle-card .badge-cond{font-size:9px;padding:2px 6px}
  .vehicle-card .card-location-tag{display:none}
  .vehicle-card .card-body{padding:10px 12px;display:flex;flex-direction:column;gap:5px;min-width:0}
  .vehicle-card .card-top-meta{font-size:11px;gap:6px;flex-wrap:wrap}
  .vehicle-card .card-title{font-size:14px;line-height:1.3;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .vehicle-card .specs-pills{display:flex;gap:4px;flex-wrap:wrap}
  .vehicle-card .spec-pill{font-size:10.5px;padding:2px 6px;white-space:nowrap}
  .vehicle-card .card-bottom-row{margin-top:auto;padding:0;border:0}
  .vehicle-card .price-amount{font-size:16px}
  .vehicle-card .btn-card-wa{display:none}
  .vehicle-card .cmp-btn{right:6px;bottom:6px;padding:4px 10px;font-size:11px}
  .vehicle-card .urgent-ribbon{transform:scale(.8);transform-origin:top right}
  .right-ad-sidebar{width:100%;flex-direction:row;overflow-x:auto;gap:12px}
  .right-ad-sidebar>*{min-width:240px;flex:0 0 auto}

  /* ---------- ad page ---------- */
  .full-page-navbar{display:flex;align-items:center;gap:8px;padding:8px 12px;position:sticky;top:0;z-index:20;flex-wrap:nowrap}
  .full-page-navbar>a.brand-logo{order:2;margin:0 0 0 auto!important}
  .full-page-navbar .brand-logo img{height:24px!important}
  #closeDetailModalBtn{order:1;white-space:nowrap;padding:8px 12px!important;font-size:13px;min-height:38px}
  .full-page-navbar .lang-switcher{display:none}
  .full-page-content{padding:0 0 56px}
  .full-page-content>.breadcrumb{display:none}
  .detail-header-row{flex-direction:column;align-items:flex-start;gap:6px;padding:6px 14px 0}
  .detail-header-row h1,.detail-header-row h2{font-size:21px;line-height:1.25;margin:0}
  .action-icons{display:flex;gap:8px;width:100%}
  .action-icons button{flex:1;min-height:40px;border:1px solid #d6dde8!important;background:#fff!important;border-radius:10px;font-weight:700;font-size:13px;color:#0f172a;display:flex;align-items:center;justify-content:center;padding:6px!important;height:auto!important;width:auto!important}
  #modalSellerMeta{flex-wrap:wrap;gap:6px;padding:8px 14px}
  .detail-split-layout{gap:12px;padding:0 12px}
  .detail-right,.seller-panel{width:100%;max-width:100%}
  .main-image-container{border-radius:14px}
  .seller-panel #modalCallBtn,.seller-panel #modalWhatsAppBtn,.seller-panel #modalChatSellerBtn{display:none!important}
  .m4u-bar{display:flex;gap:8px;position:fixed;left:0;right:0;bottom:0;z-index:10000;background:#fff;border-top:1px solid #e2e8f0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -4px 16px rgba(15,23,42,.08)}
  .m4u-bar[hidden]{display:none}
  .m4u-bar a,.m4u-bar button{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;min-height:46px;border:0;border-radius:12px;font:inherit;font-weight:800;font-size:14px;text-decoration:none;color:#fff;cursor:pointer;white-space:nowrap;padding:0 8px}
  .m4u-bar .c{background:#0f172a}.m4u-bar .w{background:#16a34a}.m4u-bar .h{background:#2563eb}
  .m4u-bar [hidden]{display:none}

  /* ---------- account, payments, forms ---------- */
  .account-layout{padding:10px 12px;gap:10px}
  .account-user-card,.acc-card,.account-content{border-radius:14px;padding:14px}
  .account-nav{display:flex;flex-direction:row;overflow-x:auto;gap:8px;padding-bottom:6px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .account-nav::-webkit-scrollbar{display:none}
  .account-nav>*{flex:0 0 auto;white-space:nowrap;border-radius:99px;min-height:40px}
  .account-nav::after{content:"";flex:0 0 6px}
  .my-ad-row{flex-wrap:wrap;gap:10px}
  .my-ad-row img{width:96px;height:72px;object-fit:cover;border-radius:10px}
  .acc-form-group input,.acc-form-group select,.acc-form-group textarea{min-height:46px}
  .account-content button,.acc-card button,.filter-group button,dialog.m4u-dialog button,.auth-card button,form button[type=submit]{min-height:40px}
  dialog.m4u-dialog{width:calc(100vw - 24px);max-width:420px}

  /* ---------- info pages ---------- */
  .cat-item-card,.channel-card,.channel-info,.plan-card{min-width:0;max-width:100%}
  .channel-info a{overflow-wrap:anywhere}
  .channel-info h4,.cat-item-card span,.cat-item-card h4{overflow-wrap:break-word}
  .footer-container a{display:inline-block;padding:5px 0}
}
@media (max-width:700px){
  .m4u-about-hero,.faq-hero,.contact-hero,.membership-hero{padding:26px 16px 30px!important}
  .m4u-about-hero h1,.faq-hero h1,.contact-hero h1,.membership-hero h1{font-size:24px!important;line-height:1.25!important;margin:10px 0!important}
  .m4u-about-hero p,.faq-hero p,.contact-hero p,.membership-hero p{font-size:14px!important;line-height:1.55!important}
  .quick-channels-grid,.contact-split,.form-group-row{grid-template-columns:minmax(0,1fr)!important}
  .channel-card{padding:14px!important}
  body>header>a[href="account.html"]{display:none}
  body>header{display:flex;align-items:center;gap:10px;padding:8px 14px;position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid #e5e9f0}
  body>header img{height:30px;width:auto}
}
@media (max-width:700px){.m4u-about-hero,.contact-hero{padding-bottom:84px!important}}

/* ---------- v217 polish ---------- */
@media (max-width:700px){
  /* featured carousel: small dots, compact card */
  .m4u-feat-dots{gap:6px;margin-top:8px}
  .m4u-feat-dots button{width:8px;height:8px;min-height:0;min-width:0;padding:0}
  .m4u-feat-dots button.on{width:20px}
  .m4u-feat-img{min-height:0;height:170px}
  .m4u-feat-body{padding:12px 14px;gap:7px}
  .m4u-feat-body h3{font-size:16px;margin:0}
  .m4u-feat-meta{font-size:12px;margin:0}
  .m4u-feat-price{font-size:18px}
  .m4u-feat-actions{display:flex;gap:8px;align-items:center}
  .m4u-feat-view-btn{font-size:13px}
  .m4u-feat .btn-card-wa{font-size:12px;padding:6px 10px}
  .m4u-feat-arrow{width:34px;height:34px;min-height:0}

  /* listing card: small Compare chip on the photo corner */
  .vehicle-card .cmp-btn{min-height:0;min-width:0;right:4px;bottom:4px;padding:4px 9px;font-size:10px;box-shadow:0 1px 4px rgba(15,23,42,.35)}

  /* filter sheet: only filters - no tips or ads */
  .sidebar-filters .safety-card,.sidebar-filters #vehDynamicLeftAd{display:none!important}

  /* vehicles hero / search smaller */
  .section-hero,.vehicle-hero,.hero-section{padding:16px 14px}
  .section-hero h1,.vehicle-hero h1,.hero-section h1{font-size:20px;margin:0 0 6px}
  .section-hero p,.vehicle-hero p,.hero-section p{font-size:13px;margin:0 0 10px}

  /* home: compact hero + category cards */
  .portal-hero{padding:26px 14px}
  .portal-hero h1{font-size:22px}
  .portal-hero p{font-size:13px}
  .hero-category-card{padding:10px 8px}
  .category-header h3{font-size:17px;margin-bottom:12px}
  .category-grid{grid-template-columns:1fr 1fr;gap:10px}
  .cat-card{padding:12px;gap:10px}
  .cat-icon{font-size:24px}
  .cat-info h4{font-size:13.5px;margin-bottom:2px}
  .cat-count{font-size:11px}

  /* compact footer */
  .site-footer{margin-top:28px}
  .footer-top{padding:22px 16px}
  .footer-container{grid-template-columns:1fr 1fr;gap:18px 14px}
  .footer-col.footer-brand,.footer-col.brand-col{grid-column:1 / -1}
  .footer-col h4{margin-bottom:10px;font-size:11px}
  .footer-col ul li{margin-bottom:8px}
  .footer-col ul li a{font-size:12.5px;display:inline-block;padding:2px 0}
  .brand-col p,.footer-brand p{font-size:12.5px;line-height:1.55}
  .footer-brand img{height:28px;width:auto}
  .app-buttons{flex-direction:row;flex-wrap:wrap;gap:8px}
  .app-buttons img{height:34px;width:auto}
  .footer-bottom{padding:12px 16px}
  .footer-bottom,.footer-bottom *{font-size:11.5px}
  .footer-container.bottom-row{display:flex;flex-wrap:wrap;gap:6px 14px;justify-content:center;text-align:center}
}

/* ---------- v218 polish ---------- */
@media (max-width:700px){
  /* announcement bar: one small line */
  .top-announcement{padding:6px 10px;font-size:11px;line-height:1.35}

  /* home hero search: input on its own row, select + button under it */
  .search-box{flex-wrap:wrap;padding:8px;gap:6px}
  .search-input-group{flex:1 0 100%}
  .search-district-group{flex:1 1 0;min-width:0}
  .search-district-group select{width:100%;min-height:42px}
  .btn-search-submit{flex:0 0 auto;min-height:42px;padding:0 18px}

  /* coverage section (map + stats) */
  .coverage-section{padding:0 12px}
  .coverage-container{grid-template-columns:1fr;padding:18px 14px;gap:18px;border-radius:16px}
  .coverage-info h2{font-size:19px;line-height:1.3;margin:10px 0}
  .coverage-info p{font-size:13px;line-height:1.55}
  .coverage-badge{font-size:10px;padding:5px 10px}
  .coverage-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}
  .coverage-stats .stat-box{padding:10px 6px}
  .coverage-stats .stat-box strong{font-size:17px}
  .coverage-stats .stat-box span{font-size:10px;line-height:1.3}
  .dist-pill{padding:5px 10px;font-size:11px}
  .coverage-map-card{padding:14px;width:100%;max-width:100%}
  .map-live-header{flex-wrap:wrap;gap:6px;font-size:10px}
  .active-dist-label{font-size:11px;padding:6px 10px}
  .sl-map-wrapper{max-width:260px;margin:0 auto}

  /* Post Ad: compact breadcrumb and stepper */
  .post-breadcrumb{font-size:12px;margin-bottom:8px;white-space:nowrap;overflow-x:auto}
  .stepper-header{gap:8px;margin:14px 0 16px;justify-content:space-around}
  .step-circle{width:30px;height:30px;font-size:13px}
  .step-node{gap:8px}
  .step-label .step-num{font-size:9px}
  .step-label .step-title{font-size:12px}

  /* footer: compact (selectors match footer.css strength) */
  .shared-site-footer .footer-top{padding:22px 16px 18px}
  .shared-site-footer .footer-container{grid-template-columns:1fr 1fr;gap:16px 14px}
  .shared-site-footer .footer-col{padding-left:0;border-left:0}
  .shared-site-footer .footer-brand{grid-column:1 / -1}
  .shared-site-footer .footer-logo{margin-bottom:8px}
  .shared-site-footer .footer-logo img{height:26px;width:auto}
  .shared-site-footer .footer-col h4{font-size:11px;margin-bottom:8px}
  .shared-site-footer .footer-col p,.shared-site-footer .footer-tagline{font-size:12px;line-height:1.5}
  .shared-site-footer li{margin-bottom:0}
  .shared-site-footer .footer-col ul a,.shared-site-footer li a{font-size:12.5px;display:inline-block;padding:4px 0}
  .shared-site-footer .app-buttons{flex-direction:row;gap:8px;margin-top:10px}
  .shared-site-footer .app-buttons img{width:auto;height:34px}
  .shared-site-footer .footer-bottom{padding:14px 16px}
  .shared-site-footer .bottom-row{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
  .shared-site-footer .footer-email{gap:10px;justify-content:center}
  .shared-site-footer .footer-envelope{width:34px;height:34px;border-radius:9px}
  .shared-site-footer .footer-envelope svg{width:16px;height:16px}
  .shared-site-footer .footer-email .bottom-item{border-left:0;padding-left:0;align-items:flex-start}
  .shared-site-footer .sub{margin-bottom:2px;font-size:9px}
  .shared-site-footer .footer-copyright{font-size:10.5px}
  .shared-site-footer .social-box{padding-left:0;border-left:0;justify-self:center;align-items:center}
  .shared-site-footer .social-icons{gap:8px}
  .shared-site-footer .footer-social-link{width:34px;height:34px;border-radius:9px}
  .shared-site-footer .footer-social-link svg{width:15px;height:15px}
}

/* ---------- v218b: checkout and promote dialogs on phones ---------- */
html.m4u-embed .main-header,html.m4u-embed .top-announcement,html.m4u-embed .shared-site-footer{display:none!important}
html.m4u-embed body{padding-bottom:0!important}
@media (max-width:700px){
  body:has(dialog[open]) .m4u-bnav{display:none}
  .membership-payment-dialog{width:calc(100vw - 20px);max-width:560px;max-height:calc(100dvh - 20px);padding:0 14px 14px;overflow:auto;overscroll-behavior:contain}
  .membership-payment-dialog .membership-payment-heading{position:sticky;top:0;z-index:5;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 0 10px;margin:0 0 8px}
  .membership-payment-dialog .membership-payment-heading h2{font-size:18px;margin:0}
  .membership-payment-dialog .membership-payment-heading button{min-height:36px;padding:6px 14px}
  .membership-payment-dialog > p{font-size:13px;margin:8px 0}
  .membership-payment-dialog .membership-payment-methods,.membership-payment-dialog .co-methods{grid-template-columns:minmax(0,1fr);gap:8px}
  .membership-payment-dialog .membership-payment-methods button{min-height:0;padding:12px 14px}
  .membership-payment-dialog iframe{width:100%;height:min(62vh,540px)}
}

/* ---------- v219 polish ---------- */
@media (max-width:700px){
  /* footer logo: small and clear of the tagline */
  .shared-site-footer .footer-logo{width:auto;max-width:150px;padding:6px 10px;margin:0 0 12px}
  .shared-site-footer .footer-logo img{width:100%;height:auto}

  /* listing photos: show the whole picture (no crop) */
  .vehicles-grid>.vehicle-card .card-img-wrapper{background:#eef2f7}
  .vehicles-grid>.vehicle-card .card-img-wrapper img{object-fit:contain}
  .m4u-feat-img img{object-fit:contain}

  /* FAQ: search card must not cover the hero text */
  .faq-hero{padding-bottom:44px!important}
  .faq-container{margin:-20px auto 40px!important}

  /* About: category preview cards two per row */
  .categories-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .cat-item-card{padding:14px 10px}

  /* Banner advertising page: give the content its width back */
  .ads-hero{padding:30px 16px 46px}
  .ads-hero h1{font-size:22px}
  .ads-hero p{font-size:13px}
  .ads-container{margin:-18px auto 40px;padding:0 10px}
  .promo-card{padding:16px 12px}
  .promo-card h2{font-size:19px}
  .banner-carousel-wrapper{padding:14px 12px 48px}
  .tier-header{flex-wrap:wrap;gap:8px}
  .tier-title{font-size:15px;line-height:1.35}
  .specs-grid{grid-template-columns:minmax(0,1fr);gap:10px}
  .carousel-btn{top:auto;bottom:6px;transform:none;width:36px;height:36px;min-height:0}
  .prev-btn{left:calc(50% - 48px)}
  .next-btn{right:calc(50% - 48px)}

  /* login and register popups: keep the bottom menu out of the way */
  body:has(.modal-backdrop:not(.hidden)) .m4u-bnav{display:none}
}

/* v220: category cards two per row (home + Post Ad) */
@media (max-width:700px){
  .cat-boxes-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .post-cat-item{padding:16px 10px!important;gap:8px!important}
  .post-cat-item .icon{font-size:28px}
  .post-cat-item h4{font-size:12px;overflow-wrap:break-word}
  .cat-status-badge{font-size:10px}
}

/* v221: compact chat bubbles + tidy search controls on phones */
@media (max-width:700px){
  #messages{gap:8px;padding:10px}
  .message{padding:8px 11px;font-size:13.5px;max-width:80%}
  .message small{margin-top:3px;font-size:10px}
  #composer textarea{padding:9px 11px;margin:6px 0;min-height:44px}
  #send{padding:8px 20px;min-height:40px}
  #tools button{min-height:34px}
  .search-box .search-input-group input{min-height:40px}
  .search-district-group select{min-height:40px;font-size:15px}
  .btn-search-submit{min-height:40px;padding:0 16px;font-size:14px;border-radius:10px}
}

/* ---------- v222: tap targets + touch hover cleanup ---------- */
@media (max-width:700px){
  /* checkboxes and small controls easier to tap */
  input[type=checkbox],input[type=radio]{width:18px;height:18px;accent-color:#2563eb}
  .edit-thumb .remove-img-btn,.image-slot .remove-img-btn{width:32px!important;height:32px!important;font-size:15px}
  .edit-thumb button,.image-slot button{min-width:32px;min-height:32px}
  .vehicle-card .cmp-btn{padding:6px 10px}
  .shared-site-footer li a{padding:6px 0}
  .dist-pill{padding:7px 12px}
  /* compare table: labels never cut mid-word */
  .cmp-grid{grid-template-columns:92px minmax(0,1fr) minmax(0,1fr)!important}
  .cmp-grid>*{overflow-wrap:break-word;min-width:0}
}
/* touch screens: no sticky hover effects after a tap (desktop keeps its hovers) */
@media (hover:none){
  a,button,[role=button]{-webkit-tap-highlight-color:rgb(37 99 235 / 10%)}
  .vehicle-card:hover,.cat-card:hover,.cat-card.active-cat:hover,.post-cat-item:hover,.hero-category-card:hover,
  .cat-item-card:hover,.channel-card:hover,.plan-card:hover,.pillar-card:hover{transform:none!important;box-shadow:none!important}
  #threads button:hover{border-color:transparent}
  .shared-site-footer a:hover{color:inherit;text-decoration:none}
  .footer-col ul li a:hover{color:#cbd5e1;text-decoration:none}
}

/* ---------- v223: ad page fixes ---------- */
@media (max-width:700px){
  /* top bar: logo left, language middle, Back right */
  .full-page-navbar{flex-wrap:nowrap}
  .full-page-navbar>*{order:2!important;margin:0!important}
  .full-page-navbar>a.brand-logo{order:1!important;margin:0 auto 0 0!important}
  #closeDetailModalBtn{order:3!important;margin-left:10px!important;white-space:nowrap}
  .full-page-navbar select.lang-dropdown{min-height:34px}
  /* breadcrumb: compact one line */
  .full-page-content .breadcrumb{display:block!important;font-size:12px;margin:6px 14px 0;white-space:nowrap;overflow-x:auto;scrollbar-width:none}
  /* header: title then meta; Save/Share move into the seller panel (see js) */
  .seller-panel .action-icons{margin:12px 0 2px}
  .seller-panel .action-icons button{border:1px solid #d6dde8!important;background:#fff!important;border-radius:12px!important;min-height:46px!important;font-weight:800;font-size:14px!important}
  /* seller panel buttons: one clean style */
  .seller-panel button,.seller-panel .btn-contact-large{border-radius:12px!important;min-height:46px!important;font-size:14.5px!important;font-weight:800!important}
  #offerBtn{box-shadow:none!important}
  .report-ad-btn{border-style:solid!important;min-height:42px!important;font-weight:700!important}
  .safety-panel{border-radius:14px;margin-top:14px}
  .safety-panel h4{font-size:14px}
  .safety-panel li{font-size:12.5px;line-height:1.5}
}

/* ---------- v224: similar ads tiles, promo below them, panel button pair ---------- */
@media (max-width:700px){
  #modalSimilarAdsContainer>div{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  #modalSimilarAdsContainer .vehicle-card>div:first-child{height:96px!important}
  #modalSimilarAdsContainer .vehicle-card>div:last-child{padding:9px 10px!important}
  #modalSimilarAdsContainer h3{font-size:16px!important;margin-bottom:10px!important}
  #modalSidebarAdSlot{margin:16px 0 0!important}
  .seller-panel .action-icons button{white-space:nowrap;font-size:13.5px;padding:0 8px}
}

/* ---------- v225 ---------- */
/* chat page header (the plain <header>): logo left, language and account right - all screen sizes */
header:not([class]){display:flex;align-items:center;gap:12px;padding:10px 16px;background:#fff;border-bottom:1px solid #e5e9f0}
header:not([class])>*{order:2}
header:not([class])>a:first-of-type{order:1;margin-right:auto;display:flex;align-items:center}
header:not([class]) img{width:auto;height:32px}
header:not([class])>a[href="account.html"]{order:3;padding:9px 16px;border:1px solid #cbd5e1;border-radius:10px;background:#f8fafc;font-weight:700;color:#0f172a;text-decoration:none;white-space:nowrap}
header:not([class]) select.lang-dropdown{min-height:36px}
@media (max-width:700px){
  /* the seller column must scroll with the page, never stick over the similar ads */
  #detailModal .detail-right{position:static!important;top:auto!important}
  /* order stays: seller box, similar ads, then the partner ad */
  #modalSimilarAdsContainer{margin-top:18px!important;padding-top:14px!important}
}

/* ---------- v226: spacing + header alignment (phones) ---------- */
@media (max-width:700px){
  /* every header: logo hard left, language hard right */
  .main-header .header-container{justify-content:space-between}
  .main-header .brand-logo,.shared-page-header .brand-logo{margin:0 auto 0 0!important}
  .shared-page-header{justify-content:space-between}

  /* breadcrumb sits close to the content below it - all pages */
  #breadcrumb,.page-breadcrumb{margin:6px 14px 2px}
  .account-layout{padding-top:4px}
  .main-layout{padding-top:8px}

  /* empty search result: breathing room between the two buttons */
  #emptyNotifyBtn{display:block!important;margin:0 auto 10px!important}
  #emptyNotifyBtn[style*="display: none"],#emptyNotifyBtn[style*="display:none"]{display:none!important}

  /* ad page: divider between the description and the seller box */
  #detailModal .detail-left>.detail-right{margin-top:6px;padding-top:18px;border-top:1.5px solid #e2e8f0}
  #modalSimilarAdsContainer{margin-bottom:0!important}
  #modalSidebarAdSlot{margin:16px 0 0!important}
}
@media (max-width:700px){
  /* pages with their own breadcrumb row keep only that one */
  body:has(.post-breadcrumb) .page-breadcrumb{display:none!important}
}
/* ---------- v227: header corners, everywhere, final ---------- */
@media (max-width:700px){
  .main-header .header-container,.shared-page-header{display:flex;justify-content:flex-start!important;align-items:center;gap:10px;width:100%!important;max-width:100%!important;margin:0!important}
  .main-header .m4u-back-btn,.main-header .btn-back-home{order:99!important;margin-left:auto!important}
  .main-header .lang-switcher~.m4u-back-btn,.main-header select.lang-dropdown~.m4u-back-btn{margin-left:0!important}
  .main-header select.lang-dropdown{order:98!important;margin-left:auto!important}
  .main-header .brand-logo,.shared-page-header .brand-logo{order:-1!important;margin:0!important;flex:0 0 auto!important}
  .main-header .brand-logo img,.shared-page-header .brand-logo img,header:not([class]) img{height:28px!important;width:auto!important;max-width:none!important;object-fit:contain}
  .main-header .lang-switcher,.shared-page-header .lang-switcher{order:98!important;margin:0 0 0 auto!important;flex:0 0 auto!important;border:0!important;padding:0!important;min-height:0!important}
  .shared-page-header .btn-back-home,.shared-page-header a[href="index.html"]:not(.brand-logo){order:99;flex:0 0 auto;white-space:nowrap}
  .shared-page-header .lang-switcher:has(~ .btn-back-home){margin-left:auto!important}
}
@media (max-width:700px){
  header:not([class]){flex-wrap:wrap}
}
@media (max-width:400px){
  .main-header .brand-logo img,.shared-page-header .brand-logo img{height:22px!important}
  .main-header .m4u-back-btn,.main-header .btn-back-home{padding:6px 10px!important;font-size:12px!important;min-height:34px}
  .main-header .lang-dropdown,.shared-page-header .lang-dropdown{font-size:11px;padding:5px 20px 5px 8px;min-height:32px}
  .main-header .header-container,.shared-page-header{gap:6px}
}
/* ---------- v228: one identical header on every page (phones) ---------- */
@media (max-width:700px){
  .main-header{padding:0!important}
  .main-header .header-container,.shared-page-header,header:not([class]){display:flex;align-items:center;gap:12px;padding:10px 16px!important;min-height:56px;background:#fff}
  .main-header .brand-logo img,.shared-page-header .brand-logo img,header:not([class]) img{height:32px!important;width:auto!important;max-width:none!important}
  .main-header .lang-dropdown,.shared-page-header .lang-dropdown,header:not([class]) .lang-dropdown,header:not([class]) select{font-size:13px!important;min-height:38px!important;padding:8px 26px 8px 12px!important;border:1px solid #cbd5e1;border-radius:8px;background-color:#fff}
  .main-header .m4u-back-btn,.main-header .btn-back-home{min-height:38px;font-size:13px!important;padding:8px 12px!important}
}
@media (max-width:374px){
  .main-header .brand-logo img,.shared-page-header .brand-logo img,header:not([class]) img{height:26px!important}
  .main-header .header-container,.shared-page-header,header:not([class]){gap:8px;padding:10px 12px!important}
}
@media (max-width:700px){
  /* fit logo + language + Back on one row */
  .main-header .m4u-back-btn,.main-header .btn-back-home,.shared-page-header .m4u-back-btn{font-size:12px!important;padding:8px 9px!important;min-height:36px;flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .main-header .header-container{gap:8px}
  header:not([class])>*{min-width:0}
  header:not([class]) a:not(:first-of-type){font-size:13px;white-space:nowrap}
}
/* v229: the chat page language button looks exactly like the other pages */
header:not([class]) select{appearance:none;-webkit-appearance:none;background-color:#f8fafc!important;border:1px solid #e2e8f0!important;border-radius:8px!important;font-size:13px!important;font-weight:700;color:#334155;cursor:pointer;outline:none;font-family:inherit;background-image:url('data:image/svg+xml;utf8,<svg fill="none" stroke="%2364748b" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 9l6 6 6-6"></path></svg>');background-repeat:no-repeat;background-position:right 10px center;background-size:14px;padding:8px 30px 8px 12px!important;min-height:38px}
/* ---------- v230: account menu without swiping + equal plan boxes ---------- */
@media (max-width:700px){
  /* My Account menu: 8 equal chips, two columns of four */
  .account-nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overflow:visible;padding-bottom:2px}
  .account-nav::after{display:none}
  .account-nav>*{width:100%;min-width:0;display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;border-radius:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px;padding:0 8px}

  /* plan card: the stat boxes stacked, one under the other, full width */
  .plan-summary-stats{display:grid!important;grid-template-columns:minmax(0,1fr);gap:8px}
  .plan-summary-stats div{min-width:0;width:100%;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left}
  .plan-summary-stats b{font-size:16px;line-height:1.2;order:2;white-space:nowrap}
  .plan-summary-stats span{font-size:12.5px;line-height:1.3;order:1;opacity:.95}
}

/* ---------- v232: My Account menu as a list of rows; the page opens under the whole list ---------- */
@media (max-width:700px){
  html.m4u-acclist .account-nav{display:block!important;background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:0;overflow:hidden}
  html.m4u-acclist .account-nav>.acc-tab-btn{display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:52px;border-radius:0;border:0;border-bottom:1px solid #eef2f7;padding:0 14px;font-size:14.5px;text-align:left;background:#fff;color:#334155;white-space:nowrap;overflow:hidden}
  html.m4u-acclist .account-nav>.acc-tab-btn:last-child{border-bottom:0}
  html.m4u-acclist .account-nav>.acc-tab-btn::after{content:"";margin-left:auto;width:8px;height:8px;border-right:2px solid #94a3b8;border-top:2px solid #94a3b8;transform:rotate(45deg);flex:0 0 auto}
  html.m4u-acclist .account-nav>.acc-tab-btn.active{background:#eff6ff;color:#2563eb;font-weight:800}
  html.m4u-acclist .account-nav>.acc-tab-btn.active::after{border-color:#2563eb}
  html.m4u-acclist .account-content{padding:0;background:transparent;border:0}
  html.m4u-acclist .account-tab-content{padding:16px 14px}
  html.m4u-acclist .account-tab-content h2{font-size:18px;margin-bottom:14px;padding-bottom:10px}
}

/* ---------- v233: ad page header = same header as every other page ---------- */
.full-page-navbar{padding:12px max(20px,calc((100% - 1300px)/2))!important;min-height:0}
.full-page-navbar .brand-logo img{height:42px!important;width:auto}
.full-page-navbar .detail-nav-actions{display:flex;align-items:center;gap:12px;margin-left:auto}
.full-page-navbar #closeDetailModalBtn.m4u-back-btn{padding:9px 16px!important;border:1.5px solid #2563eb!important;border-radius:999px!important;background:#fff!important;color:#2563eb!important;font-size:13px!important;font-weight:700!important;width:auto!important;height:auto!important;cursor:pointer}
.full-page-navbar #closeDetailModalBtn.m4u-back-btn:hover{background:#2563eb!important;color:#fff!important}
@media (max-width:700px){
  .full-page-navbar{display:flex!important;align-items:center;gap:12px!important;padding:10px 16px!important;min-height:56px}
  .full-page-navbar>a.brand-logo{order:1!important;margin:0!important}
  .full-page-navbar .detail-nav-actions{order:2!important;margin-left:auto!important;gap:8px;min-width:0}
  .full-page-navbar .brand-logo img{height:32px!important}
  .full-page-navbar select.lang-dropdown{font-size:13px!important;min-height:38px!important;padding:8px 26px 8px 12px!important}
  .full-page-navbar #closeDetailModalBtn.m4u-back-btn{order:3!important;margin:0!important;min-height:38px;font-size:12px!important;padding:8px 10px!important}
}
@media (max-width:374px){.full-page-navbar{gap:8px!important;padding:10px 12px!important}.full-page-navbar .brand-logo img{height:26px!important}}
/* v233: fit logo + language + Back on one row on 360 to 430px phones, on every page */
@media (max-width:430px){
  .main-header .header-container,.shared-page-header,header:not([class]),.full-page-navbar{gap:8px!important;padding:10px 12px!important}
  .main-header .brand-logo img,.shared-page-header .brand-logo img,header:not([class]) img,.full-page-navbar .brand-logo img{height:28px!important}
  .main-header .lang-dropdown,.full-page-navbar select.lang-dropdown{font-size:12.5px!important;padding:8px 24px 8px 10px!important;background-position:right 8px center!important}
  .main-header .m4u-back-btn,.full-page-navbar #closeDetailModalBtn.m4u-back-btn{font-size:12px!important;padding:8px 10px!important;gap:4px;overflow:visible;text-overflow:clip}
}
@media (max-width:374px){
  .main-header .brand-logo img,.shared-page-header .brand-logo img,header:not([class]) img,.full-page-navbar .brand-logo img{height:26px!important}
}
.full-page-navbar{flex:0 0 auto!important;box-sizing:border-box;width:100%}

/* ---------- v243: phone home banner - two rows of category chips sliding sideways, no gap when they loop ---------- */
.hero-chips{display:none}
@media (max-width:700px){
  .hero-category-motion{display:none!important}
  .portal-hero{padding:58px 14px!important}
  .hero-chips{display:block;position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:1}
  .hero-chip-row{position:absolute;left:0;width:100%;overflow:hidden}
  .hero-chip-top{top:14px}.hero-chip-bottom{bottom:14px}
  .hero-chip-track{display:flex;width:max-content;animation:m4uChipsL 48s linear infinite;will-change:transform}
  .hero-chip-bottom .hero-chip-track{animation-name:m4uChipsR;animation-duration:56s}
  .hero-chip-set{display:flex;flex:0 0 auto}
  .hero-chip-set span{flex:0 0 auto;margin-right:8px;padding:5px 13px;border-radius:999px;background:rgba(255,255,255,.14);color:rgba(255,255,255,.72);font-size:12px;font-weight:600;white-space:nowrap}
}
@keyframes m4uChipsL{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@keyframes m4uChipsR{from{transform:translateX(-50%)}to{transform:translateX(0)}}
@media (prefers-reduced-motion:reduce){.hero-chip-track{animation:none!important}}

/* v245: phone home banner - no dark box behind the greeting and search bar */
@media (max-width:800px){
  .portal-hero .portal-search-box{background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border:0!important;padding:0!important;border-radius:0!important}
}

/* v274: Browse chooser above the bottom menu (Vehicles / Electronics). */
.m4u-browse-menu{display:none}
@media (max-width:700px){
  .m4u-browse-menu{display:flex;flex-direction:column;position:fixed;left:12px;right:auto;bottom:calc(70px + env(safe-area-inset-bottom));z-index:901;background:#fff;border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 10px 30px rgba(15,23,42,.18);padding:6px;min-width:190px}
  .m4u-browse-menu[hidden]{display:none}
  .m4u-browse-menu a{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:10px;font-size:14px;font-weight:700;color:#334155;text-decoration:none}
  .m4u-browse-menu a:active,.m4u-browse-menu a:hover{background:#f1f5f9}
  .m4u-browse-menu a.on{color:#2563eb;background:#eff6ff}
  .m4u-browse-menu svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
}

/* v476: small phones (320-380px): headers wrap instead of overflowing, forms use one column */
@media(max-width:400px){
  .main-header .header-container,.shared-page-header,.header-container{flex-wrap:wrap!important;row-gap:6px}
  .header-actions{display:flex!important;flex-wrap:wrap;gap:6px;min-width:0;max-width:100%}
  .m4u-back-btn{flex:0 1 auto;min-width:0;max-width:100%}
  .m4u-back-btn span{white-space:normal}
  .field-row{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:14px}
  .field-group,.field-group input,.field-group select,.m4-phone{min-width:0;max-width:100%;box-sizing:border-box}
}
/* tap targets: chips and small buttons are at least 40px tall on phones */
@media(max-width:760px){
  .faq-pill,.mt-chip,.pg-range button,.chips button,.page-filter-btn{min-height:40px}
}

/* v492: bigger tap targets on phones */
@media (max-width:900px){
  .dist-pill{min-height:40px;display:inline-flex;align-items:center}
  .shared-site-footer a, .shared-site-footer .footer-col a{display:inline-block;padding:9px 0;min-height:40px;box-sizing:border-box}
  .main-header .brand-logo{padding:6px 0;box-sizing:content-box}
  .page-breadcrumb a{display:inline-block;padding:10px 4px}
}
