/* 모바일 보정 — 격자 끝줄·터치 크기·줄바꿈·햄버거 상담 버튼 */

/* 1. 줄바꿈 — 제목·부제·리드문 균등 나눔은 서브 지면 전용(iu-type)에서 폰 폭에만 적용한다 */
html body.wds :is(.dn-sub-hero__intro-inner,.dn-sub-hero__intro-inner p){text-wrap:pretty}

/* 2. 격자 끝줄 외톨이 — 홀수 개이면 마지막 칸을 한 줄 전체로 */
html body.wds main :is(.wune-related__grid,.breast-bottom-links__grid,.iu-related__list)>:nth-child(odd):last-child{grid-column:1/-1}
html body.wds main:not(#iu) .dn-insight-section:not(.iu-leg) .dn-insight-track:not(:has(img,picture,svg,.dn-surg,.dn-insight-card__fig))>.dn-insight-card:nth-child(odd):last-child{grid-column:1/-1!important}
html body.wds main dl.iu-deflist>:nth-child(odd):last-child{grid-column:1/-1}

/* 2-1. 장비 격자 — 사진 칸은 그대로 두고 끝줄 한 칸을 가운데로 */
@media (max-width:1023px){
  html body .iu-equip .iu-equip__grid>.iu-equip__item--text{grid-column:1/-1}
}
@media (max-width:599px){
  html body .iu-equip .iu-equip__grid>.iu-equip__item:not(.iu-equip__item--text):nth-child(odd):is(:last-child,:has(+ .iu-equip__item--text:last-child)){grid-column:1/-1;justify-self:center;width:calc(50% - 6px)}
}
@media (min-width:600px) and (max-width:1023px){
  html body .iu-equip .iu-equip__grid>.iu-equip__item:not(.iu-equip__item--text):nth-child(3n+1):is(:last-child,:has(+ .iu-equip__item--text:last-child)){grid-column:1/-1;justify-self:center;width:calc((100% - 24px)/3)}
}
/* 2-2. 수술 단계 그림 2열 — 마지막 한 장을 가운데로 */
@media (max-width:767px){
  html body.wds .dn-surg__grid.iu-fig__grid>:nth-child(odd):last-child:not(:has(>.dn-surg__cap)){grid-column:1/-1;justify-self:center !important;width:calc(50% - 8px) !important}
  html body.wds .dn-surg__grid.iu-fig__grid>:nth-child(odd):last-child:has(>.dn-surg__cap){grid-column:1/-1;width:auto !important;justify-self:stretch !important;display:grid;grid-template-columns:calc(50% - 8px) minmax(0,1fr);column-gap:16px;align-items:start}
  html body.wds .dn-surg__grid.iu-fig__grid>:nth-child(odd):last-child>.dn-surg__cap{grid-column:2;grid-row:1;margin:0}
  html body.wds .dn-surg__grid.iu-fig__grid>:nth-child(odd):last-child>.iu-fig__box{grid-column:1;grid-row:1;margin-top:0}
}
/* 2-3. 블로그 분류 칩 7개 — 폰 2열(끝 칸 전체 폭) · 태블릿 4열 · 데스크톱은 기존 배치 */
@media (max-width:1023px){
html body.wds .blog-pillar-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important;justify-content:stretch!important}
html body.wds .blog-pillar-list>li{display:block!important}
html body.wds .blog-pillar-list>li>a{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;text-align:center;box-sizing:border-box}
html body.wds .blog-pillar-list>li:nth-child(odd):last-child{grid-column:1/-1}
}
@media (min-width:600px) and (max-width:1023px){html body.wds .blog-pillar-list{grid-template-columns:repeat(4,minmax(0,1fr))}html body.wds .blog-pillar-list>li:nth-child(odd):last-child{grid-column:auto}}

/* 3. 슬라이드 카드 높이 통일 — 글만 있는 카드도 옆 카드와 같은 높이로 */
html body.wds .dn-insight-track>.dn-insight-card{align-self:stretch!important}

/* 4. 터치 대상 44px — 보이는 줄 높이는 그대로 두고 누르는 면만 넓힌다 */
html body.wds nav.dn-breadcrumb a{display:inline-block;padding:13px 0;margin:-13px 0;min-height:44px;box-sizing:border-box;vertical-align:middle}
html body.wds .content_wrap a.wds-textlink{padding-block:10px;margin-block:-10px;min-height:44px!important;box-sizing:border-box}
html body .form_row .form_input{min-height:44px}
html body .form_agree_wrap input[type=checkbox]{width:24px;height:24px;flex:none;margin:0 8px 0 0!important}
html body .form_row>label{font-size:max(14px,.78em)}

