/* mobile.css — 휴대폰 화면 보완(대표님 2026-12-01 "PC는 완성도가 높은데 모바일은 디자인이 안 맞는다. 뺄 건 빼고, 꼭 보여줘야 할 페이지는 구성·디자인 보완")
   원칙
   - PC(폭 700 이상)는 1px도 바꾸지 않는다: 이 파일의 규칙은 모두 폭 700 미만(@media max-width: 699.98px) 안에 있다.
     예외 두 가지: ① .mo(휴대폰 전용 요소)를 폭 700 이상에서 숨기는 규칙 ② 휴대폰 메뉴(.mm)는 폭 1100 미만에서만 열리므로 그 안의 모양.
   - 내용(문장·가격·사진)은 바꾸지 않는다. 배치·크기·숨김·접기만.
   - 토큰 하나: 누르는 곳 44px(--m-tap) · 가장 작은 글자 13px(--m-fs-min) · 본문 16px · 섹션 위 64 / 아래 72.
   - 접기는 motion.js 의 '휴대폰 접기'가 .mf-hide 를 붙이고 [더 보기] 버튼(.mf-btn)을 넣는다. */

@media (min-width: 700px) { .mo, .mf-btn { display: none !important; } }

/* ===== 휴대폰 메뉴(폭 1100 미만에서만 열림 · PC 메뉴는 그대로 영어) ===== */
@media (max-width: 1099.98px) {
  .mm[open] { display: flex; flex-direction: column; padding-bottom: 0; overflow-y: auto; }
  .mm__top { flex: none; }
  .mm__h { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
  .mm__x { width: 44px; height: 44px; margin-right: -4px; }
  .mm__x span { left: 11px; top: 21px; }
  .mm__quick { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 20px; }
  .mm__quick a { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 4px 6px; border: 1px solid #000; font-size: 15px; font-weight: 600; text-align: center; line-height: 1.3; word-break: keep-all; overflow-wrap: anywhere; min-width: 0; }
  .mm__quick li:first-child a { background: #000; color: #fff; }
  .mm .mm__en { font-family: var(--kr); text-transform: none; letter-spacing: -0.02em; font-size: 18px; font-weight: 600; padding: 0; min-height: 56px; display: flex; align-items: center; justify-content: space-between; }
  .mm summary .mm__en::after { float: none; font-family: var(--en); font-size: 22px; }
  .mm details li a { display: flex; align-items: center; min-height: 44px; padding: 0; font-size: 16px; }
  .mm__list { flex: 1 0 auto; }
  .mm__act { position: sticky; bottom: 0; flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -1px 0 #e5e5e5; }
  .mm__act .btn { height: 52px; width: 100%; font-size: 15px; }
}

@media (max-width: 699.98px) {
  :root { --m-tap: 44px; --m-fs-min: 13px; --sec-t: 56px; --sec-b: 56px; --gap-body: 24px; }

  /* ---------- 접기(motion.js) ---------- */
  .mf-hide { display: none !important; }
  .mf-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: calc(100% - var(--gut) * 2); max-width: 100%; min-height: 52px; margin: 24px auto 0; padding: 0 18px; border: 1px solid #000; background: #fff; color: #000; font-size: 16px; font-weight: 600; text-align: left; }
  .wrap .mf-btn, .mf-btn:only-child, .ft__in > .mf-btn, .csys > .mf-btn, .bx-ptour__eq > .mf-btn, #d-price > .mf-btn { width: 100%; }
  .ft__in > .mf-btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); margin-top: 8px; }
  .mf-btn__i { font-family: var(--en); font-size: 22px; font-weight: 300; line-height: 1; }

  /* ---------- 누르는 곳 44px (P0-5) ---------- */
  .btn { min-height: var(--m-tap); }
  .hd__menu, .hd__menu.m-only { width: var(--m-tap); height: var(--m-tap); margin-right: -6px; }
  .hd .btn--xs, .hd .dhd__cta { display: none !important; } /* 같은 예약 버튼은 아래 고정 바 하나로(P1-2) */
  .hd__logo { min-height: var(--m-tap); }
  .lsw summary { min-height: var(--m-tap); min-width: var(--m-tap); justify-content: center; padding: 0 8px; }
  .lsw__m a { min-height: var(--m-tap); display: flex; align-items: center; }
  .chip { height: var(--m-tap) !important; min-width: var(--m-tap); padding: 0 16px; }
  .ftn { height: var(--m-tap) !important; min-width: var(--m-tap); }
  .fts { min-height: var(--m-tap); display: inline-flex !important; align-items: center; }
  .ft__cols ul li a { display: flex; align-items: center; min-height: var(--m-tap); }
  .ft__cols ul { gap: 0 !important; }
  .ft__legal .ft__links { flex-wrap: wrap; gap: 0 20px !important; }
  .ft__legal .ft__links a { display: inline-flex; align-items: center; min-height: var(--m-tap); min-width: var(--m-tap); }
  .ft__logo { display: inline-flex; align-items: center; min-height: var(--m-tap); }
  .ftp__a, .ftp__go a { display: inline-flex; align-items: center; min-height: var(--m-tap); }
  .skip:focus { min-height: var(--m-tap); }
  .hero__pause { width: var(--m-tap) !important; height: var(--m-tap) !important; }
  .drail__arrow { width: var(--m-tap) !important; height: var(--m-tap) !important; }
  /* 글자 링크: 줄 높이는 그대로 두고 누르는 면적만 위아래로 넓힌다 */
  .link, .ppl__go, a.post__back, .brand__go, .thero__branch, .bcard__name a, .ppl__n a, .tbr__name a, .ladder__go a, .media__cta a { padding-block: 14px; }
  p.more .link, .media__cta .link, .ppl__go, a.post__back, p.post__back .link, .sx__back .link, .stories__note .link, .tbr__links .link, .bx-trial__n .link, .bx-steps__m .link { display: inline-flex; align-items: center; min-height: var(--m-tap); padding-block: 0; }
  .jcat a, .jxchip button, .sx__chip, .nwcat__a, .jxf, .jxg__r, .jxr__all, #storysnd, select { min-height: var(--m-tap) !important; }
  .jxr__x { min-width: var(--m-tap); min-height: var(--m-tap); }
  /* 칼럼 거르기 체크칸: 줄 전체를 누르는 칸으로(진짜 체크칸은 줄 위에 투명하게 겹친다) */
  .jxg label { position: relative; min-height: var(--m-tap); display: flex !important; align-items: center; gap: 10px; }
  .jxg label input { position: absolute; inset: 0; width: 100% !important; height: 100% !important; margin: 0; opacity: 0; z-index: 1; cursor: pointer; }
  .jxg label .jxg__l::before { content: ""; display: inline-block; width: 20px; height: 20px; margin-right: 10px; vertical-align: -4px; border: 1.5px solid #000; background: #fff; }
  .jxg label:has(input:checked) .jxg__l::before { background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center / 18px no-repeat; }
  .jxg label:has(input:focus-visible) { outline: 2px solid #000; outline-offset: 2px; }
  .apply__agree { position: relative; min-height: var(--m-tap); }
  .apply__agree input { width: var(--m-tap) !important; height: var(--m-tap) !important; margin: 0 4px 0 -12px !important; flex: none; }

  /* ---------- 13px 미만 글자 0 (P0-6) ---------- */
  .label, .tcard__level, .ft__h, .ft__since, .bx-seal, .jxc__tag, .jxc__m, .jxg .tnum, .jcat .tnum, .lsw summary, .lsw summary span, .pr__o, .pr__d, .evc__m, .nw__c, .nw__d, .dig__m, .sx__m, .sx__play,
  .prog__k, .colist__k, .csplit small, .tuit__fam, .guide__n, .apply__f em, .apply__agree span, .cv3__k, .ppl__role, .ppl__g, .intl__k, .dlv__k, .dlv__c, .dhx__run, .d50__cap, .fd__role, .nwhl__k,
  .ig__k, .brand__k, .story__k, .jxs__k, .mq__eye, .colist__aud, .post table th { font-size: var(--m-fs-min) !important; }
  .tcard__level { height: auto !important; min-height: 24px; padding: 2px 8px !important; }

  /* ---------- 섹션 리듬(P1-1) ---------- */
  .cta { padding-top: 56px; padding-bottom: 56px; }

  /* ---------- 홈: 영상 → 지점 → 트레이너 찾기 → 가격 한 줄 → 칼럼 → 나머지 (보완안) ---------- */
  main#top:has(> .hero) { display: flex; flex-direction: column; }
  main#top:has(> .hero) > *, main.sub-page:has(> #tuition):has(> #level) > *, body.dp--branch main#main > *, main.sub-page:has(> .jx) > * { width: -webkit-fill-available; width: stretch; flex: none; } /* 세로 줄 세우기에서 margin:auto 상자가 좁아지지 않게 */
  main#top:has(> .hero) > * { order: 50; }
  main#top:has(> .hero) > .hero { order: 0; }
  main#top:has(> .hero) > #branches { order: 1; }
  main#top:has(> .hero) > #trainers { order: 2; }
  main#top:has(> .hero) > #m-price { order: 3; }
  main#top:has(> .hero) > #column { order: 4; }
  main#top:has(> .hero) > #experience { order: 5; }
  main#top:has(> .hero) > #guide { order: 6; }
  main#top:has(> .hero) > #more { order: 7; }
  main#top:has(> .hero) > #faq { order: 8; }
  main#top:has(> .hero) > #visit { order: 9; }
  main#top:has(> .hero) > .cta { order: 10; }
  #in-motion, #map, #ladder, #media, main#top:has(> .hero) > #column .jcat { display: none !important; } /* 후보 1·2·3·4 */
  #column .colist__i:nth-child(n+4) { display: none; } /* 칼럼 3개 + 아래 '칼럼 전체 보기' */
  #column .colist { grid-template-columns: 1fr !important; }
  .mprice { background: #f2f2f2; padding-left: var(--gut) !important; padding-right: var(--gut) !important; }
  .mprice > * { margin-left: 0 !important; margin-right: 0 !important; }
  .mprice__t { margin-top: 12px; font-size: 20px; line-height: 1.45; letter-spacing: -0.02em; }
  .mprice__t b { font-weight: 600; }
  .mprice__t span { display: block; font-size: 15px; color: #5E5E5E; }
  .mprice__go { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 12px; }
  .mprice__go .link { display: inline-flex; align-items: center; min-height: var(--m-tap); padding-block: 0; font-size: 16px; }

  /* 홈 카드 줄(P0-3): 흐름은 motion.js 에서 껐다. 카드 단위로 서고, 첫 카드는 여백 안에 온전히 */
  #branches .rail, #trainers .rail { scroll-snap-type: x mandatory !important; scroll-behavior: smooth; }
  #branches .rail > li, #trainers .rail > li { scroll-snap-align: start; scroll-snap-stop: always; }
  #branches .bcard { width: calc(100vw - var(--gut) * 2 - 40px); max-width: 340px; }

  /* ---------- 트레이너 목록(P0-7): 첫 화면에 선생님 4명 ---------- */
  main.sub-page > #trainers.page-grid { padding-top: 0 !important; }
  main.sub-page > #trainers.page-grid > .h2en, main.sub-page > #trainers.page-grid > .sub, main.sub-page > #trainers.page-grid > .mbanner { display: none !important; }
  main.sub-page:has(> #trainers.page-grid) > .phero { padding-top: 24px !important; padding-bottom: 8px !important; }
  main.sub-page:has(> #trainers.page-grid) .phero__k { display: none; }
  main.sub-page:has(> #trainers.page-grid) .phero__t { font-size: 26px !important; line-height: 1.3 !important; }
  main.sub-page:has(> #trainers.page-grid) .phero__lead { display: none; }
  #trainers.page-grid > .chips--scroll { position: sticky; top: 64px; z-index: 20; margin: 0 !important; width: 100%; padding: 10px var(--gut) !important; background: #fff; box-shadow: 0 1px 0 #e5e5e5;
    -webkit-mask: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  #trainers.page-grid .rail { padding-top: 16px !important; row-gap: 24px !important; }
  #trainers.page-grid .tcard .cv3, #trainers.page-grid .tcard .bx-more-btn { display: none !important; }
  #trainers.page-grid .tcard .tcard__name { margin-top: 10px !important; font-size: 17px !important; }
  #trainers.page-grid .tcard .meta { margin-top: 2px !important; }

  /* ---------- PT(P0-1): 머리말 → 가격 → 첫 3회 → 레벨(짧게) → FAQ ---------- */
  main.sub-page:has(> #tuition):has(> #level) { display: flex; flex-direction: column; }
  main.sub-page:has(> #tuition):has(> #level) > * { order: 50; }
  main.sub-page:has(> #tuition):has(> #level) > .phero { order: 0; }
  main.sub-page:has(> #tuition):has(> #level) > #tuition { order: 1; }
  main.sub-page:has(> #tuition):has(> #level) > .flow { order: 2; }
  main.sub-page:has(> #tuition):has(> #level) > #level { order: 3; }
  main.sub-page:has(> #tuition):has(> #level) > #faq { order: 4; }
  main.sub-page:has(> #tuition):has(> #level) > #data { order: 5; }
  main.sub-page:has(> #tuition):has(> #level) > section:has(> .progs) { order: 6; }
  main.sub-page:has(> #tuition):has(> #level) > .cta { order: 7; }
  .tuit-more { display: none !important; } /* 후보 9: 같은 가격 반복 */
  #tuition > .mbanner { display: none !important; } /* 아래 고정 바에 같은 버튼 */

  /* PT 배점 막대(P0-2): 막대 위 라벨은 한 줄 범례로, 점선만 남긴다 */
  .cst__mk span { display: none !important; }
  .cst__mk { top: -8px !important; border-left-width: 2px; }
  .cst__lg { margin: -4px 0 4px; font-size: 14px; font-weight: 600; color: var(--ink, #000); }
  .cst__bar { margin-top: 16px !important; }
  .cst__seg { justify-content: flex-end; padding: 6px 3px !important; }
  .cst__seg b { font-size: 13px !important; letter-spacing: -0.02em; }

  /* ---------- 지점(P1-2·8·9, 후보 12·13·14) ---------- */
  body.dp--branch main#main { display: flex; flex-direction: column; }
  body.dp--branch main#main > * { order: 50; }
  body.dp--branch main#main > .dtitle { order: 0; }
  body.dp--branch main#main > .dquick { order: 1; }
  body.dp--branch main#main > #d-gallery { order: 2; }
  body.dp--branch main#main > #d-trainers { order: 3; }
  body.dp--branch main#main > #d-pilates { order: 4; }
  body.dp--branch main#main > #d-price { order: 5; }
  body.dp--branch main#main > #d-reviews { order: 6; }
  body.dp--branch main#main > .bx-revs { order: 7; }
  body.dp--branch main#main > #d-intro { order: 8; }
  body.dp--branch main#main > #d-first { order: 9; }
  body.dp--branch main#main > #d-tour { order: 10; }
  body.dp--branch main#main > #d-insta { order: 11; }
  body.dp--branch main#main > #d-blog { order: 12; }
  body.dp--branch main#main > #d-faq { order: 13; }
  body.dp--branch main#main > #d-visit { order: 14; }
  body.dp--branch main#main > .dcta { order: 15; }
  body.dp--branch .bx-trial { display: none !important; } /* 위 '한눈에'의 첫 체험·[예약]과 같은 내용 */
  body.dp--branch .dacc { display: none !important; } /* 주소·영업시간은 위 '한눈에'와 아래 '오시는 길'에 있다 */
  #d-price { padding-bottom: 40px; }

  /* ---------- 칼럼·인스타·소식(P1-4·5·6·11·12) ---------- */
  .jxc__d { display: none !important; } /* 설명 2줄이 '…'로 잘리던 것: 휴대폰은 제목만 */
  .jxchip button, .jcat a, .jxc__tag, .colist__aud, .jxr, .jxg, .sx__chip, .jxf { border-radius: 0 !important; }
  main.sub-page > .jxs { order: 2; }
  main.sub-page:has(> .jx) { display: flex; flex-direction: column; }
  main.sub-page:has(> .jx) > * { order: 1; }
  main.sub-page:has(> .jx) > .jxs { order: 3; }
  main.sub-page:has(> .jx) > .cta { order: 4; }
  .jauth__card { display: none !important; } /* 칼럼 '이 글의 선생님' 명함 사진(PC 장식) */
  .nwstat__l { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .nwstat__l > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  p.post__back { padding-left: var(--gut) !important; padding-right: var(--gut) !important; }

  /* ---------- 매칭(P1-3): 아래 바에 가리지 않게, 지금 이 페이지 버튼은 빼고 ---------- */
  body:has(#mq) { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body:has(#mq) .bar .btn[href*="/match/"] { display: none !important; }
  body:has(#mq) .bar .trio { grid-template-columns: 1fr !important; }

  /* ---------- 320 폭 가로 넘침 0(일본어 가격표 339px 등) ---------- */
  .bx-mx__lvb, .bx-mx__lvb table { max-width: 100%; }
  .bx-mx__lvb table { width: 100%; table-layout: auto; }
  .bx-mx__lvb th, .bx-mx__lvb td { white-space: normal !important; overflow-wrap: break-word; word-break: keep-all; }
  .lcard, .lcard__l li, .lcard__t { min-width: 0; overflow-wrap: anywhere; }
  .lcard__g { grid-template-columns: minmax(0, 1fr) !important; }
  html:not([lang="ko"]) .dradar svg { width: 300px; max-width: 76%; } /* 영어 축 이름이 길어 오른쪽으로 넘치던 것 */
  .bx-mx__lvb td *, .bx-mx__lvb th * { white-space: normal !important; overflow-wrap: break-word; }
  .bx-mx__lvb td, .bx-mx__lvb td * { overflow-wrap: anywhere; word-break: normal; } /* 일본어 '1回 110,000ウォン'이 320 폭에서 넘치던 것 */
  .skip { min-height: var(--m-tap); display: inline-flex; align-items: center; }
  .link, .thero__branch, .brand__go, .jxg__r { min-width: var(--m-tap); text-align: center; }
  .thero__branch, .brand__go, .jxg__r { display: inline-flex; align-items: center; justify-content: center; min-height: var(--m-tap); }

  /* ---------- 독립 검수 1차(84) 반영 ---------- */
  /* 본문 16px: 글 덩어리는 16, 짧은 정보(.meta)는 그대로 */
  .xp__d, .guide__d, .intl__d, .lv__d, .sx__d, .story__b p, .mstory__i p, .community__d, .faq details p, .dquick__l dd, .bx-price, .hero__lead, .prog__d, .evalwrap__d,
  .ccard__d, .pcard__d, .dlv__c, .bx-quiet, .bx-steps__d, .tintro__b p, .phero__lead p, .nwstat__note, .jxi__d, .stories__note { font-size: 16px !important; }
  /* 같은 예약 버튼 두 쌍: 지점 '한눈에' 안의 두 버튼은 아래 고정 바와 같아 휴대폰에서만 뺀다 */
  body.dp--branch .dquick__act { display: none !important; }
  /* 버튼이 하나만 남는 언어(영·일·중은 '나에게 맞는 트레이너'가 없다): 한 줄 꽉 차게 */
  .trio:has(> .btn:only-child), .mm__act:has(> .btn:only-child) { grid-template-columns: 1fr !important; }
  .trio:has(> .btn:only-child) > .btn { width: 100%; }
  /* PT 첫 화면에 실제 금액이 보이게: 머리말은 한 문단, 가격표 위 레벨 설명(아래 TRAINER LEVEL과 같은 내용)은 휴대폰에서만 뺀다 */
  main.sub-page:has(> #tuition):has(> #level) > .phero { padding-top: 32px !important; padding-bottom: 8px !important; }
  main.sub-page:has(> #tuition):has(> #level) > .phero .phero__lead p + p { display: none; }
  main.sub-page:has(> #tuition):has(> #level) > #tuition { padding-top: 32px !important; }
  main.sub-page:has(> #tuition):has(> #level) > #tuition .bx-mx__lv { display: none !important; }
  .dquick__l .link, .tbr__name .link { padding-inline: 6px; }

  /* ---------- 독립 검수 2차(88) 반영 ---------- */
  /* 강사 상세 가격표: 320 폭에서 네 칸이 좁아 단어가 끊기던 것 → 한 줄에 '횟수', 그 아래 금액·1회·기간 세 칸 */
  .ttui__t table { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); column-gap: 12px; width: 100%; }
  .ttui__t thead, .ttui__t tbody { display: contents; }
  .ttui__t tr { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; border-bottom: 1px solid var(--rule); padding: 12px 0; }
  .ttui__t thead tr { border-bottom: 1px solid #000; padding: 8px 0; }
  .ttui__t th, .ttui__t td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; word-break: keep-all; overflow-wrap: break-word; }
  .ttui__t th:first-child { display: none; }
  .ttui__t td:nth-child(2), .ttui__t td:nth-child(3) { white-space: nowrap; } .ttui__t td:nth-child(4) { word-break: keep-all; overflow-wrap: normal; }
  .ttui__t th { width: auto !important; white-space: nowrap; overflow-wrap: normal !important; }
  .ttui__t td:first-child { grid-column: 1 / -1; margin-bottom: 4px; font-weight: 600; }
  .ttui__t td, .ttui__t th { font-size: 15px; }
  .ttui__t th { font-size: 13px; }
  /* 본문 16px 남은 것 */
  .tuit__note, .bx-mx__note, .bx-mx__fix, .ttui__n, .dvisit p, .dvisit dd, .dinfo dd, .bx-revs p, .drev__t, .bx-info, .bx-info dd, .bx-info p, #tuition .wrap > p, .bx-mx > p { font-size: 16px !important; }
  /* 일본어 메뉴 바로가기: 단어 가운데서 끊기지 않게 글자를 조금 줄인다 */
  html:not([lang="ko"]) .mm__quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* 영·일·중은 메뉴 이름이 길어 두 칸씩 */
  .dlv__k { overflow-wrap: anywhere; }
  .bx-steps li span, .tqa p, .tqa li, .tqa li span, .tqa li b, .cv3__t, .tmore__t, .bx-steps p, .bx-steps li, .bx-steps dd, .evalwrap p, .trow__v li, .bx-mx__fix span, .dvisit li { font-size: 16px !important; }
}
