/* frame.css — 갈래 base 소유. r7 틀: 머리줄(.hd) · 폰 메뉴 시트 · 푸터(.ft) · 독(.dock).
   색·반경·글자는 home.css 토큰만 씀(C1~C3). 흐림·유리·그림자·노랑 0. 움직임은 transform 만. */

/* ── 건너뛰기 ── */
.skip { position: absolute; left: 16px; top: -64px; z-index: 80; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-btn); background: var(--ink); color: var(--cream); font-size: 15px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 10px; }

/* ── 머리줄: 데스크톱 64 · sticky · 크림 불투명 · 아래 1px 선은 스크롤한 뒤에만 ── */
.hd { position: sticky; top: 0; z-index: 50; height: var(--hd-h); background: var(--page); }
.hd::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); transform: scaleY(0); transform-origin: bottom; }
.hd.is-scrolled::after { transform: none; }
.hd-in { box-sizing: border-box; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 24px; max-width: 1440px; height: 100%; margin: 0 auto; padding: 0 40px; }
.hd-brand { justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; }
.hd-mark { display: block; width: 24px; height: 24px; flex: none; }
.hd-name { font-size: 16px; font-weight: 720; letter-spacing: -.02em; line-height: 1; }
.hd-nav { display: flex; align-items: center; gap: 4px; }
.hd-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); color: var(--ink2); font-size: 15px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.hd-nav a:hover { background: var(--sand); color: var(--ink); }
.hd-end { justify-self: end; display: flex; align-items: center; gap: 8px; }
.hd-kakao.btn-line { min-height: 44px; padding: 0 18px; font-size: 15px; }   /* r8: 옆 '메뉴'와 같은 높이 44 · 반경 12 · 테 1.5 */
.hd-menu { display: none; align-items: center; justify-content: center; min-width: 64px; min-height: 44px; padding: 0 18px; margin: 0; border: 1.5px solid var(--ink); border-radius: var(--r-btn); background: transparent; color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; -webkit-user-select: none; user-select: none; }
.hd-menu:active { transform: scale(.98); filter: brightness(.95); }

/* ── 카톡 복사 결과 알림: 상태 줄이 화면에 없는 자리(데스크톱 머리줄 단추 · 폰 독 띠 단추) · 4초 뒤 비움(frame-ui.js) ── */
.au-toast { position: absolute; z-index: 60; margin: 0; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: var(--r-card); background: var(--paper); color: var(--ink);
  font-size: 14px; font-weight: 600; line-height: 1.45; pointer-events: none; }
.au-toast:empty { display: none; }
.hd-end { position: relative; }
.hd-toast { right: 0; top: calc(100% + 12px); width: max-content; max-width: 320px; }
.dock-toast { left: 12px; right: 12px; bottom: calc(100% + 8px); }

/* ── 메뉴 시트(폰·좁은 폭): 크림 전체 시트 · 반경 18 · ESC 닫힘 · 초점 가둠 ── */
.hd-sheet { position: fixed; inset: 8px; z-index: 70; display: flex; flex-direction: column; padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-radius: var(--r-paper); background: var(--page); overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 0 0 100vmax var(--sand); }   /* 뒤 쪽을 모래색 단색으로 덮음(8px 틈으로 꽃·단추가 비치지 않게 · 흐림·투명 0) */
.hd-sheet[hidden] { display: none; }
.hd-sheet-top { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.hd-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -8px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink); font: inherit; font-size: 28px; font-weight: 400; line-height: 1; cursor: pointer; }
.hd-sheet-nav { display: flex; flex-direction: column; margin: 8px 0 24px; }
.hd-sheet-nav a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 20px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.hd-sheet-nav a::after { content: '→'; font-weight: 400; color: var(--sub); }
.hd-sheet .btn-kakao { width: 100%; }
.hd-sheet [data-kakao-status] { margin: 8px 0 0; }
.hd-night { margin: 16px 0 0; font-size: 15px; line-height: 1.5; color: var(--sub); }
.hd-night a { display: inline-flex; align-items: center; min-height: 48px; color: var(--ink); font-size: 16px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--fl); text-decoration-thickness: 2px; text-underline-offset: 5px; }

@media (max-width: 1023px) {
  .hd-in { grid-template-columns: 1fr auto; }
  .hd-nav { display: none; }
  .hd-menu { display: inline-flex; }
}
@media (max-width: 767px) {
  .hd-in { padding: 0 16px; }
  .hd-kakao { display: none !important; }
  .skip, .hd-brand { min-height: 48px; }
  .hd { transition: transform var(--t-fast) var(--ease-ui); }
  .hd.is-hidden { transform: translateY(-100%); }
}
@media (prefers-reduced-motion: reduce) { .hd { transition: none; } }

