/* 헤어아트 — clara8754 사본 확장 스타일(site-ext.js 와 짝). clara 토큰(--color-*, --font-*)만 쓴다 */

/* 외국어 페이지: 번역이 끝나기 전 한국어가 비치지 않게 */
html[lang="en"]:not(.ha-ready) #root, html[lang^="zh"]:not(.ha-ready) #root { opacity: 0; }
html.ha-ready #root { opacity: 1; transition: opacity .2s ease; }
html[lang^="zh"] { --font-display: "Cormorant Garamond", "Noto Serif SC", "Noto Serif KR", serif; }
/* clara 는 한국어용 word-break: keep-all — 띄어쓰기 없는 중문은 줄바꿈이 안 돼 넘친다 */
html[lang^="zh"] body, html[lang^="zh"] body * { word-break: normal; }
html[lang^="zh"] body { font-family: "Helvetica Neue", Helvetica, Arial, "Noto Sans SC", "Pretendard Variable", Pretendard, sans-serif; }

/* 외국어 페이지 예약 버튼: 네이버 예약이 아니므로 N 아이콘을 숨긴다 */
.ha-booklink > svg { display: none; }

/* ── 언어 전환 ── */
.ha-lang { display: flex; align-items: center; margin-left: auto; gap: 2px; font-family: var(--font-sans); }
.ha-lang a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 44px; padding: 0 6px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--color-muted); text-decoration: none;
}
.ha-lang a:hover { color: var(--color-text); }
.ha-lang a[aria-current="true"] { color: var(--color-text); text-decoration: underline; text-underline-offset: 6px; }
.ha-lang a:focus-visible { outline: 2px solid var(--color-text); outline-offset: -2px; }
@media (max-width: 767px) { .ha-lang a { min-width: 34px; padding: 0 3px; font-size: 12px; } }

/* ── 후기: 원문 카드·칩 숨기고 키워드 통계 ── */
#reviews .ha-stats-on > ul, #reviews .ha-stats-on > div.mt-8 > ul { display: none; }
.ha-kw { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.ha-kw li { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 6.5em; align-items: center; gap: 14px; font-size: 16px; line-height: 1.5; }
.ha-kw-label { color: var(--color-text); }
.ha-kw-bar { height: 8px; background: var(--color-bg); border: 1px solid var(--color-border); }
.ha-kw-bar i { display: block; height: 100%; background: var(--color-accent); }
.ha-kw-n { text-align: right; color: var(--color-accent); font-variant-numeric: tabular-nums; }
.ha-kw-note { margin-top: 16px; font-size: 14px; line-height: 1.6; color: var(--color-muted); }
@media (max-width: 639px) {
  .ha-kw li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .ha-kw-bar { grid-column: 1 / -1; grid-row: 2; }
}

/* ── 예약 요청(외국어 페이지) ── */
.ha-book-grid { display: grid; gap: 40px; }
@media (min-width: 768px) { .ha-book-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 48px; } }
.ha-book-side .ha-steps { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--color-text); }
.ha-steps li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--color-border); }
.ha-step-n { font-family: var(--font-display); font-size: 24px; line-height: 1.2; color: var(--color-accent); min-width: 1em; }
.ha-step-t { font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--color-text); }
.ha-step-d { font-size: 15px; line-height: 1.6; color: var(--color-text); }
.ha-note { margin-top: 16px; font-size: 14px; line-height: 1.6; color: var(--color-muted); }
.ha-note a { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; }

