/* =========================================================
   업체 목록 모바일 리뉴얼 (2026-11-18)
   - 1023px 이하에서만 적용한다. PC 화면은 list.css 그대로.
   - list.css 다음 순서(add_stylesheet 41)로 로드된다.
   - 리뉴얼 전 원본: pages/css/backup/list_20261118.css, pages/store/backup/list_20261118.php
   - 시안: store_list_renewal.html
   ========================================================= */

/* PC: 모바일 전용 요소 숨김 */
.lm-header,
.lm-cat-tabs,
.lm-loc,
.lm-result-head,
.lm-active-filters,
.lm-dim,
.lm-sheet,
.lm-list,
.lm-empty,
.lm-nearby,
.lm-seo-top,
.lm-map-fab,
.lm-toast,
.lm-cmp-n,
.lm-seo-caret,
.lm-skeleton,
.lm-more {
  display: none;
}

@media (max-width: 1023px) {
  :root {
    --lm-primary: #7b1a1a;
    --lm-primary-dark: #5e1212;
    --lm-primary-soft: #fbf1f1;
    --lm-navy: #0f1b3d;
    --lm-green: #15803d;
    --lm-green-soft: #effaf3;
    --lm-star: #f59e0b;
    --lm-text: #191919;
    --lm-text-2: #4a4a4a;
    --lm-text-3: #8a8a8a;
    --lm-line: #efefef;
    --lm-border: #e2e2e2;
    --lm-bg: #f4f4f5;
    --lm-header-h: 56px;
    --lm-nav-h: 60px;
  }

  body {
    background: var(--lm-bg);
  }

  /* 터치 시 파란 하이라이트 제거 */
  .lm-header,
  .lm-cat-tabs,
  .lm-loc,
  .lm-result-head,
  .lm-active-filters,
  .lm-sheet,
  .layout {
    -webkit-tap-highlight-color: transparent;
  }
  .lm-header *,
  .lm-sheet *,
  .lm-list *,
  .lm-cat-tabs *,
  .lm-result-head *,
  .lm-active-filters *,
  .lm-loc *,
  .lm-nearby *,
  .lm-map-fab,
  .compare-bar * {
    -webkit-tap-highlight-color: transparent;
  }
  .lm-header a:focus:not(:focus-visible),
  .lm-header button:focus:not(:focus-visible),
  .lm-sheet a:focus:not(:focus-visible),
  .lm-sheet button:focus:not(:focus-visible),
  .lm-list a:focus:not(:focus-visible),
  .lm-list button:focus:not(:focus-visible) {
    outline: none;
  }
  [hidden] {
    display: none !important;
  }

  /* 기존 PC/구 모바일 요소 중 모바일에서 숨기는 것 */
  .seo-top,
  .list > .section-label,
  .list > .card-item,
  .list > .desktop-pagination {
    display: none !important;
  }

  .lm-header,
  .lm-cat-tabs,
  .lm-result-head {
    display: flex;
  }
  .lm-list,
  .lm-nearby,
  .lm-seo-top {
    display: block;
  }

  /* ---------- 헤더: 뒤로 / 지역 선택(가운데 알약 버튼) / 검색·공유 ---------- */
  .lm-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--lm-header-h);
    background: #fff;
    display: grid;
    grid-template-columns: minmax(42px, 1fr) minmax(0, auto) minmax(84px, 1fr);
    column-gap: 2px;
    align-items: center;
    padding: 0 4px;
  }
  .lm-h-side {
    display: flex;
    align-items: center;
  }
  .lm-h-side.r {
    justify-content: flex-end;
  }
  .lm-icon-btn {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--lm-text);
    display: grid;
    place-items: center;
    font-size: 24px;
    flex: 0 0 auto;
    cursor: pointer;
    padding: 0;
  }
  .lm-icon-btn .ti-share-2 {
    font-size: 22px;
  }
  .lm-icon-btn:active {
    background: #f2f2f2;
  }
  .lm-region-btn {
    justify-self: center;
    max-width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 12px 0 11px;
    border-radius: 999px;
    background: #f3f3f4;
    border: 1px solid #eaeaec;
    color: var(--lm-text);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: background 0.15s;
  }
  .lm-region-btn:active {
    background: #e9e9eb;
  }
  .lm-region-btn .lm-pin {
    color: var(--lm-primary);
    font-size: 18px;
    flex: 0 0 auto;
  }
  .lm-region-btn.gps .lm-pin {
    color: var(--lm-green);
  }
  .lm-region-name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .lm-region-btn .lm-caret {
    font-size: 16px;
    color: var(--lm-text-2);
    flex: 0 0 auto;
  }

  /* ---------- 업종 탭 ---------- */
  .lm-cat-tabs {
    background: #fff;
    gap: 4px;
    padding: 0 14px;
    border-bottom: 1px solid var(--lm-line);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .lm-cat-tabs::-webkit-scrollbar {
    display: none;
  }
  .lm-cat-tab {
    position: relative;
    padding: 10px 10px 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--lm-text-3);
    white-space: nowrap;
  }
  .lm-cat-tab.on {
    color: var(--lm-text);
    font-weight: 800;
  }
  .lm-cat-tab.on::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -1px;
    height: 3px;
    border-radius: 3px;
    background: var(--lm-text);
  }

  /* ---------- 위치 상태 안내 ---------- */
  .lm-loc {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 16px 0;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
  }
  /* 위치 안내 + 결과 헤드를 감싸는 흰 영역 (목록과 이어지는 흰 배경) */
  .lm-top-panel {
    background: #fff;
    margin-bottom: 0;
    padding-top: 14px; /* 안쪽 여백은 padding으로 (margin 상쇄로 회색 틈이 생기지 않게) */
  }
  .lm-top-panel .lm-loc {
    margin-top: 0;
  }
  .lm-top-panel .lm-loc[hidden] + .lm-result-head {
    padding-top: 4px;
  }
  .lm-top-panel .lm-result-head {
    padding-bottom: 14px;
  }
  .lm-top-panel .lm-active-filters {
    padding-bottom: 14px;
  }
  .lm-loc > i {
    font-size: 20px;
    flex: 0 0 auto;
  }
  .lm-loc .txt {
    flex: 1;
    min-width: 0;
  }
  .lm-loc .txt b {
    font-weight: 800;
  }
  .lm-loc .btn {
    flex: 0 0 auto;
    box-sizing: border-box;
    height: 32px;
    margin: 0;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 0;
  }
  .lm-loc.gps {
    background: var(--lm-green-soft);
    color: #14532d;
  }
  .lm-loc.gps .btn {
    background: #fff;
    color: var(--lm-green);
    border: 1px solid #cdebd6;
  }
  .lm-loc.ask {
    background: var(--lm-primary-soft);
    color: var(--lm-primary-dark);
  }
  .lm-loc.ask .btn {
    background: var(--lm-primary);
    color: #fff;
  }
  .lm-loc.locating {
    background: #fff;
    color: var(--lm-text-2);
  }
  .lm-spin {
    animation: lm-spin 1s linear infinite;
  }
  @keyframes lm-spin {
    to {
      transform: rotate(360deg);
    }
  }

  /* ---------- 결과 헤드: 결과 수 / 필터 / 정렬 ---------- */
  .lm-result-head {
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 18px 20px 10px;
  }
  .lm-title {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--lm-text);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .lm-result-head .lm-title em {
    font-style: normal;
    color: var(--lm-primary);
  }
  .lm-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
  }
  .lm-tools .lm-bar {
    width: 1px;
    height: 12px;
    background: #dadada;
    margin: 0 6px;
  }
  .lm-tool {
    display: flex;
    align-items: center;
    gap: 3px;
    border: 0;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--lm-text-2);
    padding: 6px 2px;
    cursor: pointer;
  }
  .lm-tool i {
    font-size: 17px;
  }
  .lm-tool.has {
    color: var(--lm-primary);
    font-weight: 800;
  }
  .lm-tool .lm-n {
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    background: var(--lm-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
  }

  /* 적용된 필터 (x로 개별 해제) */
  .lm-active-filters {
    display: flex;
    gap: 6px;
    padding: 0 20px 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .lm-active-filters::-webkit-scrollbar {
    display: none;
  }
  .lm-active-filters a {
    flex: 0 0 auto;
    height: 30px;
    padding: 0 8px 0 11px;
    border-radius: 999px;
    background: var(--lm-primary-soft);
    color: var(--lm-primary);
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 3px;
  }
  .lm-active-filters a i {
    font-size: 14px;
  }
  .lm-active-filters a.clear {
    background: none;
    color: var(--lm-text-3);
    font-weight: 600;
    padding: 0 6px;
  }

  /* ---------- 목록 영역 ---------- */
  .layout {
    background: var(--lm-bg);
  }
  .list {
    padding: 0;
    gap: 0;
  }
  .map-area {
    margin: 0 16px 12px;
    border-radius: 14px;
  }

  .lm-list {
    background: #fff;
    border-bottom: 1px solid var(--lm-line);
  }

  /* 카드: 큰 정사각 썸네일 + 정보. 카드 전체가 상세 링크(.lm-link) */
  .lm-item {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    background: #fff;
  }
  .lm-item + .lm-item::before {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    top: 0;
    height: 1px;
    background: var(--lm-line);
  }
  .lm-item:active {
    background: #fafafa;
  }
  .lm-link {
    position: absolute;
    inset: 0;
    z-index: 1;
  }
  .lm-thumb {
    position: relative;
    flex: 0 0 112px;
    width: 112px;
    height: 112px;
    border-radius: 14px;
    overflow: hidden;
    background: #fef2f2;
  }
  .lm-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .lm-badge {
    position: absolute;
    left: 6px;
    top: 6px;
    z-index: 2;
    height: 18px;
    padding: 0 6px;
    border-radius: 5px;
    background: var(--lm-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 18px;
    letter-spacing: 0.02em;
  }
  .lm-wish {
    position: absolute;
    right: 2px;
    top: 2px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: none;
    padding: 0;
    color: #fff;
    font-size: 21px;
    display: grid;
    place-items: center;
    cursor: pointer;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
  }
  .lm-wish i {
    grid-area: 1 / 1;
  }
  .lm-wish .ti-heart-filled,
  .lm-wish.on .ti-heart {
    display: none;
  }
  .lm-wish.on .ti-heart-filled {
    display: block;
    color: #ff4d5e;
  }
  .lm-photo-cnt,
  .lm-cmp {
    position: absolute;
    bottom: 6px;
    z-index: 3;
    height: 22px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 2px;
  }
  .lm-photo-cnt i,
  .lm-cmp i {
    font-size: 13px;
    line-height: 1;
    display: block;
  }
  .lm-photo-cnt {
    left: 6px;
    padding: 0 7px 0 6px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
  }
  /* 비교 담기: 썸네일 오른쪽 아래 작은 토글 */
  .lm-cmp {
    right: 6px;
    padding: 0 7px 0 5px;
    border: 0;
    background: rgba(255, 255, 255, 0.94);
    color: var(--lm-text-2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    cursor: pointer;
  }
  .lm-cmp .ti-check,
  .lm-cmp.on .ti-plus {
    display: none;
  }
  .lm-cmp.on .ti-check {
    display: block;
  }
  .lm-cmp.on {
    background: var(--lm-navy);
    color: #fff;
  }

  .lm-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .lm-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--lm-text-3);
    white-space: nowrap;
    overflow: hidden;
    min-height: 19px;
  }
  .lm-ad {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 800;
    line-height: 15px;
    padding: 0 4px;
    border-radius: 4px;
    border: 1px solid #d9c7a0;
    color: #a07a2c;
    background: #fffbf0;
    letter-spacing: 0.02em;
  }
  .lm-dist {
    color: var(--lm-text-2);
    font-weight: 700;
  }
  .lm-sep {
    color: #d0d0d0;
  }
  .lm-addr {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .lm-name.card-name {
    margin-top: 2px;
    padding-right: 44px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.35;
    color: var(--lm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .lm-rate {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
    font-size: 14px;
    white-space: nowrap;
    color: var(--lm-text);
  }
  .lm-rate .ti-star-filled {
    color: var(--lm-star);
    font-size: 15px;
  }
  .lm-rate b {
    font-weight: 800;
  }
  .lm-rc {
    color: var(--lm-text-3);
  }
  .lm-rate .lm-sep {
    margin: 0 2px;
  }
  .lm-price {
    color: var(--lm-text-2);
    font-weight: 600;
  }
  .lm-norv {
    font-size: 12px;
    font-weight: 700;
    color: var(--lm-text-3);
  }
  .lm-intro {
    margin-top: 4px;
    font-size: 14px;
    color: var(--lm-text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .lm-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
  }
  .lm-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    border-radius: 6px;
    background: #f3f3f4;
    color: var(--lm-text-2);
    font-size: 12px;
    font-weight: 700;
  }
  .lm-event {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--lm-primary-soft);
    color: var(--lm-primary);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
  }
  .lm-event span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .lm-call {
    position: absolute;
    right: 16px;
    top: 14px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--lm-green-soft);
    color: var(--lm-green);
    font-size: 20px;
  }

  /* 빈 상태 */
  .lm-empty {
    display: block;
    padding: 48px 24px;
    text-align: center;
    background: #fff;
    border-top: 1px solid var(--lm-line);
    border-bottom: 1px solid var(--lm-line);
  }
  .lm-empty i {
    font-size: 44px;
    color: #cfcfcf;
  }
  .lm-empty p {
    margin-top: 10px;
    font-size: 15px;
    color: var(--lm-text-2);
  }
  .lm-empty a,
  .lm-empty button {
    display: inline-flex;
    align-items: center;
    margin-top: 14px;
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--lm-navy);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  /* 기존 "업체 더보기" 버튼: 모바일은 무한 스크롤로 대체 (링크는 검색엔진용으로 HTML에 유지) */
  .loadmore-btn {
    display: none !important;
  }

  /* ---------- 무한 스크롤 / 스켈레톤 ---------- */
  .lm-results {
    background: #fff;
  }
  .lm-skeleton {
    background: #fff;
  }
  .lm-results.is-locating .lm-skeleton {
    display: block;
  }
  /* 위치 확인 중에는 "서울 신점 N곳"·필터 칩을 숨긴다 (확인 후 다른 지역으로 바뀌므로) */
  .lm-top-panel.is-locating .lm-result-head,
  .lm-top-panel.is-locating .lm-active-filters {
    display: none !important;
  }
  .lm-top-panel.is-locating {
    padding-bottom: 14px;
  }
  .lm-results.is-locating .lm-list,
  .lm-results.is-locating .lm-more,
  .lm-results.is-locating .lm-empty {
    display: none !important;
  }
  .lm-more {
    display: block;
    background: #fff;
    border-bottom: 1px solid var(--lm-line);
  }
  .lm-more:empty {
    border-bottom: 0;
  }
  .lm-sk {
    background: linear-gradient(90deg, #eee 25%, #f6f6f6 50%, #eee 75%);
    background-size: 200% 100%;
    animation: lm-sk 1.2s infinite;
    border-radius: 8px;
  }
  @keyframes lm-sk {
    to {
      background-position: -200% 0;
    }
  }
  .lm-sk-item .lm-thumb.lm-sk {
    border-radius: 14px;
  }
  .lm-sk-lines {
    gap: 8px;
    padding-top: 2px;
  }
  .lm-end {
    padding: 18px 20px 22px;
    text-align: center;
    font-size: 13px;
    color: var(--lm-text-3);
  }
  .lm-retry {
    display: block;
    width: calc(100% - 40px);
    height: 44px;
    margin: 12px 20px 18px;
    border: 1px solid var(--lm-border);
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    color: var(--lm-text-2);
    cursor: pointer;
  }

  /* 지역 업체 다음 "가까운 다른 지역 업체" 구분 */
  .lm-fill-head {
    padding: 20px 20px 4px;
    border-top: 8px solid var(--lm-bg);
  }
  .lm-list > .lm-fill-head:first-child {
    border-top: 0;
    padding-top: 6px;
  }
  .lm-fill-head strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: var(--lm-text);
  }
  .lm-fill-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f5f5f6;
    font-size: 13px;
    line-height: 1.45;
    color: var(--lm-text-2);
  }
  .lm-fill-note i {
    flex: 0 0 auto;
    font-size: 16px;
    color: var(--lm-text-3);
  }
  .lm-fill-head + .lm-item::before {
    display: none;
  }

  /* 정렬 시트: 내 주변 → 지역 목록 전환 */
  .lm-sort-list a.lm-sort-region {
    margin-top: 4px;
    border-top: 1px solid var(--lm-line);
  }
  .lm-sort-list a.lm-sort-region i {
    visibility: visible;
    color: var(--lm-text-3);
    font-size: 18px;
  }

  /* 주변 지역 */
  .lm-nearby {
    margin-top: 16px;
    padding: 20px;
    background: #fff;
  }
  .lm-nearby h2 {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--lm-text);
  }
  .lm-nearby p {
    margin-top: 2px;
    font-size: 13px;
    color: var(--lm-text-3);
  }
  .lm-nb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
  }
  .lm-nb-list a {
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: #f5f5f6;
    font-size: 14px;
    font-weight: 600;
    color: var(--lm-text-2);
    display: inline-flex;
    align-items: center;
  }
  .lm-nb-list a span {
    margin-left: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--lm-text-3);
  }

  /* 최근 본 업체: 모바일에서는 숨김 */
  .recent-section {
    display: none !important;
  }

  /* 하단 SEO: 제목 한 줄만 보이고 누르면 펼침 (검색엔진용 내용은 그대로 HTML에 있음) */
  .seo-block {
    margin: 8px 0 72px; /* 지도 버튼·하단 메뉴에 가리지 않게 */
    background: #fff;
    padding: 0;
    border: 0;
    border-radius: 0;
  }
  .seo-block .seo-title {
    margin: 0;
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--lm-text-3);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .seo-block .seo-title i {
    color: var(--lm-text-3);
  }
  .seo-block .seo-title .lm-seo-caret {
    display: inline-block;
    margin-left: auto;
    font-size: 16px;
    transition: transform 0.2s;
  }
  .seo-block.open .seo-title .lm-seo-caret {
    transform: rotate(180deg);
  }
  .seo-block .seo-txt,
  .seo-block .lm-seo-top {
    display: none;
  }
  .seo-block.open .lm-seo-top,
  .seo-block.open .seo-txt {
    display: block;
    padding: 0 20px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--lm-text-3);
  }
  .seo-block.open .lm-seo-top {
    margin-bottom: 8px;
  }
  .seo-block.open .seo-txt {
    padding-bottom: 20px;
  }
  .lm-seo-top strong {
    color: var(--lm-text-2);
    font-weight: 700;
  }

  /* ---------- 지도 플로팅 버튼 ---------- */
  .lm-map-fab,
  .lm-map-fab.on {
    position: fixed;
    left: 50%;
    bottom: calc(var(--lm-nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
    z-index: 900;
    transform: translateX(-50%);
    height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--lm-navy);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 6px 18px rgba(15, 27, 61, 0.3);
    transition: transform 0.25s, opacity 0.25s, bottom 0.25s;
    cursor: pointer;
  }
  .lm-map-fab i {
    font-size: 19px;
  }
  .lm-map-fab.hide {
    transform: translate(-50%, 90px);
    opacity: 0;
    pointer-events: none;
  }
  body.lm-cmp-on .lm-map-fab {
    bottom: calc(var(--lm-nav-h) + env(safe-area-inset-bottom, 0px) + 86px);
  }

  /* ---------- 비교 바 (기존 .compare-bar 재사용, 모바일 디자인) ---------- */
  .compare-bar {
    left: 12px;
    right: 12px;
    bottom: calc(var(--lm-nav-h) + env(safe-area-inset-bottom, 0px) + 10px);
    transform: none;
    width: auto;
    height: 60px;
    padding: 0 10px 0 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
    z-index: 901;
  }
  .compare-bar-left i {
    display: none;
  }
  .compare-txt {
    color: var(--lm-text);
    font-size: 14px;
    font-weight: 700;
  }
  .compare-sub {
    color: var(--lm-text-3);
    font-size: 12px;
  }
  .lm-cmp-n {
    display: inline;
    color: var(--lm-primary);
  }
  .compare-btn {
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--lm-navy);
    font-size: 14px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
  }

  /* ---------- 토스트 ---------- */
  .lm-toast {
    display: block;
    position: fixed;
    left: 50%;
    bottom: calc(var(--lm-nav-h) + env(safe-area-inset-bottom, 0px) + 72px);
    z-index: 10030;
    transform: translate(-50%, 20px);
    max-width: calc(100% - 32px);
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(25, 25, 25, 0.92);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s;
  }
  .lm-toast.on {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  /* ---------- 바텀시트 공통 ---------- */
  .lm-dim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10010;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
  }
  .lm-dim.on {
    opacity: 1;
    pointer-events: auto;
  }
  .lm-sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10011;
    max-height: 88vh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff;
    border-radius: 20px 20px 0 0;
    transform: translateY(105%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    visibility: hidden;
  }
  .lm-sheet.on {
    transform: translateY(0);
    visibility: visible;
  }
  body.lm-sheet-open {
    overflow: hidden;
  }
  .lm-sheet-handle {
    flex: 0 0 auto;
    width: 40px;
    height: 4px;
    margin: 10px auto 0;
    border-radius: 2px;
    background: #dadada;
  }
  .lm-sheet-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 10px 20px;
  }
  .lm-sheet-head strong {
    font-size: 19px;
    font-weight: 800;
    color: var(--lm-text);
  }
  .lm-sheet-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
  .lm-sheet-foot {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--lm-line);
  }
  .lm-reset,
  .lm-apply {
    height: 52px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }
  .lm-reset {
    flex: 0 0 108px;
    background: #f3f3f4;
    color: var(--lm-text-2);
  }
  .lm-apply {
    flex: 1;
    border: 0;
    background: var(--lm-primary);
    color: #fff;
    cursor: pointer;
  }

  /* 지역 시트 */
  .lm-region-sheet {
    height: 88vh;
  }
  .lm-rs-top {
    flex: 0 0 auto;
    padding: 0 16px 12px;
    border-bottom: 1px solid var(--lm-line);
  }
  .lm-rs-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    background: #f3f3f4;
  }
  .lm-rs-search i {
    font-size: 20px;
    color: var(--lm-text-3);
  }
  .lm-rs-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    outline: none;
    font-size: 16px;
    color: var(--lm-text);
  }
  .lm-rs-gps {
    width: 100%;
    height: 46px;
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid #cdebd6;
    background: var(--lm-green-soft);
    color: var(--lm-green);
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
  }
  .lm-rs-recent {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .lm-rs-recent::-webkit-scrollbar {
    display: none;
  }
  .lm-rs-recent .lbl {
    flex: 0 0 auto;
    margin-right: 2px;
    font-size: 12px;
    font-weight: 700;
    color: var(--lm-text-3);
  }
  .lm-rs-recent a {
    flex: 0 0 auto;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--lm-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--lm-text-2);
    display: inline-flex;
    align-items: center;
    gap: 3px;
  }
  .lm-rs-cols {
    display: flex;
    flex: 1;
    min-height: 0;
  }
  .lm-rs-sido {
    flex: 0 0 104px;
    overflow-y: auto;
    background: #f7f7f8;
    scrollbar-width: none;
  }
  .lm-rs-sido button {
    position: relative;
    display: block;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    background: none;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: var(--lm-text-2);
    cursor: pointer;
  }
  .lm-rs-sido button .cnt {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 500;
    color: var(--lm-text-3);
  }
  .lm-rs-sido button.on {
    background: #fff;
    color: var(--lm-text);
    font-weight: 800;
  }
  .lm-rs-sido button.on::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--lm-primary);
  }
  .lm-rs-gu-wrap {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 12px 14px 24px;
  }
  .lm-rs-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    margin-bottom: 10px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--lm-border);
    font-size: 15px;
    font-weight: 800;
    color: var(--lm-text);
  }
  .lm-rs-all span {
    font-size: 13px;
    font-weight: 600;
    color: var(--lm-text-3);
  }
  .lm-rs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .lm-rs-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    height: 48px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid #ececec;
    font-size: 15px;
    font-weight: 600;
    color: var(--lm-text);
    white-space: nowrap;
    overflow: hidden;
  }
  .lm-rs-grid a span {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--lm-text-3);
  }
  .lm-rs-grid a.zero {
    color: #bdbdbd;
  }
  .lm-rs-grid a.zero span {
    color: #d0d0d0;
  }
  .lm-rs-gu a.on {
    border-color: var(--lm-primary);
    background: var(--lm-primary-soft);
    color: var(--lm-primary);
  }
  .lm-rs-gu a.on span {
    color: var(--lm-primary);
  }
  .lm-rs-result {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 16px 24px;
  }
  .lm-rs-result a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    border-bottom: 1px solid var(--lm-line);
    font-size: 15px;
    font-weight: 600;
    color: var(--lm-text);
  }
  .lm-rs-result a em {
    font-style: normal;
    color: var(--lm-primary);
  }
  .lm-rs-result a span {
    font-size: 13px;
    font-weight: 500;
    color: var(--lm-text-3);
  }
  .lm-rs-none {
    padding: 32px 0;
    text-align: center;
    font-size: 15px;
    color: var(--lm-text-2);
  }

  /* 필터 시트 */
  .lm-fs-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  .lm-fs-sec {
    padding: 16px 20px 18px;
    border-bottom: 8px solid var(--lm-bg);
  }
  .lm-fs-sec:last-child {
    border-bottom: 0;
  }
  .lm-fs-sec h3 {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--lm-text);
  }
  .lm-opt-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .lm-opt {
    position: relative;
    cursor: pointer;
  }
  .lm-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  .lm-opt span {
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--lm-border);
    font-size: 14px;
    font-weight: 600;
    color: var(--lm-text-2);
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .lm-opt span i {
    font-size: 17px;
  }
  .lm-opt input:checked + span {
    border-color: var(--lm-primary);
    background: var(--lm-primary-soft);
    color: var(--lm-primary);
  }
  .lm-opt input:focus-visible + span {
    outline: 2px solid var(--lm-primary);
    outline-offset: 2px;
  }

  /* 정렬 시트 */
  .lm-sort-list {
    overflow-y: auto;
    padding-bottom: 12px;
  }
  .lm-sort-list a,
  .lm-sort-list button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border: 0;
    background: none;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: var(--lm-text);
    cursor: pointer;
  }
  .lm-sort-list small {
    display: block;
    margin-top: 1px;
    font-size: 12px;
    font-weight: 500;
    color: var(--lm-text-3);
  }
  .lm-sort-list i {
    font-size: 22px;
    color: var(--lm-primary);
    visibility: hidden;
  }
  .lm-sort-list a.on {
    font-weight: 800;
  }
  .lm-sort-list a.on i {
    visibility: visible;
  }
}

