/* V6.4 — Mobile Experience. Desktop intentionally untouched. */
/* V6.4.3 — dynamic mobile overlays must never leak into tablet/desktop layout. */
.mobile-publish-sheet-v64,.mobile-publish-backdrop-v64{display:none!important}

@media(max-width:760px){
 :root{--mobile-nav-h:74px}
 body{background:#f4f0e7}
 .topbar{height:68px;min-height:68px;padding:0 16px;border-bottom:1px solid rgba(183,146,55,.55);position:sticky;top:0;z-index:75}
 .logo-mark{width:38px;height:38px;border-radius:11px}.logo-name{font-size:19px}.logo small{display:none}
 .top-actions .icon-btn{border-radius:12px}.top-actions .icon-btn:first-child{display:none}
 main{padding:18px 14px calc(var(--mobile-nav-h) + 24px + env(safe-area-inset-bottom));background:radial-gradient(circle at 100% 0,rgba(184,151,72,.07),transparent 36%),#f7f3eb}
 .page-head{margin-bottom:16px}.page-head .eyebrow{font-size:9px;letter-spacing:.18em}.page-head h1{font-size:30px;line-height:1.05;margin:5px 0}.page-head p{font-size:13px;line-height:1.45}
 /* Dashboard */
 #dashboard .dashboard-head h1{font-size:32px}.mobile-home-v56{gap:12px;margin-top:14px}
 .mobile-home-section{padding:14px;border-radius:20px;background:rgba(255,255,255,.9);box-shadow:0 10px 30px rgba(18,52,43,.06)}
 .mobile-home-title h2{font-size:19px}.mobile-home-title small{font-size:10px}
 .mobile-quick-grid{gap:8px}.mobile-quick-grid button{min-height:76px;border-radius:16px;border-color:#e8e0d2;box-shadow:0 2px 8px rgba(20,48,39,.025);font-size:13px}.mobile-quick-grid .mq-icon{width:32px;height:32px;border-radius:11px;background:#edf4f0;color:#0f5143}
 .mobile-today-item,.mobile-todo-item{border-radius:14px;padding:11px;background:#f8f6f0}.mobile-today-item:active,.mobile-todo-item:active,.mobile-quick-grid button:active{transform:scale(.985)}
 .mobile-activity-kpi{border-radius:14px;background:#f8f6f0;padding:13px}.mobile-activity-kpi strong{font-size:24px}
 /* Market cards: touch-first */
 .listing-grid,#sellRows,#exportGrid,.stock-visual-grid{grid-template-columns:1fr!important;gap:12px!important}
 .export-card,.market-card,.vehicle{border-radius:18px!important;overflow:hidden;box-shadow:0 7px 22px rgba(18,52,43,.07)!important}
 .export-card-photo,.market-card .export-card-photo{aspect-ratio:16/9;height:auto!important}.export-card-body{padding:13px!important}.export-card-body h3{font-size:17px!important}.export-card-price{font-size:20px!important}
 /* Filters become a compact expandable sheet */
 .catalog-filters.v54-filters{display:none!important}.catalog-filters.v54-filters.mobile-filter-open{display:grid!important;position:fixed;z-index:96;left:10px;right:10px;bottom:calc(var(--mobile-nav-h) + 6px);max-height:72dvh;overflow:auto;background:#fff;border:1px solid #e5ddce;border-radius:22px;padding:18px;box-shadow:0 20px 60px rgba(7,31,25,.25)}
 .mobile-filter-trigger-v64{display:flex!important;align-items:center;justify-content:center;gap:7px;border:1px solid #dcd3c2;background:#fff;color:#153f35;border-radius:12px;padding:10px 13px;font-weight:800;font-size:12px}
 .catalog-summary{gap:8px!important;align-items:center!important}.catalog-summary-actions{gap:6px!important}.catalog-summary-actions .v54-sort{max-width:145px}
 /* Messaging behaves like a native mobile inbox/chat. */
 #messages{padding-bottom:0}#messages>.page-head{margin-bottom:10px}
 #messages .messages{height:calc(100dvh - 178px)!important;min-height:480px!important;border-radius:18px!important;overflow:hidden!important;display:block!important;position:relative!important;padding:0!important}
 #messages .thread-list{width:100%!important;height:100%!important;max-height:none!important;overflow-y:auto!important;border-right:0!important;background:#fff}
 #messages .chat{display:none!important;position:absolute!important;inset:0!important;background:#f7f3eb!important;grid-template-rows:auto minmax(0,1fr) auto!important;min-height:0!important}
 #messages.mobile-chat-open .thread-list{display:none!important}#messages.mobile-chat-open .chat{display:grid!important}
 #messages .chat-head{padding:11px 12px!important;min-height:60px;background:#fff;position:relative}
 #messages .chat-head:before{content:'‹';font:600 31px/1 Arial;color:#173f36;width:28px;cursor:pointer;display:grid;place-items:center}
 #messages .chat-head .avatar{width:36px;height:36px}.chat-head b{font-size:13px}.chat-head small{font-size:10px}
 #messages .chat-head .secondary{font-size:0!important;padding:8px!important;border-radius:10px}#messages .chat-head .secondary:after{content:'Profil';font-size:10px}
 #messages .chat-body{min-height:0!important;height:auto!important;overflow-y:auto!important;padding:13px 11px 18px!important;overscroll-behavior:contain}
 #messages .bubble{max-width:88%!important;border-radius:15px!important;padding:10px 12px!important;margin-bottom:7px!important}
 #messages .composer{position:sticky!important;bottom:0;padding:9px 10px calc(9px + env(safe-area-inset-bottom))!important;background:#fff!important;border-top:1px solid #e6dfd3;gap:7px!important;z-index:3}
 #messages .composer input{height:44px;border-radius:14px!important;font-size:16px!important}#messages .composer .primary{height:44px;border-radius:13px!important;padding:0 14px!important}
 /* Network/profile */
 .network-v495-head{display:block!important}.network-head-actions{margin-top:10px;display:grid!important;grid-template-columns:1fr 1fr;gap:7px}.network-head-actions label{grid-column:1/-1}.network-v495-layout{display:block!important}.network-v495-layout>aside{display:none!important}.network-v495-tabs{display:flex!important;overflow-x:auto;scrollbar-width:none;gap:6px;padding-bottom:4px}.network-v495-tabs button{white-space:nowrap;flex:none}.network-searchbar{display:grid!important;grid-template-columns:1fr auto;gap:6px}
 .professional-layout,.professional-profile-layout{grid-template-columns:1fr!important}.professional-actions{position:static!important}
 /* Modals/forms */
 .modal{padding:8px!important;align-items:flex-end!important}.modal-card{width:100%!important;max-height:92dvh!important;border-radius:22px 22px 12px 12px!important;padding:18px!important;overflow:auto!important}.modal-card input,.modal-card select,.modal-card textarea{min-height:44px;font-size:16px}.modal-card .two{grid-template-columns:1fr!important}
 /* Bottom nav */
 .mobile-nav{grid-template-columns:repeat(5,1fr);padding:5px 5px calc(6px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96);backdrop-filter:blur(14px)}
 .mobile-nav button{border-radius:12px;font-size:9px;min-height:55px}.mobile-nav button.active{background:#f4f0e6}.mobile-nav button.active:before{display:none}
 .mobile-nav .mobile-publish-v64{transform:translateY(-8px);overflow:visible;color:#fff;background:#123f35;border-radius:17px;box-shadow:0 8px 20px rgba(18,63,53,.22)}.mobile-nav .mobile-publish-v64 .ca-icon{width:25px;height:25px}.mobile-nav .mobile-publish-v64 span{color:#fff}.mobile-nav .mobile-publish-v64.active{background:#123f35}
 .mobile-publish-sheet-v64{display:none}.mobile-publish-sheet-v64.open{display:grid!important;position:fixed;z-index:98;left:12px;right:12px;bottom:calc(var(--mobile-nav-h) + 8px);background:#fff;border-radius:22px;padding:10px;box-shadow:0 22px 60px rgba(7,31,25,.28);border:1px solid #e7dfd1;gap:6px}.mobile-publish-sheet-v64 button{border:0;background:#f7f4ed;border-radius:14px;padding:14px;text-align:left;color:#153f35;font-weight:800}.mobile-publish-sheet-v64 button small{display:block;color:#777168;font-weight:500;margin-top:3px}
 .mobile-publish-backdrop-v64{display:none}.mobile-publish-backdrop-v64.open{display:block!important;position:fixed;inset:0;z-index:97;background:rgba(8,29,23,.38)}
 .mobile-drawer{border-radius:24px 24px 0 0;padding:20px 16px calc(22px + env(safe-area-inset-bottom))}.mobile-drawer-links{grid-template-columns:1fr 1fr;gap:9px}.mobile-drawer-links button{border-radius:14px;padding:14px 11px}
}
@media(max-width:380px){.mobile-home-section{padding:12px}.mobile-nav button{font-size:8.5px}.catalog-summary-actions .v54-sort{max-width:125px}}

/* V6.4.2 — Adaptive Mobile UI: fluid from compact phones through tablets. */
@media (max-width:1023px){
 :root{--mobile-gutter:clamp(10px,3.6vw,24px);--mobile-gap:clamp(10px,2.8vw,18px);--mobile-radius:clamp(16px,4vw,22px)}
 body{min-width:0;overflow-x:hidden}
 .topbar{padding-inline:var(--mobile-gutter);height:clamp(62px,9vw,72px);min-height:clamp(62px,9vw,72px)}
 main{width:100%;max-width:none;padding-inline:var(--mobile-gutter);padding-top:clamp(14px,3vw,24px);padding-bottom:calc(var(--mobile-nav-h,74px) + 24px + env(safe-area-inset-bottom));min-height:calc(100dvh - clamp(62px,9vw,72px))}
 .page-head{margin-bottom:clamp(12px,3vw,20px)}
 .page-head h1,#dashboard .dashboard-head h1{font-size:clamp(27px,7.6vw,38px);line-height:1.02}
 .page-head p{font-size:clamp(12px,3.3vw,15px);max-width:62ch}
 .mobile-home-v56{gap:var(--mobile-gap);margin-top:clamp(10px,3vw,18px)}
 .mobile-home-section{padding:clamp(12px,3.8vw,20px);border-radius:var(--mobile-radius);box-shadow:0 8px 26px rgba(18,52,43,.055)}
 .mobile-home-title h2{font-size:clamp(17px,4.8vw,22px)}
 .mobile-home-title small{font-size:clamp(9px,2.4vw,11px)}
 .mobile-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(7px,2.2vw,12px)}
 .mobile-quick-grid button{min-width:0;min-height:clamp(68px,18vw,86px);padding:clamp(8px,2.5vw,13px);border-radius:clamp(13px,3.8vw,18px);font-size:clamp(11px,3.1vw,14px)}
 .mobile-quick-grid .mq-icon{width:clamp(29px,8vw,36px);height:clamp(29px,8vw,36px)}
 .mobile-today-item,.mobile-todo-item{padding:clamp(9px,2.8vw,13px);border-radius:clamp(12px,3.5vw,16px)}
 .mobile-activity-kpi{padding:clamp(10px,3vw,15px)}
 .mobile-activity-kpi strong{font-size:clamp(21px,6vw,28px)}
 .mobile-nav{width:100%;padding-inline:max(5px,env(safe-area-inset-left));padding-right:max(5px,env(safe-area-inset-right));padding-bottom:calc(6px + env(safe-area-inset-bottom))}
 .mobile-nav button{min-width:0;min-height:clamp(52px,14vw,60px);font-size:clamp(8px,2.35vw,10px)}
 .mobile-publish-sheet-v64,.catalog-filters.v54-filters.mobile-filter-open{left:var(--mobile-gutter);right:var(--mobile-gutter)}
 .modal-card{max-width:min(680px,100%)}
 img,video,canvas{max-width:100%}
}

/* Phones: keep the native-style bottom navigation and one-column market. */
@media (max-width:760px){
 .app,.app-shell,.content,main{max-width:100%!important}
 .listing-grid,#sellRows,#exportGrid,.stock-visual-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))!important}
 #messages .messages{height:calc(100dvh - clamp(158px,42vw,182px))!important;min-height:min(480px,calc(100dvh - 150px))!important}
}

/* Very compact phones: preserve touch targets without horizontal overflow. */
@media (max-width:350px){
 :root{--mobile-gutter:9px}
 .logo-name{font-size:17px}
 .mobile-home-section{padding:11px}
 .mobile-nav button{font-size:7.8px}
 .mobile-nav .mobile-publish-v64{transform:translateY(-6px)}
}

/* Large phones and tablets get more density automatically, not a stretched phone canvas. */
@media (min-width:480px) and (max-width:1023px){
 main{padding-inline:clamp(18px,5vw,44px)}
 .mobile-home-v56{max-width:760px;margin-inline:auto}
 .mobile-home-section{padding:clamp(16px,3vw,22px)}
 .listing-grid,#sellRows,#exportGrid,.stock-visual-grid{grid-template-columns:repeat(auto-fit,minmax(250px,1fr))!important}
 .professional-layout,.professional-profile-layout{grid-template-columns:minmax(0,1fr)!important;max-width:820px;margin-inline:auto}
}