.ha-form { display: grid; gap: 20px; }
.ha-row { display: grid; gap: 20px; }
@media (min-width: 640px) { .ha-row { grid-template-columns: 1fr 1fr; } }
.ha-field { display: grid; gap: 6px; min-width: 0; }
.ha-field > label { font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--color-text); }
.ha-req { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--color-accent); }
.ha-field input:not([type="checkbox"]), .ha-field select, .ha-field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: 0;
  background: var(--color-bg); color: var(--color-text); font: inherit; font-size: 16px; line-height: 1.5;
}
.ha-field input[type="file"] { padding: 10px; }
.ha-field input:focus-visible, .ha-field select:focus-visible, .ha-field textarea:focus-visible { outline: 2px solid var(--color-text); outline-offset: 0; border-color: var(--color-text); }
.ha-help { font-size: 13px; line-height: 1.5; color: var(--color-muted); }
.ha-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--color-text); cursor: pointer; }
.ha-check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--color-primary); }
#ha-terms details { margin-top: 8px; font-size: 14px; }
#ha-terms summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; }
.ha-terms-body { max-height: 220px; overflow: auto; padding: 12px 14px; border: 1px solid var(--color-border); background: var(--color-bg); font-size: 13px; line-height: 1.6; }
.ha-status { padding: 12px 14px; border: 1px solid var(--color-accent); color: var(--color-accent); font-size: 15px; line-height: 1.5; }
.ha-submit {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 32px; justify-self: start;
  border: 0; background: var(--color-primary); color: var(--color-bg); font-family: var(--font-sans); font-size: 16px; font-weight: 700; cursor: pointer;
  transition: opacity .16s ease;
}
.ha-submit:hover { opacity: .85; }
.ha-submit:disabled { opacity: .5; cursor: not-allowed; }
.ha-submit:focus-visible { outline: 2px solid var(--color-text); outline-offset: 2px; }
.ha-done { padding: 28px; border: 1px solid var(--color-border); background: var(--color-bg); display: grid; gap: 8px; }
.ha-done:focus { outline: none; }
.ha-done-h { font-size: 28px; line-height: 1.3; color: var(--color-text); }
.ha-email { font-size: 18px; font-weight: 700; color: var(--color-accent); word-break: break-all; }
#book { scroll-margin-top: var(--site-header-h, 68px); }

/* 위챗 예약(중문, 2026-11-10) */
.ha-wechat { display: grid; gap: 20px; justify-items: start; align-content: start; }
.ha-wechat-card { margin: 0; padding: 24px; border: 1px solid var(--color-border); background: var(--color-bg); display: grid; gap: 12px; justify-items: center; }
.ha-wechat-card img { width: 220px; height: 220px; image-rendering: pixelated; }
.ha-wechat-card figcaption { font-size: 15px; line-height: 1.5; color: var(--color-text); text-align: center; }
.ha-wechat-mobile { max-width: 34em; font-size: 15px; line-height: 1.6; color: var(--color-text); }
a.ha-submit { text-decoration: none; }

