/* 2026-10-03 모바일 하단 메뉴. PC 오른쪽 플로팅 메뉴(전화·카카오톡·유튜브·인스타그램·의학백과·TOP)를 모바일 맨 아래 메뉴로 펼치고,
   그 위 한 줄에 왼쪽 '빠른 상담신청', 오른쪽 '챗봇' 버튼을 반씩 둔다. HTML·스크립트는 그대로 두고 표시 방식만 바꾼다.
   가로로 눕힌 낮은 화면(높이 500px 이하)은 기존 배치를 그대로 쓴다. */
@media (max-width: 768px) and (min-height: 501px) {
  :root {
    --mobile-dock-height: 58px;
    --mobile-dock-row: 48px;
    --mobile-dock-stack: calc(var(--mobile-dock-height) + var(--mobile-dock-row) + 20px);
  }
  /* 맨 아래 메뉴 */
  .floating-actions {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 44;
    display: grid;
    width: auto;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding-bottom: env(safe-area-inset-bottom);
    border: 0;
    border-top: 1px solid rgba(30, 40, 38, 0.12);
    border-radius: 0;
    box-shadow: 0 -10px 28px rgba(18, 49, 42, 0.1);
    transform: none;
  }
  .floating-action,
  .floating-action--top {
    min-width: 0;
    min-height: var(--mobile-dock-height);
    gap: 0.28rem;
    padding: 0.4rem 0.15rem;
    border-right: 1px solid rgba(30, 40, 38, 0.08);
    border-bottom: 0;
    font-size: 0.62rem;
    line-height: 1.18;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
  .floating-action:last-child {
    border-right: 0;
  }
  .floating-action svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
  }
  /* 메뉴 위 한 줄: 왼쪽 빠른 상담신청 */
  .global-consult-bar {
    right: auto;
    bottom: calc(var(--mobile-dock-height) + 10px + env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    width: calc(50% - 16px);
  }
  .global-consult-bar__inner {
    position: relative;
    min-height: var(--mobile-dock-row);
    justify-content: center;
    gap: 0.5rem;
    padding: 0 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(25, 18, 14, 0.28);
  }
  .global-consult-bar__pitch {
    min-width: 0;
    margin-right: 0;
  }
  .global-consult-bar__pitch-icon {
    display: grid;
    width: 28px;
    height: 28px;
  }
  .global-consult-bar__pitch strong {
    font-size: 0.86rem;
    line-height: 1.15;
    text-wrap: balance;
  }
  .global-consult-bar__contact {
    display: none;
  }
  /* 알약 전체가 눌리도록 '상담 신청하기' 버튼을 투명 덮개로 쓴다(화면 글자는 숨기고 읽기 이름은 그대로) */
  .global-consult-bar__actions {
    position: static;
  }
  .global-consult-bar__trigger,
  .global-consult-bar__trigger:hover,
  .global-consult-bar__trigger:active {
    position: absolute;
    inset: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    box-shadow: none;
    color: transparent;
    font-size: 0;
    transform: none;
  }
  .global-consult-bar__trigger svg {
    display: none;
  }
  .global-consult-bar__trigger:focus-visible {
    outline: 2px solid #cda775;
    outline-offset: 3px;
  }
  /* 메뉴 위 한 줄: 오른쪽 챗봇 */
  .chatbot-fab,
  body.has-global-consult-bar .chatbot-fab {
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(var(--mobile-dock-height) + 10px + env(safe-area-inset-bottom));
    width: calc(50% - 16px);
    height: var(--mobile-dock-row);
    min-height: var(--mobile-dock-row);
    justify-content: center;
    gap: 0.45rem;
    padding: 0 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    line-height: 1.15;
  }
  .chatbot-fab > span {
    display: inline;
    min-width: 0;
    text-wrap: balance;
  }
  .chatbot-fab > i {
    display: inline-block;
    flex: 0 0 auto;
  }
  .chatbot-fab > svg {
    flex: 0 0 auto;
  }
  /* 열린 상담 창은 맨 아래 메뉴 위로 */
  .global-consult-panel {
    bottom: calc(var(--mobile-dock-height) + 8px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - var(--mobile-dock-height) - 24px - env(safe-area-inset-bottom));
  }
  /* 챗봇 창이 열리면 하단 메뉴도 숨긴다(기존 상담 바와 같은 처리, 창 가장자리로 비치지 않게) */
  body.chat-open .floating-actions {
    visibility: hidden;
    pointer-events: none;
  }
  /* 페이지 끝 내용이 버튼에 가리지 않게 */
  body.has-global-consult-bar,
  body:has(.floating-actions) {
    padding-bottom: calc(var(--mobile-dock-stack) + env(safe-area-inset-bottom));
  }
  /* 홈 첫 화면 영상 재생 버튼 */
  .home-video-hero__playback {
    bottom: calc(var(--mobile-dock-stack) + 12px + env(safe-area-inset-bottom));
  }
  /* 영어·일본어·중국어: 글자가 길어 하단 칸은 두 줄 안에, 챗봇 글자는 두 줄로 */
  html[lang="en"] .floating-action,
  html[lang="ja"] .floating-action,
  html[lang="zh-CN"] .floating-action {
    gap: 0.22rem;
    padding: 0.35rem 0.1rem;
    font-size: 0.56rem;
    letter-spacing: -0.01em;
  }
  html[lang="en"] .floating-action {
    font-size: 0.54rem;
  }
  html[lang="en"] .floating-action > span {
    overflow-wrap: normal;
  }
  html[lang="en"] .chatbot-fab > i,
  html[lang="ja"] .chatbot-fab > i,
  html[lang="zh-CN"] .chatbot-fab > i {
    display: none;
  }
  html[lang="en"] .chatbot-fab,
  html[lang="ja"] .chatbot-fab,
  html[lang="zh-CN"] .chatbot-fab,
  html[lang="en"] body.has-global-consult-bar .chatbot-fab,
  html[lang="ja"] body.has-global-consult-bar .chatbot-fab,
  html[lang="zh-CN"] body.has-global-consult-bar .chatbot-fab {
    padding: 0 0.6rem;
    font-size: 0.68rem;
  }
  html[lang="en"] .global-consult-bar__pitch strong,
  html[lang="ja"] .global-consult-bar__pitch strong,
  html[lang="zh-CN"] .global-consult-bar__pitch strong {
    font-size: 0.76rem;
  }
}
@media (max-width: 380px) and (min-height: 501px) {
  .chatbot-fab > i {
    display: none;
  }
  .chatbot-fab,
  body.has-global-consult-bar .chatbot-fab {
    padding: 0 0.7rem;
    font-size: 0.78rem;
  }
  .global-consult-bar__inner {
    padding: 0 0.7rem;
  }
  .global-consult-bar__pitch-icon {
    width: 24px;
    height: 24px;
  }
  .global-consult-bar__pitch strong {
    font-size: 0.82rem;
  }
}
/* 첫 화면 '상담 신청' 버튼: .ps-page a 의 색 상속 때문에 글자가 버튼 배경색(진갈색)에 묻히던 문제. NPT·뉴럴리셋·통증재생, 모든 언어(탈모는 원래 별도 색). */
:is(.ps-page--npt, .ps-page--neural-reset, .ps-page--regenerative) .ps-hero .ps-button--solid {
  color: #fff;
}
/* 통증·재생 '재생주사가 필요한 이유'에서 비교표를 뺀 뒤 제목 묶음만 남을 때 아래 여백 정리 */
.ps-page--regenerative .ps-container > .ps-heading:only-child {
  margin-bottom: 0;
}
