/* c-home-a · 고객사 홈 시안 A '실제 앱 화면'(접두사 ha- · 몸통 = .x-body · 시트 = .x-sheet)
   - A1(10-15 대표 선택) 값 그대로: 먹색 배너 #353839 · 실제 앱 화면 조각(둥근 모서리 · 배너 밖으로 잘림) · 연보라 64px 타일 + 선 아이콘
   - 휴대폰 400 = 한 줄 흐름 · 761 이상 = 계약 카드 두 칸 · 1101 이상(LNB) = 배너 옆 바로가기 2x2 · 목록 두 칸 */

.x-body .sw-view.ha { padding-bottom: 0; }

/* 머리 줄 = 사업장 줄(+ LNB 화면은 무료 한 줄) */
.x-body .ha-head { display: flex; align-items: center; gap: 16px; min-width: 0; margin: 0 0 10px; }
.x-body .ha-site { -webkit-appearance: none; appearance: none; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-width: 0; min-height: 44px; margin: 0 0 0 -6px; padding: 0 8px 0 6px; border-radius: 12px; color: var(--ui-ink, #191f28); font: 700 18px/1.3 var(--ui-font, inherit); letter-spacing: -.02em; text-align: left; }
.x-body .ha-site:active { background: var(--ui-press, rgba(2, 32, 71, .05)); }
.x-body .ha-site > svg { flex: none; color: var(--ui-ink-3, #8b95a1); }
.x-body .ha-site-pin { flex: none; display: flex; color: var(--ui-brand, #4c00ff); }
.x-body .ha-site-name { flex: none; white-space: nowrap; font-weight: 700; }
.x-body .ha-site-meta { min-width: 0; margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 15px/1.3 var(--ui-font, inherit); letter-spacing: 0; color: var(--ui-ink-2, #4e5968); }

/* 위쪽 = 배너 + 바로가기 */
.x-body .ha-top { display: grid; gap: 22px; min-width: 0; }

/* 먹색 배너 + 실제 앱 화면 조각 */
.x-body .ha-ban { position: relative; isolation: isolate; overflow: hidden; height: 176px; margin: 0; border-radius: 20px; background: #353839; color: #fff; }
.x-body .ha-ban-copy { position: absolute; left: 22px; top: 24px; bottom: 20px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; }
.x-body .ha-ban-t { margin: 0; font: 700 22px/1.36 var(--ui-font, inherit); letter-spacing: -.02em; color: #fff; white-space: nowrap; }
.x-body .ha-ban-btn { -webkit-appearance: none; appearance: none; border: 0; cursor: pointer; height: 38px; padding: 0 14px; border-radius: 12px; background: #fff; color: #191f28; font: 700 14px/1 var(--ui-font, inherit); white-space: nowrap; transition: transform .14s cubic-bezier(.22, 1, .36, 1); }
.x-body .ha-ban-btn:hover { background: #f2f4f6; }
.x-body .ha-ban-btn:active { transform: scale(.96); }
.x-body .ha-ban-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.x-body .ha-shot { position: absolute; right: 20px; top: 22px; z-index: 1; width: 136px; height: 240px; margin: 0; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 14px 30px rgba(0, 0, 0, .32); }
.x-body .ha-shot img { display: block; width: 100%; height: auto; margin-top: -22px; }

/* 바로가기 4 = 연보라 둥근 사각 타일 + 선 아이콘 */
.x-body .ha-tiles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1.4fr); gap: 4px; min-width: 0; }
.x-body .ha-tile { -webkit-appearance: none; appearance: none; border: 0; background: none; cursor: pointer; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0; border-radius: 16px; color: var(--ui-ink, #191f28); font: inherit; }
.x-body .ha-tile-ic { position: relative; flex: none; width: 64px; height: 64px; border-radius: 22px; background: var(--ui-brand-tint, #f4f0ff); color: var(--ui-brand, #4c00ff); display: grid; place-items: center; transition: transform .14s cubic-bezier(.22, 1, .36, 1), box-shadow .2s ease; }
.x-body .ha-tile:hover .ha-tile-ic { background: var(--ui-brand-tint-press, #e9e1ff); }
.x-body .ha-tile:active .ha-tile-ic { transform: scale(.94); }
.x-body .ha-tile.is-on .ha-tile-ic { box-shadow: inset 0 0 0 2px var(--ui-brand, #4c00ff); }
.x-body .ha-tile:focus-visible { outline: 2px solid var(--ui-brand, #4c00ff); outline-offset: 2px; }
.x-body .ha-tile-free { position: absolute; top: -7px; right: -14px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--ui-brand, #4c00ff); color: #fff; font: 700 13px/22px var(--ui-font, inherit); box-shadow: 0 0 0 2px #fff; }
.x-body .ha-tile-name { max-width: 100%; font: 500 14px/1.35 var(--ui-font, inherit); letter-spacing: -.03em; text-align: center; word-break: keep-all; overflow-wrap: anywhere; }

/* 무료 한 줄 */
.x-body .ha-free { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; font: 500 15px/1.45 var(--ui-font, inherit); color: var(--ui-ink-body, #333d4b); }
.x-body .ha-free > svg { flex: none; color: var(--ui-brand, #4c00ff); }
.x-body .ha-free > span { min-width: 0; }
.x-body .ha-free--top { display: none; }

/* 섹션 */
.x-body .ha-sec { margin-top: 36px; min-width: 0; }
.x-body .ha-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-bottom: 6px; }
.x-body .ha-sec-head h2 { margin: 0; font: 700 20px/1.4 var(--ui-font, inherit); letter-spacing: -.02em; color: var(--ui-ink, #191f28); white-space: nowrap; }

/* 업체 글(카드 · 줄 · 시트 같이 씀) */
.x-body .ha-grade, .x-sheet .ha-grade { display: block; margin: 0; font: 500 15px/1.5 var(--ui-font, inherit); color: var(--ui-ink-body, #333d4b); }
.x-body .ha-info, .x-sheet .ha-info { display: block; margin: 0; font: 400 14px/1.5 var(--ui-font, inherit); color: var(--ui-ink-2, #4e5968); font-variant-numeric: tabular-nums; }

/* 견적 받기 · 요청함 */
.x-body .ha-pick { flex: none; min-width: 92px; font-weight: 700; gap: 4px; }
.x-body .ha .ha-pick.is-on { background: #fff; color: var(--ui-brand, #4c00ff); box-shadow: inset 0 0 0 1px #e0d6ff; }
.x-body .ha .ha-pick.is-on:hover { background: var(--ui-brand-tint, #f4f0ff); }

/* 클린미션 계약 지정기관 = 가로 카드(사진 없음) */
.x-body .ha-pt-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; margin: 0 calc(var(--ui-gutter, 20px) * -1); padding: 4px var(--ui-gutter, 20px); scroll-padding: 0 var(--ui-gutter, 20px); }
.x-body .ha-pt-rail::-webkit-scrollbar { display: none; }
.x-body .ha-pt { flex: 0 0 276px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 18px 18px 16px; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1px var(--ui-line-strong, #e5e8eb); }
.x-body .ha-pt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.x-body .ha-pt-grade .ha-g { white-space: nowrap; }
.x-body .ha-pt-name { margin: 0 0 4px; font: 700 18px/1.4 var(--ui-font, inherit); letter-spacing: -.02em; color: var(--ui-ink, #191f28); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 내 주변 지정기관 = 분야 탭 + 줄 */
.x-body .ha-near { scroll-margin-top: calc(var(--sw-top, 76px) + 12px); }
.x-body .ha-tabs { margin: 0; }
.x-body .ha-list { list-style: none; margin: 0; padding: 0; min-width: 0; }
.x-body .ha-row { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 16px 0; border-bottom: 1px solid var(--ui-line, #f2f4f6); }
.x-body .ha-row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.x-body .ha-row-txt > * { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-body .ha-row-name { font: 700 17px/1.42 var(--ui-font, inherit); letter-spacing: -.02em; color: var(--ui-ink, #191f28); }
.x-body .ha-more { margin-top: 16px; font-weight: 600; }
.x-body .ha-more-n { margin-left: 6px; color: var(--ui-ink-3, #8b95a1); font-weight: 500; }

/* 회사 정보(스테이지 .ch-company 그대로 · 간격만) */
.x-body .ha-foot { margin-top: 48px; padding-bottom: 20px; }

/* 아래 고정 = 견적 한 번에 받기 */
.x-body .ha-bar { position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 16px; margin: 8px calc(var(--ui-gutter, 20px) * -1) 0; padding: 12px var(--ui-gutter, 20px) calc(12px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -8px 24px rgba(0, 27, 55, .06); }
.x-body .ha-bar-sum { display: none; }
.x-body .ha-cta { flex: 1; min-width: 0; }
.x-body .ha-cta-n, .x-sheet .ha-cta-n { display: inline-block; margin-left: 8px; min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .22); color: #fff; font: 700 14px/24px var(--ui-font, inherit); text-align: center; box-sizing: border-box; }
.x-sheet .ha-cta-n[hidden] { display: none; }

/* 761 이상 */
@media (min-width: 761px) {
  .x-body .ha-ban { height: 236px; border-radius: 24px; }
  .x-body .ha-ban-copy { left: 36px; top: 36px; bottom: 32px; }
  .x-body .ha-ban-t { font-size: 30px; line-height: 1.32; }
  .x-body .ha-ban-btn { height: 44px; padding: 0 18px; font-size: 15px; }
  .x-body .ha-shot { right: 48px; top: 30px; width: 200px; height: 300px; border-radius: 20px; }
  .x-body .ha-shot img { margin-top: -32px; }
  .x-body .ha-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .x-body .ha-tile-name { font-size: 15px; }
  .x-body .ha-pt-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; overflow: visible; margin: 0; padding: 0; }
  .x-body .ha-pt { flex: none; padding: 22px 22px 20px; }
  .x-body .ha-more { width: -moz-fit-content; width: fit-content; min-width: 240px; margin: 20px auto 0; }
  .x-body .ha-bar { padding-top: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); justify-content: flex-end; }
  .x-body .ha-bar-sum { display: inline-flex; align-items: baseline; gap: 6px; margin-right: auto; font: 500 15px/1.4 var(--ui-font, inherit); color: var(--ui-ink-2, #4e5968); }
  .x-body .ha-bar-sum b { font: 700 17px/1.4 var(--ui-font, inherit); color: var(--ui-ink, #191f28); }
  .x-body .ha-cta { flex: none; min-width: 340px; }
}

/* 1101 이상(LNB 있음) = 배너 옆 바로가기 2x2 · 목록 두 칸 */
@media (min-width: 1101px) {
  .x-body .ha-bar { margin: 8px -32px 0; padding-left: 32px; padding-right: 32px; }
  .x-body .ha-free--top { display: flex; flex: none; margin: 0 0 0 auto; }
  .x-body .ha-free--mid { display: none; }
  .x-body .ha-top { grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: stretch; }
  .x-body .ha-ban { height: auto; min-height: 216px; }
  .x-body .ha-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; gap: 4px; padding: 8px; border-radius: 24px; box-shadow: inset 0 0 0 1px var(--ui-line-strong, #e5e8eb); }
  .x-body .ha-tile { padding: 6px 4px; }
  .x-body .ha-sec { margin-top: 28px; }
  .x-body .ha-pt { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 20px; padding: 18px 20px 18px 24px; }
  .x-body .ha-pt .ha-pick.ui-btn--block { width: auto; min-width: 112px; }
  .x-body .ha-tile:hover { background: var(--ui-press, rgba(2, 32, 71, .05)); }
  .x-body .ha-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
}

/* 1101~1279 = 배너가 좁아 앱 화면 조각이 제목을 덮지 않게(바로가기 칸 · 조각 줄임) */
@media (min-width: 1101px) and (max-width: 1279px) {
  .x-body .ha-top { grid-template-columns: minmax(0, 1fr) 320px; }
  .x-body .ha-shot { right: 28px; width: 156px; height: 260px; border-radius: 18px; }
  .x-body .ha-shot img { margin-top: -25px; }
}

/* 좁은 화면 = 탭 메뉴(가로 메뉴) 아래로 스크롤 자리 */
@media (max-width: 1100px) {
  .x-body .ha-near { scroll-margin-top: calc(var(--sw-top, 76px) + 66px); }
}

/* ---------- 시트 ---------- */
/* 사업장 */
.x-sheet .ha-sites { list-style: none; margin: 0; padding: 0; }
.x-sheet .ha-site-row { -webkit-appearance: none; appearance: none; border: 0; cursor: pointer; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px 12px 18px; border-radius: 16px; background: var(--ui-brand-tint, #f4f0ff); color: var(--ui-ink, #191f28); font: inherit; text-align: left; }
.x-sheet .ha-site-txt { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.x-sheet .ha-site-txt b { flex: none; font: 700 17px/1.4 var(--ui-font, inherit); }
.x-sheet .ha-site-txt span { min-width: 0; font: 400 15px/1.4 var(--ui-font, inherit); color: var(--ui-ink-2, #4e5968); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-sheet .ha-site-on { flex: none; display: flex; color: var(--ui-brand, #4c00ff); }

/* 무료 위험성평가표 받기 */
.x-sheet .ha-rk-label { display: flex; align-items: center; gap: 6px; margin: 20px 0 8px; font: 600 15px/1.4 var(--ui-font, inherit); color: var(--ui-ink, #191f28); }
.x-sheet .ha-rk > .ha-rk-label:first-child { margin-top: 6px; }
.x-sheet .ha-rk-label b { color: var(--ui-brand, #4c00ff); }
.x-sheet .ha-rk-add { display: flex; gap: 8px; min-width: 0; }
.x-sheet .ha-rk-add .ui-input { flex: 1; }
.x-sheet .ha-rk-add .ui-btn { flex: none; min-width: 76px; }
.x-sheet .ha-rk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.x-sheet .ha-rk-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 2px 0 16px; border-radius: 14px; background: var(--ui-brand-tint, #f4f0ff); color: var(--ui-ink, #191f28); font: 500 16px/1.4 var(--ui-font, inherit); }
.x-sheet .ha-rk-list li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 견적 한 번에 받기 = 고른 곳 */
.x-sheet .ha-qs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.x-sheet .ha-q { -webkit-appearance: none; appearance: none; border: 0; cursor: pointer; width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--ui-line-strong, #e5e8eb); color: var(--ui-ink, #191f28); font: inherit; text-align: left; }
.x-sheet .ha-q[aria-pressed=true] { background: var(--ui-brand-tint, #f4f0ff); box-shadow: inset 0 0 0 2px var(--ui-brand, #4c00ff); }
.x-sheet .ha-q-box { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 2px var(--ui-line-strong, #e5e8eb); color: transparent; display: grid; place-items: center; }
.x-sheet .ha-q[aria-pressed=true] .ha-q-box { background: var(--ui-brand, #4c00ff); box-shadow: none; color: #fff; }
.x-sheet .ha-q-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.x-sheet .ha-q-txt > * { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-sheet .ha-q-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.x-sheet .ha-q-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 16px/1.45 var(--ui-font, inherit); }
.x-sheet .ha-q-chip { flex: none; }

@media (prefers-reduced-motion: reduce) {
  .x-body .ha-ban-btn, .x-body .ha-tile-ic { transition: none; }
}