/* ── 예약 간소화(2026-11-11, 트리니티스파 팝업 참고): 한 장 카드 · 시술 칩 · 펼친 달력 · 시간 칩 ── */
.ha-book-wrap { max-width: 960px; margin: 0 auto; }
.ha-book-head { text-align: center; margin-bottom: 32px; }
.ha-book-lead { margin: 12px auto 0; max-width: 34em; font-size: 16px; line-height: 1.6; color: var(--color-text); }
.ha-card { background: var(--color-bg); border: 1px solid var(--color-border); padding: 8px 32px 28px; }
@media (max-width: 639px) { .ha-card { padding: 4px 18px 22px; } }
.ha-sec { border: 0; margin: 0; padding: 24px 0; min-width: 0; }
.ha-sec + .ha-sec { border-top: 1px solid var(--color-border); }
.ha-sec-h { display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 16px; font-size: 16px; font-weight: 700; color: var(--color-text); }
.ha-sec-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--color-primary); color: var(--color-bg); font-size: 13px; font-weight: 700; }
.ha-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ha-chip { position: relative; cursor: pointer; }
.ha-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ha-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--color-border); border-radius: 999px; font-size: 14px; line-height: 1.3; color: var(--color-text); background: var(--color-bg); transition: background .15s, border-color .15s, color .15s; }
.ha-chip:hover span { border-color: var(--color-text); }
.ha-chip input:checked + span { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-bg); }
.ha-chip input:focus-visible + span { outline: 2px solid var(--color-text); outline-offset: 2px; }
.ha-when { display: grid; gap: 24px; }
@media (min-width: 768px) { .ha-when { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 32px; } }
.ha-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ha-cal-title { font-size: 15px; font-weight: 700; color: var(--color-text); }
.ha-cal-nav { width: 40px; height: 40px; border: 0; background: none; font-size: 22px; color: var(--color-text); cursor: pointer; border-radius: 50%; }
.ha-cal-nav:hover:not(:disabled) { background: var(--color-surface, rgba(0,0,0,.05)); }
.ha-cal-nav:disabled { opacity: .25; cursor: default; }
.ha-cal-week, .ha-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.ha-cal-week span { font-size: 12px; color: var(--color-muted); padding: 4px 0; }
.ha-day { aspect-ratio: 1; max-height: 44px; width: 100%; border: 0; border-radius: 50%; background: none; font: inherit; font-size: 14px; color: var(--color-text); cursor: pointer; }
.ha-day:hover:not(:disabled) { background: rgba(0,0,0,.06); }
.ha-day:disabled { color: var(--color-muted); opacity: .4; cursor: default; }
.ha-day[aria-pressed="true"] { background: var(--color-primary); color: var(--color-bg); font-weight: 700; }
.ha-times-h { font-size: 15px; font-weight: 700; color: var(--color-text); margin-bottom: 12px; min-height: 40px; display: flex; align-items: center; }
.ha-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.ha-time { min-height: 40px; border: 1px solid var(--color-border); background: var(--color-bg); font: inherit; font-size: 14px; color: var(--color-text); cursor: pointer; }
.ha-time:hover { border-color: var(--color-text); }
.ha-time[aria-pressed="true"] { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-bg); font-weight: 700; }
.ha-hint { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--color-muted); grid-column: 1 / -1; }
.ha-row3, .ha-row2 { display: grid; gap: 16px; }
@media (min-width: 768px) { .ha-row3 { grid-template-columns: 1fr 1fr 1fr; } .ha-row2 { grid-template-columns: 1fr 1fr; } }
.ha-field > label { font-size: 14px; }
.ha-opt { font-weight: 400; color: var(--color-muted); }
.ha-card .ha-field input:not([type="checkbox"]):not([type="radio"]), .ha-card .ha-field textarea { min-height: 44px; font-size: 16px; }
.ha-more { margin-top: 16px; }
.ha-more summary { cursor: pointer; display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; }
.ha-more-body { display: grid; gap: 16px; padding-top: 8px; }
.ha-foot { border-top: 1px solid var(--color-border); padding-top: 20px; display: grid; gap: 14px; }
.ha-foot .ha-check { font-size: 14px; }
.ha-foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.ha-sum { font-size: 15px; font-weight: 700; color: var(--color-text); }
.ha-foot .ha-submit { justify-self: auto; }
@media (max-width: 639px) { .ha-foot .ha-submit { width: 100%; } }
.ha-fine { font-size: 12px; line-height: 1.6; color: var(--color-muted); }
.ha-fine a { color: var(--color-text); text-decoration: underline; text-underline-offset: 2px; }
.ha-done { padding: 40px 32px; text-align: center; display: grid; gap: 10px; }

/* 위챗(중문)도 같은 카드 */
.ha-wc { display: grid; gap: 28px; align-items: center; padding: 32px; }
@media (min-width: 768px) { .ha-wc { grid-template-columns: auto minmax(0, 1fr); gap: 40px; } }
.ha-wc .ha-wechat-card { border: 0; padding: 0; background: none; }
.ha-wc-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ha-wc-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.6; color: var(--color-text); }
.ha-wc-steps .ha-sec-n { flex: none; margin-top: 2px; }
.ha-wc-side { display: grid; gap: 16px; justify-items: start; }
.ha-chips-rest { display: contents; }
.ha-chips-rest[hidden] { display: none; }
.ha-chip-more { min-height: 40px; padding: 0 16px; border: 1px dashed var(--color-border); border-radius: 999px; background: none; font: inherit; font-size: 14px; color: var(--color-text); cursor: pointer; }
.ha-chip-more:hover { border-color: var(--color-text); }
/* legend 가 구분선 위에 걸치지 않게 */
.ha-sec-h { float: left; width: 100%; }
.ha-sec-h + * { clear: both; }
.ha-wc-mini { margin-top: 16px; padding: 20px 24px; gap: 20px; }
@media (min-width: 768px) { .ha-wc-mini { grid-template-columns: auto minmax(0, 1fr); } }
.ha-wc-mini .ha-wechat-card img { width: 140px; height: 140px; }
.ha-wc-h { font-size: 16px; font-weight: 700; color: var(--color-text); }
.ha-wc-mini .ha-hint { margin-top: 0; }
.ha-wc-save { font-size: 14px; color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; min-height: 40px; display: inline-flex; align-items: center; }