/* 5. 햄버거 메뉴 맨 아래 상담 예약 — 글자 링크가 아니라 채움 버튼으로 */
html body .m-menu-cta,html body.wds .m-menu-cta{display:flex!important;align-items:center;justify-content:center;min-height:52px;background:var(--iub-ink,#242424)!important;color:#fff!important;border:0!important;border-radius:10px!important;font-size:16px!important;font-weight:600!important;letter-spacing:0!important;text-transform:none!important;padding:14px 24px!important}

/* 6. 작은 원본 장비·제품 사진 — 폰에서 표시 크기를 원본의 2배 이하로(새 그림·확대 보정 없음) */
@media (max-width:599px){
  html body .iu-equip__photo:has(img:is([src*="alltite"],[src*="density-270"],[src*="inmode"],[src*="linearz"],[src*="soprano-titanium"],[src*="thermage-flx"],[src*="u-one-480"],[src*="ultherapy-prime"],[src*="ultraclear"])){max-width:250px;margin-inline:auto}
}

/* 2-2. 한 열 장비 격자(좁은 폰)에서는 끝줄 가운데 정렬을 풀고 전체 폭으로 */
@media (max-width:480px){
  html body:has(style#n8-equip) .iu-equip .iu-equip__grid>.iu-equip__item:not(.iu-equip__item--text){grid-column:auto;justify-self:stretch;width:auto}
}

/* 블로그 분류 칩 7개 — 폰 폭마다 줄 나뉨이 달라 한 개만 남던 것을 4개 + 3개 두 줄로 고정한다 */
@media (max-width:767px){
	html body.wds .blog-read-wrap .blog-pillar-list:has(> li:nth-child(7):last-child){
		display:grid !important;grid-template-columns:repeat(12,minmax(0,1fr)) !important;gap:6px !important;justify-content:stretch !important;width:100%;box-sizing:border-box;
	}
	html body.wds .blog-read-wrap .blog-pillar-list:has(> li:nth-child(7):last-child) > li{grid-column:span 4 !important;min-width:0}
	html body.wds .blog-read-wrap .blog-pillar-list:has(> li:nth-child(7):last-child) > li:nth-child(-n+4){grid-column:span 3 !important}
	html body.wds .blog-read-wrap .blog-pillar-list:has(> li:nth-child(7):last-child) > li > a.blog-pillar-btn{
		display:flex !important;width:100%;padding:0 4px !important;font-size:13px !important;white-space:normal;word-break:keep-all;text-align:center;line-height:1.3;
	}
}

/* 후기 진료 칩 6개 — 폰 폭마다 5+1 로 한 개만 남던 것을 4개 + 2개 두 줄로 고정한다 */
@media (max-width:599px){
	html body.wds .rr-topics__chips:has(> :nth-child(6):last-child){display:grid !important;grid-template-columns:repeat(12,minmax(0,1fr));gap:8px !important;width:100%;box-sizing:border-box}
	html body.wds .rr-topics__chips:has(> :nth-child(6):last-child) > *{grid-column:span 6;min-width:0;display:flex;align-items:center;justify-content:center;padding-left:4px !important;padding-right:4px !important;text-align:center;box-sizing:border-box}
	html body.wds .rr-topics__chips:has(> :nth-child(6):last-child) > :nth-child(-n+4){grid-column:span 3}
}

/* FAQ 펼침 — 질문 내용 단락을 답변과 구분(옅은 바탕·왼쪽 선·라벨 굵게) */
html body.wds details > div > p.iu-faq-detail{
	margin:0 0 14px !important;padding:12px 16px;background:#fff;border-left:3px solid var(--iub-rose,#CE8FA4);border-radius:4px;
	color:#555 !important;font-size:.95em;line-height:1.7;box-sizing:border-box;
}
html body.wds details > div > p.iu-faq-detail .iu-faq-detail__label{font-weight:700;color:#333;margin-right:2px}

/* 제품 사진 칸 — 원본(480px) 크기를 넘겨 키워 흐려지지 않게 표시 폭을 제한하고 가운데에 놓는다 */
html body .iu-equip .iu-equip__photo.iu-equip__photo--product{max-width:480px;margin-inline:auto}

/* 리프팅 가이드 — 주름 단계 설명이 두 줄로 꺾여도 둘째 줄이 라벨 오른쪽 글줄에 맞게 */
@media (max-width:767px){
  html body.wds .lg-stages>li{display:grid;grid-template-columns:3.6em minmax(0,1fr);column-gap:10px;align-items:start}
}

/* 상담·모델 신청 양식 — 동의 줄과 제출 버튼 사이를 띄운다 */
html body .form_agree_wrap ~ .form_submit_btn,html body .form_agree_wrap + .form_submit_btn{margin-top:28px !important}
