
/* H5 layout: touch-first controls, safe areas and compact mobile navigation. */
*,*::before,*::after{ -webkit-tap-highlight-color:transparent }
html{scroll-padding-top:86px;scroll-behavior:smooth}
button,select,input,textarea{font:inherit}
button{touch-action:manipulation}
.mobile-tabbar{display:none}
@media(max-width:760px){
 body{overflow-x:hidden;padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
 main{width:100%;overflow:hidden}
 .topline{display:none}.header.wrap{width:100%;margin:0}
 header{position:sticky;top:0;z-index:30;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:7px;padding:8px 12px;padding-top:calc(8px + env(safe-area-inset-top,0px));background:rgba(255,255,255,.97);backdrop-filter:blur(12px);box-shadow:0 1px 10px #14201910}
 .brand{min-width:0;gap:7px}.brand-name{font-size:16px;letter-spacing:2px}.brand small{font-size:7px;letter-spacing:1px}
 .header-right{grid-column:2;grid-row:1;justify-self:end;display:flex;align-items:center;justify-content:flex-end;gap:4px;width:auto;min-width:0}
 .header-right>*{flex:0 0 auto}
 #languageSelect{width:73px;max-width:21vw;min-height:38px;padding:0 4px;font-size:11px;border-radius:8px}
 .location,.icon-btn,.account-btn,.sell-btn{min-width:38px;min-height:40px;padding:0 7px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center}
 .location span{display:none}.location{font-size:20px}
 #savedBtn{font-size:0;width:38px}#savedBtn::before{content:'♡';font-size:21px}
 .account-btn{font-size:0;width:38px}.account-btn::before{content:'♙';font-size:19px}
 .sell-btn{font-size:0;width:38px}.sell-btn::before{content:'＋';font-size:19px}
 header nav,.desktop-nav{display:none!important}
 .hero{min-height:390px;min-height:min(70svh,560px);padding:24px 18px;border-radius:0 0 18px 18px;background-position:center}
 .hero h1{font-size:clamp(34px,10vw,54px);line-height:1.02;max-width:11ch}
 .hero p{font-size:14px;line-height:1.65;max-width:34ch}
 .hero-actions{display:flex;flex-wrap:wrap;gap:9px}.hero-actions a,.hero-actions button{min-height:46px}
 .promo{margin:12px 12px 16px;padding:15px;display:flex;align-items:flex-start;gap:8px;flex-direction:column;border-radius:14px}
 .promo button,.promo a{min-height:42px}
 .categories{position:sticky;top:60px;z-index:15;display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;padding:10px 12px;margin:0;background:#faf9f6f2;scrollbar-width:none;white-space:nowrap}
 .categories::-webkit-scrollbar{display:none}.categories .category{flex:0 0 auto;min-height:40px;padding:0 14px;border-radius:999px}
 section,#shop,.trust,.guide{scroll-margin-top:112px}
 #shop{padding:22px 12px 28px}
 .section-top{display:flex;flex-direction:column;align-items:stretch;gap:14px}.section-top h2{font-size:25px}.section-top p{font-size:12px;line-height:1.6}
 .controls{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.search{width:100%;min-width:0;min-height:46px;font-size:16px!important}.sort{min-height:46px;max-width:45vw;font-size:13px}
 .notice{font-size:10px;line-height:1.6;margin:12px 0}
 .car-filters{padding:13px;border-radius:14px}.filter-head{gap:8px}.filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.filter-grid label{font-size:11px}.filter-grid select{width:100%;min-height:44px;font-size:14px}
 .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .card{min-width:0;border-radius:13px;overflow:hidden}.card-photo{height:clamp(148px,45vw,230px)}.card-photo img{object-fit:cover}.card-info{padding:10px 10px 11px}.brand-label{font-size:9px;letter-spacing:.08em}.card-title{font-size:13px;line-height:1.35;min-height:2.7em}.card-meta{font-size:10px;line-height:1.45;min-height:2.8em}.card-bottom{gap:4px;align-items:center;flex-wrap:wrap}.card-price{font-size:16px}.deal-tag{font-size:9px}.condition{font-size:8px;max-width:calc(100% - 44px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.save{width:40px;height:40px;top:6px;right:6px}
 .trust,.guide{padding:28px 14px}.trust-grid,.guide-grid{grid-template-columns:1fr;gap:12px}
 footer{padding:24px 14px 16px}.footer-grid{grid-template-columns:1fr 1fr;gap:18px}
 .mobile-tabbar{position:fixed;z-index:45;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));padding:6px 5px calc(6px + env(safe-area-inset-bottom,0px));min-height:64px;background:rgba(255,255,255,.97);border-top:1px solid #e9e7e1;box-shadow:0 -5px 18px #17231e0d;backdrop-filter:blur(16px)}
 .mobile-tabbar button{border:0;background:transparent;color:#7a7d77;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;min-height:48px;padding:2px;border-radius:10px;cursor:pointer}
 .mobile-tabbar button b{font-size:21px;line-height:1;font-weight:500}.mobile-tabbar button small{font-size:9px;line-height:1.25;white-space:nowrap}.mobile-tabbar button.active{color:#234c3a}.mobile-tabbar button.active b{font-weight:700}
 body:has(.overlay.show) .mobile-tabbar,body:has(.auth-overlay.show) .mobile-tabbar,body:has(.seller-onboard-overlay.show) .mobile-tabbar{display:none}
 .ai-launcher{bottom:calc(78px + env(safe-area-inset-bottom,0px))!important;right:12px!important}.ai-chat{bottom:calc(136px + env(safe-area-inset-bottom,0px))!important;right:10px!important;width:min(360px,calc(100vw - 20px))!important;max-height:70svh!important}
 .overlay{padding:0!important;align-items:stretch!important}.overlay .dialog,.overlay .modal,.detail-dialog{width:100%!important;max-width:none!important;height:100dvh;max-height:100dvh!important;margin:0!important;border-radius:0!important;overflow:auto!important;padding:14px!important;padding-bottom:calc(22px + env(safe-area-inset-bottom,0px))!important}
 .detail-layout{grid-template-columns:minmax(0,1fr)!important;gap:15px!important}.vehicle-gallery{height:auto!important;grid-template-columns:minmax(0,1fr)!important}.vehicle-main{height:48svh!important;min-height:250px}.vehicle-tiles{height:112px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:1fr!important}.product-detail-gallery{height:auto!important;grid-template-columns:minmax(0,1fr)!important}.product-detail-photo{height:48svh!important;min-height:250px}.product-detail-aside{min-height:230px!important}.product-detail-layout>img{max-height:48svh;object-fit:contain}
 .detail h2{font-size:25px!important;line-height:1.18}.detail-left,.seller,.price-card{min-width:0}.seller{position:static!important}.seller form input,.seller form textarea,.seller form select{font-size:16px!important;min-height:44px}.seller form button{min-height:48px}
 .spec-grid,.vehicle-spec-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.close,.close-btn{position:sticky!important;top:0!important;z-index:5;margin-left:auto}
 .welcome-screen{min-height:100svh;padding-left:18px;padding-right:18px}
}
@media(max-width:380px){header{padding-left:8px;padding-right:8px;gap:4px}.brand-name{font-size:14px}.header-right{gap:2px}#languageSelect{width:64px}.location,.icon-btn,.account-btn,.sell-btn{min-width:34px;width:34px}.grid{gap:8px}.card-photo{height:43vw}.card-info{padding:8px}.card-title{font-size:12px}}
@media(max-width:760px){
 .auth-overlay,.seller-onboard-overlay{position:fixed;inset:0;z-index:60;align-items:flex-end;padding:0!important}
 .auth-panel,.seller-onboard-panel{width:100%;max-width:none;max-height:94dvh;overflow:auto;border-radius:18px 18px 0 0;padding:24px 18px calc(22px + env(safe-area-inset-bottom,0px))}
 .auth-form{grid-template-columns:minmax(0,1fr)!important}.auth-form label,.auth-form label:nth-child(n){grid-column:1/-1}
 .dialog{width:100%;max-width:none;max-height:100dvh;overflow:auto;border-radius:0;padding:14px 12px calc(20px + env(safe-area-inset-bottom,0px))}
 .detail-layout{grid-template-columns:minmax(0,1fr)!important}.seller{position:static;min-width:0}.seller-form{grid-template-columns:repeat(2,minmax(0,1fr))}.seller-form input,.seller-form textarea{min-width:0;font-size:16px!important;min-height:44px}.seller-form textarea,.seller-form button{grid-column:1/-1}.seller-form button{min-height:48px}
 .price-summary{grid-template-columns:minmax(0,1fr)!important;gap:10px}.line-items{border-left:0!important;border-top:1px solid var(--line);padding:10px 0 0!important}
}
@media(min-width:761px){.mobile-tabbar{display:none!important}}
