/* ================= 모바일 최적화 레이어 =================
   ≤900px 에서만 적용. 데스크톱 레이아웃은 건드리지 않는다. */

@media (max-width: 900px) {

  /* ---------- 헤더: 로고 + 햄버거만 남긴다 ---------- */
  /* 언어 선택: 모바일 우상단 컴팩트 표시 */
  header .right .langs { display: flex; gap: 0; font-size: 12px }
  header .right .langs span { display: none }
  header .right .langs button { padding: 12px 5px; letter-spacing: 0; min-width: 32px }
  header .right .langs button.on { opacity: 1; font-weight: 700 }
  header .right .btn-ghost { display: none }      /* 문의는 하단 고정 바가 담당 */
  header .nav { padding-top: 6px; padding-bottom: 6px }
  header .logo { font-size: 15px }
}
/* 좁은 폰(≤400px): 로고+언어 5개+버거가 폭을 넘겨 버거가 잘렸다 */
@media (max-width: 400px) {
  header .right .langs { font-size: 11px }
  header .right .langs button { min-width: 26px; padding: 12px 2px }
  header .logo { font-size: 13px; gap: 8px }
  header .logo img { width: 26px; height: 26px }
}

@media (max-width: 900px) {

  /* ---------- 히어로 ---------- */
  .hero { padding: 96px 0 40px; min-height: 100svh; min-height: 100lvh }
  .hero .h-display { font-size: clamp(27px, 7.8vw, 40px); line-height: 1.18 }
  .hero .lead { font-size: 15px; line-height: 1.7 }
  .hero .hint { display: none }
  /* 국가 텍스트 티커: 국기 스트립과 중복이라 모바일에선 숨김 */
  .marq { display: none }
  /* 모바일은 컷 전환이 없으므로 인물이 크게 보이는 미디엄 컷을 쓴다 */
  #v1 { opacity: 0 }
  #v2 { opacity: 1 }
  #v2 { object-position: 62% 45% }
  /* 대시보드는 맛보기만: 높이를 잘라 아래를 페이드 처리 */
  .hero #dash {
    margin-top: 28px;
    max-height: 300px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 66%, transparent);
    mask-image: linear-gradient(180deg, #000 66%, transparent);
  }
  .hero #dash .dash { transform: none !important }

  /* ---------- 타이포 ---------- */
  .h2, .sechead .h2 { font-size: clamp(24px, 6.6vw, 30px); line-height: 1.28 }
  .lead { font-size: 15.5px }
  .rich p { font-size: 15.5px; line-height: 1.75 }
  .kicker { font-size: 11px }

  /* 스크럽 애니메이션이 없는 환경에서 회색으로 남는 것 방지 */
  #stmt .w { color: var(--ink) !important; opacity: 1 !important }
  #stmt .w.hi { color: var(--brand) !important }

  /* ---------- 섹션 여백 ---------- */
  section.pad { padding: 56px 0 }
  .sechead { margin-bottom: 32px }
  .wrap { padding-left: 20px; padding-right: 20px }

  /* ---------- 깔때기: 라벨을 위로 올려 줄바꿈 방지 ---------- */
  .fr { grid-template-columns: 1fr auto; grid-template-areas: "lb v" "bar bar"; gap: 6px 10px; margin-bottom: 14px }
  .fr .lb { grid-area: lb; font-size: 12.5px }
  .fr b, .fr > *:last-child { grid-area: v; text-align: right; font-size: 13px }
  .fr .bar { grid-area: bar; height: 16px }

  /* ---------- 위임 표: 세로 스택 ---------- */
  .dele { grid-template-columns: 1fr; gap: 12px }

  /* ---------- 카드/타일 ---------- */
  .tile { padding: 24px 22px; border-radius: 16px }
  .tier { padding: 26px 22px }
  .tier .amt { font-size: 34px }
  .frame { padding: 20px; border-radius: 16px }
  .cta { padding: 40px 24px; border-radius: 18px }

  /* ---------- 프로세스: 번호를 제목 위로 ---------- */
  .flow .it { padding: 20px 0 }
  .flow .it .n { font-size: 11px }
  .flow .it h3 { font-size: 17px }
  .flow .it p { font-size: 14.5px }

  /* ---------- 통계 ---------- */
  .stats { gap: 18px 14px }
  .stat b { font-size: clamp(26px, 8vw, 34px) }

  /* ---------- 폼: iOS 자동 확대 방지 (16px 미만이면 확대됨) ---------- */
  .form input, .form select, .form textarea { font-size: 16px; padding: 15px 14px }
  .form label { font-size: 13.5px }

  /* ---------- 터치 타깃 최소 44px ---------- */
  .more, .faq summary, .drawer .flat a, .fcols a { min-height: 44px; display: flex; align-items: center }
  .drawer a.row { min-height: 44px; display: block; padding: 12px 0 }
  .drawer a.row b { display: flex; align-items: center; flex-wrap: wrap; gap: 0 }
  .drawer a.row > span { display: block; margin-top: 3px }
  .fcols a { padding: 3px 0 }
  .btn-solid { min-height: 46px; display: inline-flex; align-items: center; justify-content: center }

  /* ---------- 푸터 ---------- */
  .fcols { grid-template-columns: 1fr 1fr; gap: 28px 20px }
  .fcols > div:first-child { grid-column: 1 / -1 }
  .fbot { flex-direction: column; gap: 6px; align-items: flex-start; font-size: 11px; line-height: 1.6 }

  /* 하단 고정 바에 가리지 않도록 여백 확보 */
  body { padding-bottom: 84px }
  footer { padding-bottom: 24px }

  /* ---------- 홈 전용 ---------- */
  .doors { grid-template-columns: 1fr; gap: 14px }
  .gantt { overflow-x: auto; -webkit-overflow-scrolling: touch }
  .screens { display: none }        /* 핀 섹션 화면 교체는 모바일에서 미사용 */
}

