/* ==========================================================================
   부산오토 — 모바일 버전 (/m/) 390px 기준. PC와 다른 전용 레이아웃.
   ========================================================================== */
body[data-version="mobile"] {
  background: #f7f4ec;
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}
body[data-version="mobile"] .pfoot, body[data-version="mobile"] .gnb, body[data-version="mobile"] .util { display: none !important; }

/* 설치 안내 바 */
.minstall {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  background: #111418; color: #fff; font-size: 12px;
}
.minstall__t { flex: 1 1 auto; min-width: 0; color: #cfc9bd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.minstall__t b { color: var(--yellow); margin-right: 4px; }
.minstall__btn { border: 0; background: var(--yellow); color: #111418; font-weight: 700; font-size: 12px; padding: 6px 12px; border-radius: 999px; }
.minstall__app { color: #fff; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.minstall__x { border: 0; background: none; color: #8c877c; font-size: 14px; padding: 0 2px; }
.minstall.is-off { display: none; }

/* 상단 헤더 */
.mhead {
  position: sticky; top: 0; z-index: 50; height: 58px; padding: 0 14px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-bottom: 1px solid #ece5d8;
}
.mhead .brand__mark { font-size: 19px; }
.mhead .brand__sub { display: none; }
.mhead__act { display: flex; align-items: center; gap: 2px; }
.mico { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #2a2e34; }
.mico:active { background: #f1ece1; }
.mico b { position: absolute; top: 6px; right: 6px; min-width: 15px; height: 15px; border-radius: 999px; background: var(--yellow); color: #111418; font-size: 9.5px; line-height: 15px; text-align: center; padding: 0 3px; }
.mhead__login { font-size: 12.5px; font-weight: 700; padding: 9px 12px; border: 1px solid #e0d9ca; border-radius: 999px; }

/* 검색 */
.msearch { padding: 12px 14px 4px; }
.msearch form { position: relative; }
.msearch input { width: 100%; height: 48px; border-radius: 14px; border: 1px solid #e4ddd0; background: #fff; padding: 0 48px 0 16px; font-size: 14px; }
.msearch button { position: absolute; right: 5px; top: 5px; width: 38px; height: 38px; border: 0; border-radius: 10px; background: #111418; color: #fff; display: grid; place-items: center; }

/* 홈 히어로 */
.mhero { padding: 18px 14px 6px; }
.mhero__eb { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: #4b5057; }
.mhero__eb i { width: 6px; height: 6px; border-radius: 50%; background: #17824f; }
.mhero h1 { margin-top: 10px; font-size: 27px; line-height: 1.28; letter-spacing: -.04em; }
.mhero h1 em { font-style: normal; background: linear-gradient(transparent 60%, var(--yellow) 60%, var(--yellow) 94%, transparent 94%); }
.mhero p { margin-top: 8px; font-size: 13px; color: #6d716f; line-height: 1.6; }
.mstats { display: flex; gap: 0; margin: 16px 0 4px; background: #fff; border: 1px solid #ece5d8; border-radius: 14px; overflow: hidden; }
.mstats > div { flex: 1; padding: 12px 6px; text-align: center; border-right: 1px solid #f3eee4; }
.mstats > div:last-child { border-right: 0; }
.mstats b { display: block; font-size: 18px; letter-spacing: -.02em; }
.mstats span { font-size: 10.5px; color: #8b8578; }

/* 카테고리 */
.mcat { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 14px 10px; }
.mcat a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 2px; font-size: 11.5px; color: #3b424b; }
.mcat i { width: 46px; height: 46px; border-radius: 16px; background: #fff; border: 1px solid #ece5d8; display: grid; place-items: center; }
.mcat i svg { width: 23px; height: 23px; }
.mcat a:active i { background: #fff5d6; }

/* 섹션 */
.msec { padding: 8px 14px 16px; }
.msec__head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 10px; }
.msec__head h2 { font-size: 17px; letter-spacing: -.02em; }
.msec__head a { font-size: 11.5px; color: #7d776b; }
.msec__head p { font-size: 11.5px; color: #8b8578; margin-top: 2px; }

/* 가로 스크롤 카드 */
.mrow { display: flex; gap: 10px; overflow-x: auto; margin: 0 -14px; padding: 2px 14px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.mrow::-webkit-scrollbar { display: none; }
.mrow > * { flex: 0 0 216px; scroll-snap-align: start; }

/* 하단 탭 */
.mtab {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(62px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: rgba(255,255,255,.97); backdrop-filter: blur(14px); border-top: 1px solid #e7e0d2;
}
.mtab a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: #8b8578; padding-top: 4px; }
.mtab svg { width: 23px; height: 23px; }
.mtab a.is-on { color: #111418; font-weight: 700; }
.mtab__reg { position: relative; }
.mtab__plus { width: 44px; height: 44px; margin-top: -20px; border-radius: 50%; background: var(--yellow); color: #111418; display: grid; place-items: center; box-shadow: 0 8px 18px rgba(17,20,24,.18); }
.mtab__plus svg { width: 23px; height: 23px; }
.mtab__reg span:last-child { font-weight: 700; color: #111418; }

/* 모바일 푸터 */
.mfoot { margin-top: 26px; padding: 22px 16px calc(22px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #ece5d8; }
.mfoot__brand { display: flex; align-items: baseline; gap: 7px; }
.mfoot__brand b { font-size: 17px; }
.mfoot__brand span { font-size: 11px; color: #8b8578; }
.mfoot__desc { margin-top: 8px; font-size: 11.5px; color: #7d776b; line-height: 1.7; }
.mfoot__links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 14px 0; font-size: 11.5px; color: #5c6167; }
.mfoot__common { display: grid; gap: 6px; background: #faf7f0; border: 1px solid #ece5d8; border-radius: 12px; padding: 12px; font-size: 11.5px; color: #4b5057; }
.mfoot__common b { color: #111418; margin-right: 5px; }
.mfoot__common a { text-decoration: underline; text-underline-offset: 2px; }
.mfoot__common .made { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-weight: 700; color: #111418; }
.mfoot__common .made i { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }
.mfoot__common .made em { font-style: normal; font-weight: 500; color: #8b8578; font-size: 10.5px; }
.mfoot__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; margin-top: 14px; font-size: 10.5px; color: #9a9488; }
.mfoot__bottom .ver { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.mfoot__bottom .ver a.is-on { color: #111418; font-weight: 700; }

/* 차량 카드 (모바일) */
.car { position: relative; background: #fff; border: 1px solid #ece5d8; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.car__link { display: block; min-width: 0; }
.car__pic { position: relative; aspect-ratio: 4/3; background: #eee8dc; overflow: hidden; }
.car__pic img { width: 100%; height: 100%; object-fit: cover; }
.car__fav { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; color: #4b5057; z-index: 2; }
.car__fav.is-on { color: #d33b2c; }
.car__badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.car__count { position: absolute; right: 8px; bottom: 8px; background: rgba(17,20,24,.62); color: #fff; font-size: 10px; padding: 3px 7px; border-radius: 999px; }
.car__body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.car__dealer { font-size: 10.5px; color: #8b8578; }
.car__name { font-size: 13.5px; font-weight: 700; line-height: 1.35; letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.car__meta { font-size: 11px; color: #6d716f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car__price { font-size: 16px; font-weight: 700; letter-spacing: -.03em; margin-top: 3px; }
.car__price small { font-size: 10px; font-weight: 500; color: #8b8578; margin-left: 2px; }
.car__tags { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 3px; }
.car__tags span { font-size: 9.5px; background: #f1ece1; color: #5c6167; border-radius: 4px; padding: 2px 5px; }
.car__cmp { display: none; }

/* 검색 목록 (모바일) */
.mfind { padding-bottom: 10px; }
.mfind__bar { position: sticky; top: 58px; z-index: 30; display: flex; gap: 8px; padding: 10px 14px; background: rgba(247,244,236,.96); backdrop-filter: blur(8px); border-bottom: 1px solid #ece5d8; }
.mfind__bar button { flex: 1; height: 40px; border: 1px solid #ddd6c7; border-radius: 10px; background: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.mfind__bar button.is-on { border-color: #111418; }
.mfind__sum { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; font-size: 12.5px; color: #6d716f; }
.mfind__sum b { font-size: 17px; color: #111418; margin-right: 2px; }
.mchips { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: none; }
.mchips::-webkit-scrollbar { display: none; }
.mchips button { flex: 0 0 auto; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #ddd6c7; background: #fff; font-size: 12px; color: #4b5057; }
.mchips button.is-on { background: #111418; color: #fff; border-color: #111418; }

/* 바텀시트 */
.msheet-bg { position: fixed; inset: 0; background: rgba(17,20,24,.45); z-index: 90; opacity: 0; pointer-events: none; transition: .2s; }
.msheet-bg.on { opacity: 1; pointer-events: auto; }
.msheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; max-height: 86vh; background: #fff;
  border-radius: 20px 20px 0 0; transform: translateY(102%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom);
}
.msheet.on { transform: none; }
.msheet__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; border-bottom: 1px solid #f1ece1; }
.msheet__head h3 { font-size: 16px; }
.msheet__head button { border: 0; background: none; font-size: 13px; color: #6d716f; }
.msheet__body { overflow-y: auto; padding: 4px 18px 12px; }
.msheet__foot { display: flex; gap: 8px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #f1ece1; }
.msheet__foot .btn { flex: 1; }

/* 차량 상세 (모바일) */
.mdhead { padding: 14px 14px 4px; }
.mdhead__badges { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.mdhead h1 { font-size: 22px; letter-spacing: -.03em; }
.mdhead p { margin-top: 6px; font-size: 12.5px; color: #6d716f; }
.mgal { position: relative; background: #eee8dc; }
.mgal__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.mgal__track::-webkit-scrollbar { display: none; }
.mgal__track img { flex: 0 0 100%; width: 100%; aspect-ratio: 4/3; object-fit: cover; scroll-snap-align: center; }
.mgal__n { position: absolute; right: 12px; bottom: 12px; background: rgba(17,20,24,.62); color: #fff; font-size: 11px; padding: 4px 10px; border-radius: 999px; }
.mprice { display: flex; align-items: flex-end; justify-content: space-between; padding: 14px; background: #fff; border-bottom: 1px solid #f1ece1; }
.mprice b { font-size: 26px; letter-spacing: -.03em; }
.mprice b small { font-size: 12px; font-weight: 500; color: #8b8578; margin-left: 4px; }
.mprice span { font-size: 11.5px; color: #8b8578; }
.mspec { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #ece5d8; border: 1px solid #ece5d8; border-radius: 12px; overflow: hidden; }
.mspec div { background: #fff; padding: 10px 12px; }
.mspec dt { font-size: 10.5px; color: #8b8578; }
.mspec dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; }
.mact {
  position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 55;
  display: flex; gap: 8px; padding: 10px 14px; background: rgba(255,255,255,.97); border-top: 1px solid #ece5d8;
}
.mact .btn { flex: 1; min-height: 46px; }
.mact .btn--ico { flex: 0 0 52px; display: grid; place-items: center; border: 1px solid #ddd6c7; background: #fff; border-radius: 999px; }
.mact .btn--ico.is-on { color: #d33b2c; border-color: #d33b2c; }
body[data-version="mobile"][data-page="car"] { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }

/* 매매상사·기타 */
.mcards { display: grid; gap: 10px; padding: 0 14px; }
.mcard { background: #fff; border: 1px solid #ece5d8; border-radius: 14px; padding: 16px; }
.mcard h3 { font-size: 16px; }
.mcard p { font-size: 12px; color: #7d776b; margin-top: 6px; line-height: 1.6; }
.mcard__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: 11.5px; color: #5c6167; }
.mempty { padding: 60px 20px; text-align: center; color: #7d776b; font-size: 13px; }
.mempty b { display: block; font-size: 16px; color: #111418; margin-bottom: 6px; }
.mtabs { display: flex; gap: 4px; padding: 10px 14px; border-bottom: 1px solid #ece5d8; background: #fff; position: sticky; top: 58px; z-index: 30; }
.mtabs a { flex: 1; text-align: center; padding: 10px 4px; font-size: 13px; font-weight: 600; color: #7d776b; border-bottom: 2px solid transparent; }
.mtabs a.is-on { color: #111418; border-color: #111418; }