/* ── 푸터: DOM(운영 99eb479 푸터 열·링크·글 바이트 그대로) · 크림 · 5열 · 사업자 정보 13px 한 덩이 ── */
.ft { margin-top: 96px; border-top: 1px solid var(--line); background: var(--page); color: var(--ink); }
.ft-in { box-sizing: border-box; max-width: 1440px; margin: 0 auto; padding: 64px 40px 40px; }
.ft-top { display: grid; grid-template-columns: 300px 1fr; column-gap: 64px; }
.ft-logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 720; letter-spacing: -.02em; }
.ft-logo svg { width: 24px; height: 24px; flex: none; }
.ft-side { display: flex; flex-direction: column; gap: 20px; }
.ft-side .ft-col:first-of-type { margin-top: 4px; }
.ft-map { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 24px; padding-top: 12px; }
.ft-col > summary { pointer-events: none; display: block; }
.ft-col > summary i { display: none; }
.ft-h, .ft-col h2 { margin: 0 0 10px; font-size: 14px; font-weight: 600; line-height: 1.4; letter-spacing: 0; color: var(--sub); }
.ft ul { list-style: none; margin: 0; padding: 0; }
.ft li a, .ft-legal a { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; color: var(--ink); font-size: 15px; font-weight: 400; line-height: 1.35; text-decoration: none; }
.ft li a:hover, .ft-legal a:hover { text-decoration: underline; text-decoration-color: var(--fl); text-underline-offset: 4px; }
.ft-status { margin: 0; font-size: 14px; line-height: 1.4; color: var(--sub); }
.ft-night { margin: 0 0 4px; font-size: 14px; line-height: 1.5; color: var(--sub); }
.ft-night a { min-height: 34px; font-size: 14px !important; font-weight: 600 !important; }
.ft-bot { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 40px; row-gap: 12px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.ft-biz { font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 720px; }
.ft-biz address { display: inline; font-style: normal; }
.ft-biz span + span::before, .ft-biz address + span::before { content: ' · '; }
.ft-legal { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; column-gap: 18px; }
.ft-legal a { font-size: 14px; color: var(--sub); }
.ft-copy { font-size: 14px; color: var(--sub); white-space: nowrap; }

@media (min-width: 768px) and (max-width: 1023px) {   /* r8: 1179 → 1023(1024~1179 는 데스크톱처럼 왼쪽 문의·채널 + 오른쪽 사이트맵 3열 — 누름 44 로 키 큰 푸터가 1,300px 까지 길어지던 것) */
  .ft-top { grid-template-columns: 1fr; row-gap: 32px; }
  /* 태블릿: 로고 한 줄 → 그 아래 문의 | 채널 두 열(로고가 열 사이 가운데 뜨지 않게) */
  .ft-side { display: grid; grid-template-columns: max-content max-content; column-gap: 64px; row-gap: 16px; align-items: start; margin-top: 8px; }
  .ft-side .ft-logo { grid-column: 1 / -1; justify-self: start; }
  .ft-side .ft-col:first-of-type { margin-top: 0; }
  .ft-bot { grid-template-columns: 1fr; }
  .ft-legal { justify-content: flex-start; }
}
/* r8: 1440 미만은 사이트맵 3열(5열이면 열 폭 118~170 → '디지털장의사 비용·절차'가 '비용·' 뒤에서 끊김) · 손가락 기기·태블릿은 링크 누름 44 */
@media (min-width: 768px) and (max-width: 1439px) {
  .ft-map { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
}
@media (min-width: 768px) and (max-width: 1179px), (min-width: 768px) and (pointer: coarse) {
  .ft li a, .ft-legal a { min-height: 44px; min-width: 44px; }   /* '채용' 26px 폭 같은 짧은 링크도 누름 44×44 */
}
@media (max-width: 767px) {
  .ft { margin-top: 40px; }
  .ft-in { padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
  .ft-top { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .ft-side, .ft-map { display: contents; }
  .ft-logo { grid-column: 1 / -1; order: -2; min-height: 48px; margin-bottom: 4px; }
  /* 폰: 문의·채널을 맨 앞(운영 순서와 같음) — 문의 | 채널 / 서비스 | 플랫폼별 … */
  .ft-side .ft-col { order: -1; }
  .ft-side .ft-col:first-of-type { margin-top: 0; }
  /* 폰: 열마다 펼침(줄 48) · 2열 격자 — 펼친 칸은 한 줄 전체로 */
  .ft-col { border-top: 1px solid var(--line); min-width: 0; }
  .ft-col[open] { grid-column: 1 / -1; }
  .ft-col > summary { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; min-height: 48px; cursor: pointer; }
  .ft-col > summary i { display: inline; font-size: 20px; }
  .ft-col > summary h2, .ft-col > summary .ft-h { margin: 0; font-size: 15px; color: var(--ink); }
  .ft-col ul { padding-bottom: 8px; }
  .ft li > a { display: flex; min-height: 48px; }   /* 줄 전체가 누름 자리 */
  .ft-night { margin: 0 0 8px; }
  .ft .ft-night a { display: inline-flex; align-items: center; min-height: 48px; }   /* r8 2차(반박 D): 문장 속 '긴급 상황인가요? →' 도 누름 48(34 였음) */
  /* r8 2차(반박 F): 한 열을 펼치면 모든 열이 한 줄 전체로(옆 열이 반 폭 구분선으로 홀로 남던 것) — 다 닫히면 다시 두 열 */
  .ft-top:has(.ft-col[open]) .ft-col { grid-column: 1 / -1; }
  .ft-bot { grid-template-columns: 1fr; margin-top: 0; padding-top: 16px; row-gap: 4px; }
  .ft-legal { justify-content: flex-start; column-gap: 16px; }
  .ft-legal a, .ft-copy { display: inline-flex; align-items: center; min-height: 48px; }
}

/* ── 독: 폰 = 바닥 띠(58 + 안전 영역) 친구 44 + 채운 카톡 단추 · 데스크톱 = 오른쪽 아래 친구 64 만 ──
   물러남(dock-ui.js): [data-dock-yield] 가 보이거나, 독 제자리(+8px)에 누름 대상이 걸치면 아래로 비킴(.is-yield) → 멈춘 자리 겹침 넓이 0 */
.dock { position: fixed; z-index: 40; right: 24px; bottom: 24px; pointer-events: none; visibility: hidden; }
.is-sheet .dock { visibility: hidden !important; }
.dock.is-ready { visibility: visible; }
.dock-bar { display: flex; align-items: center; gap: 10px; pointer-events: auto; transition: transform var(--t-mid) var(--ease-ui); }
.dock.is-yield:not(.is-open) .dock-bar { transform: translateY(calc(100% + 40px)); }
.dock.is-yield.is-gone:not(.is-open) .dock-bar { visibility: hidden; }
.dock-friend { position: relative; display: block; width: 64px; height: 64px; padding: 0; border: 0; border-radius: var(--r-pill); background: transparent; cursor: pointer; -webkit-user-select: none; user-select: none; }
.dock-friend:active { transform: scale(.96); }
.dock-friend svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.dock-kakao { display: none !important; }
.dock-panel { position: absolute; right: 0; bottom: 80px; width: 360px; padding: 20px 20px 18px; border: 1.5px solid var(--ink); border-radius: var(--r-paper); background: var(--paper); color: var(--ink); pointer-events: auto; }
.dock-panel[hidden] { display: none; }
.dock-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dock-head .t-label { padding-top: 12px; color: var(--sub); }
.dock-close { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; margin: -2px -10px 0 0; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink); font: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
.dock-lines { margin: 8px 0 16px; padding: 14px 16px; list-style: none; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--page); }
.dock-lines li { font-size: 16px; line-height: 1.55; color: var(--ink); }
.dock-panel .btn-kakao, .dock-panel .btn-line { width: 100%; }
.dock-panel .btn-line { margin-top: 8px; }
.dock-panel [data-kakao-status] { margin: 6px 0 0; }
.dock-night { margin: 14px 0 0; font-size: 15px; line-height: 1.5; color: var(--sub); }
.dock-night a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--fl); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.dock-ask { margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: var(--sub); }
@media (max-width: 767px) {
  .dock { left: 0; right: 0; bottom: 0; }
  /* 띠 58(360×656 의 8.8% — 읽는 중 틀 ≤9% 계약) · 단추 48 위아래 5px(r7 55 → 3.5px 꽉 낌) */
  .dock-bar { box-sizing: border-box; height: calc(58px + env(safe-area-inset-bottom)); padding: 0 16px env(safe-area-inset-bottom) 10px; gap: 10px; border-top: 1px solid var(--line); background: var(--page); }
  .dock-friend { width: 44px; height: 44px; flex: none; }
  .dock-kakao { display: inline-flex !important; flex: 1; min-height: 48px; }
  .dock.is-yield:not(.is-open) .dock-bar { transform: translateY(100%); }
  /* 폰 시트: 바닥 띠를 덮는 종이 판(위 반경 18) */
  .dock-panel { position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-height: calc(100% - 72px); overflow: auto; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); border-width: 1.5px 0 0; border-radius: var(--r-paper) var(--r-paper) 0 0; }
}
@media (prefers-reduced-motion: reduce) { .dock-bar { transition: none; } }