/* ---------- 아이폰 노치·홈바 대응 ---------- */
@supports (padding: max(0px)) {
  @media (max-width: 900px) {
    .drawer { padding-bottom: max(60px, calc(env(safe-area-inset-bottom) + 40px)) }
    .wrap { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)) }
  }
}

/* ---------- 아주 작은 화면 ---------- */
@media (max-width: 360px) {
  .hero .h-display { font-size: 27px }
  .tier .amt { font-size: 30px }
}

/* ---------- 가로 모드 ---------- */
@media (max-width: 900px) and (orientation: landscape) {
  .hero { min-height: 100svh; min-height: 100lvh; padding: 72px 0 24px }
  .hero #dash { max-height: 200px }
}

/* ---------- 드로어 안 언어 전환 ---------- */
.drawer .dlangs { display: flex; gap: 8px; margin-top: 26px }
.drawer .dlangs button {
  flex: 1; padding: 13px 0; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: var(--mute); cursor: pointer;
}
.drawer .dlangs button.on { border-color: var(--brand); color: var(--brand); background: rgba(79, 124, 255, .06) }

/* bottom contact bar -> floating pill (keeps headlines readable) */
@media (max-width: 900px) {
}

/* touch targets ≥40px on mobile */
@media (max-width: 700px) {
  .edup-m { min-height: 44px }
  header .right .langs button { padding: 14px 5px }
  .phero .crumb a { display: inline-block; padding: 14px 0; margin: -14px 0 }
  /* 탭 타깃 보강 (2026-09-05) — 보이는 위치는 그대로, 히트영역만 확장 */
  header .logo { padding: 8px 0 }
  .finfo span a { display: inline-block; padding: 13px 0; margin: -13px 0 }
  .fbot .flgl a { padding: 14px 0; margin: -14px 0 }
  .who-card a, .teamgrow a { display: inline-block; padding: 11px 0 }
  .kdt-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 11px 0 }
}

/* 터치 태블릿(≤1024px): 44px 탭 타깃을 모바일과 같은 값으로 맞춘다.
   ≤700px 블록에만 있어서 701~1024px(아이패드 세로 등)이 비어 있었다.
   마우스 사용자도 헤더 높이 68px 안에 들어가므로 레이아웃은 그대로다. */
@media (max-width: 1024px) {
  header .logo { padding: 8px 0 }
  header .right .langs button { padding: 14px 5px }
  header .right .btn-ghost { display: inline-flex; align-items: center; min-height: 44px }
  .phero .crumb a { display: inline-block; padding: 14px 0; margin: -14px 0 }
  .more, .faq summary, .fcols a, .finfo a { min-height: 44px; display: flex; align-items: center }
  .fbot .flgl a { display: inline-block; padding: 14px 0; margin: -14px 0 }
  .kdt-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 11px 0 }
}

/* 2026-10-02 UI 점검: 폰에서 좌하단 챗봇 버튼이 푸터 마지막 줄(©·개인정보처리방침)을 덮지 않게 */
@media (max-width:700px){footer{padding-bottom:92px}}