/* 바로가기 줄 「위챗 예약」(2026-11-12) — 버튼 모양은 빌더 .action-bar-button 그대로, 글꼴·배경만 맞춤 */
.ha-wc-btn { cursor: pointer; }
/* 휴대폰: 4개가 한 줄에 들어가게 — 줄을 화면 폭으로 펴고, 아이콘 위 · 글자 아래 */
@media (max-width: 639px) {
  .action-bar { left: 12px; }
  .action-bar-button { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; padding: 6px 4px; min-height: 56px; font-size: 12px; line-height: 1.25; white-space: normal; text-align: center; }
}
.ha-wc-dialog { width: min(360px, calc(100vw - 32px)); padding: 32px 24px 24px; border: 0; background: var(--color-bg, #fff); color: var(--color-text); text-align: center; position: fixed; }
.ha-wc-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.ha-wc-dialog img { display: block; width: 200px; height: 200px; margin: 16px auto; image-rendering: pixelated; }
.ha-wc-dialog-h { margin: 0; font-size: 20px; line-height: 1.4; }
.ha-wc-dialog .ha-hint { margin: 0; text-align: left; }
.ha-wc-dialog-act { display: grid; gap: 8px; justify-items: center; margin-top: 20px; }
.ha-wc-dialog-act .ha-submit { width: 100%; justify-content: center; }
.ha-wc-x { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--color-text); cursor: pointer; }

/* 취소·환불 규정(2026-11-13 원장 Q&A) — 작은 안내문보다 잘 보이게, 버튼 아래 한 줄 */
.ha-cancel { margin: 0; padding: 10px 12px; border-left: 2px solid var(--color-text); background: var(--color-bg); font-size: 13px; line-height: 1.6; color: var(--color-text); }
.ha-cancel strong { font-weight: 700; margin-right: 4px; }

/* ── 전체 정돈(2026-11-16) ── */
/* 푸터: 본문과 같은 좌우 여백 · 제목 글꼴, 아래 바로가기 자리(어두운 띠)와 이어지게 어두운 바탕 */
footer.widget-footer-root { --widget-footer-bg: var(--color-footer); --widget-footer-text: var(--color-bg); }
footer.widget-footer-root .max-w-screen-xl { max-width: none; padding-inline: max(20px, 50% - 568px); }
footer.widget-footer-root h2 { font-family: "Cormorant Garamond", "Noto Serif KR", serif; font-weight: 400; letter-spacing: 0; }
footer.widget-footer-root a { text-underline-offset: 3px; }
footer.widget-footer-root a:hover { text-decoration: underline; }
/* 질문 제목의 숫자(1인샵)가 내려앉지 않게 */
section[aria-labelledby="faq-heading"] summary, .ha-faq summary { font-variant-numeric: lining-nums; }
/* 매장 사진: 4장 비율을 같게(입구 간판만 낮던 것) */
section[aria-labelledby="space-heading"] figure > div { aspect-ratio: 4 / 5; }
/* 갤러리: 들쭉날쭉한 세로 길이를 4:5 로 맞춤 */
section[aria-labelledby="gallery-heading"] .gallery-item img { aspect-ratio: 4 / 5; object-position: 50% 30%; }
@media (max-width: 767px) {
  /* 휴대폰: 시술 목록 2열, 매장 사진 2열 — 한 줄씩 길게 늘어지던 것 */
  section[aria-labelledby="treatments-heading"] ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  section[aria-labelledby="space-heading"] > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  section[aria-labelledby="space-heading"] > div > :first-child { grid-column: 1 / -1; margin-bottom: 4px; }
  section[aria-labelledby="space-heading"] figure { margin-bottom: 0; }
}
/* 갤러리 칸을 같은 높이로 맞췄으니 세로 단(columns) 대신 격자로 — 마지막 단만 짧아지던 것 */
section[aria-labelledby="gallery-heading"] ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; columns: auto; }
@media (min-width: 768px) { section[aria-labelledby="gallery-heading"] ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { section[aria-labelledby="gallery-heading"] ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
section[aria-labelledby="gallery-heading"] .gallery-item { margin-bottom: 0; }