/* 좁은 화면(375px 미만)에서 헤더에 동까지 보일 때 시/도 생략 */
@media (max-width: 374px) {
  .lm-region-name .lm-sido {
    display: none;
  }
}

/* =========================================================
   모바일 화면 최대 폭 (2026-11-18)
   - 601~1023px(태블릿·작은 PC 창)에서 모바일 화면이 옆으로 늘어나지 않도록
     가운데 600px 컬럼으로 고정하고 양옆은 여백으로 둔다.
   - 600px 이하(휴대폰)와 1024px 이상(PC 레이아웃)은 영향 없음.
   - 화면 고정(fixed) 요소는 body 폭을 따르지 않으므로 같은 폭으로 별도 보정한다.
     (지도 버튼·토스트는 left:50% 가운데 정렬이라 보정 불필요)
   ========================================================= */
@media (min-width: 601px) and (max-width: 1023px) {
  :root {
    --app-max-w: 600px;
    --app-gutter: max(0px, calc((100% - var(--app-max-w)) / 2));
  }

  html {
    background: #f7f7f7; /* PC 화면 기본 배경색과 동일 */
  }

  /* default.css(body{margin:0})가 이 파일보다 뒤에 로드되므로 html body 로 우선순위를 높인다 */
  html body {
    max-width: var(--app-max-w);
    min-height: 100vh;
    margin: 0 auto;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.06);
  }

  /* 바텀시트(지역·필터·정렬), 공통 하단 메뉴 */
  .lm-sheet,
  .bottom-nav {
    left: var(--app-gutter);
    right: var(--app-gutter);
    width: auto;
  }

  /* 비교 바 */
  .compare-bar {
    left: calc(var(--app-gutter) + 12px);
    right: calc(var(--app-gutter) + 12px);
  }
}
