/*
 * mobile_fix_20261128.css — 휴대폰 폭(≤767px)에서만 적용. PC 표시는 바꾸지 않는다.
 * 근거: docs/en_market_research_20261028/mobile_20261128/measure.json (iPhone 13 에뮬 실측)
 * 연결: includes/common_header.php 의 <header ...> 바로 앞에 <link> 1줄(배포 메모 참조).
 * 롤백: 그 <link> 1줄 삭제.
 */
@media (max-width: 767px) {
  /* 1) 블로그 본문 긴 URL(사진 출처 링크)이 줄바꿈되지 않아 문서 폭 390→807px 로 가로 넘침 */
  .article-content p,
  .article-content li,
  .article-content blockquote,
  .article-content dd {
    overflow-wrap: break-word;
  }
  .article-content li > a,
  .article-content p > a {
    word-break: break-word;
  }

  /* 2) 목차(#sec-N) 이동 시 제목이 고정 헤더(80px) 밑에 숨지 않게 */
  .article-content [id^="sec-"] {
    scroll-margin-top: 88px;
  }

  /* 3) 차량 상세 보험 카드: 제목 nowrap 강제로 "NOC Coverage (Non-Operation Charge Waiver)" 가 잘림 */
  .insurance-card.insurance-card h4 {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  /* 4) 탭 영역 40px 미만 보정 */
  #lang-dropdown-btn {
    min-height: 40px;
  }
  .vehicle-card-mobile .flex.gap-2.mt-auto > .flex-1 {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .popular-tab-btn {
    min-height: 40px;
  }
  a.rc-rail-more {
    display: inline-block;
    padding: 10px 0;
  }
}

/* ===== 2026-11-29 round5 — 모든 화면 폭(PC 포함). 근거: docs/en_market_research_20261028/round5_20261129/D_pages.md D3·D4·D5
 *   배포 전 시험: B 실페이지에 이 CSS 를 주입해 측정(stage/tools/cls_probe.mjs·top_probe.mjs·golf_probe.mjs).
 *   롤백: 이 구역 삭제(또는 common_header.php 의 ?v= 를 되돌림). ===== */

/* D3) 챗 어시스턴트 말풍선이 처음 뜰 때(약 3초 후) 런처 상자가 넓어지며 아바타 버튼이 옆으로 이동 → CLS.
 *     말풍선을 흐름 밖(absolute)으로 빼서 런처 상자 = 버튼 크기로 고정. 말풍선이 보이는 위치는 같다(버튼 왼쪽 10px·아래 여백 유지). */
#okd-assist .okd-bubble {
  position: absolute;
  right: calc(100% + 10px);
  bottom: 0;
  width: max-content;
}

/* D5) 푸터가 보일 때 assistant/widget.php 의 스크립트가 «맨 위로» 버튼 bottom 을 (처음 읽은 bottom + 들어올린 양)으로
 *     inline !important 로 덮는데, 처음 읽은 값이 4rem 이라 버튼이 아바타(132px) 뒤로 내려가 클릭이 안 됐다(실측).
 *     bottom 은 4rem 로 두고 띄우는 양을 margin-bottom 으로 옮긴다 → 스크립트가 bottom 을 바꿔도 간격(6.3rem / 2rem)이 유지된다.
 *     위젯이 있는 페이지만(:has 미지원 브라우저는 종전대로). */
body:has(#okd-assist) #scrollToTopBtn {
  bottom: 4rem !important;
  margin-bottom: 6.3rem;
}
@media (max-width: 480px) {
  body:has(#okd-assist) #scrollToTopBtn {
    bottom: 4rem !important;
    margin-bottom: 2rem;
  }
}

/* D4) 골프 상세 머리글(«From Naha Airport approx. 55~100min»)이 사이트 헤더용 규칙
 *     (header .flex.items-center span { nowrap; ellipsis; max-width 150~300px })을 물려받아 잘렸다. 이 머리글만 풀어 준다. */
header.mb-5 > .flex.items-center > span {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}
