/* ===== 고객센터(support.html) 전용 — 접두사 sp- =====
   공통 부품(tk.css: .tabs .input .select .check .rows .card .chip .faq-item/.faq-q/.faq-a .btn .field-*)을 먼저 쓰고, 여기엔 이 페이지의 배치만.
   ▣ 탭 3개(자주 묻는 질문·공지사항·1:1 문의)는 같은 12열 4:8 — 왼쪽 = 그 탭의 안내·도구, 오른쪽 = 본문. 탭을 바꿔도 본문 시작선이 그대로.
   ▣ 제휴·파트너 문의는 사용자 지원과 성격이 달라 탭 밖 아래 구역(바닥글 #partner로 바로 내려옴), 홈 질문 구역과 같은 4:8.
   ▣ 머리·탭은 공통(.page-top/.page-head, .page-tabs/.page-panel — tk.css). 여기 간격은 입력 묶음 사이 24 · 설명→버튼 32. */

/* ── 탭 패널: 공통 .page-panel(탭 밑선→본문 32/32/24) 안에 12열 격자 ── */
.sp-grid { align-items: start; }
/* 첫 내용이 글인 패널은 패널 자체가 포커스를 받음(APG). 패널 위 안쪽 여백 32 때문에 패널 테두리는 탭 밑선에 겹침 → 테두리는 안쪽 격자에 그림 */
.sp-panel:focus-visible { outline: none; }
.sp-panel:focus-visible > .sp-grid { outline: 2px solid var(--focus); outline-offset: 8px; border-radius: var(--r-sm); }
.sp-side { grid-column: 1 / span 4; min-width: 0; }
.sp-main { grid-column: 5 / span 8; min-width: 0; }
.sp-side-text { color: var(--text-2); max-width: 360px; }

/* ── 자주 묻는 질문: 검색·분류(왼쪽, 넓은 화면에선 따라 내려옴) ── */
.sp-faq-side { position: sticky; top: 88px; } /* 머리줄 64 + 24 */
.sp-search-box { position: relative; }
.sp-search-ico { position: absolute; inset-inline-start: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--text-3); pointer-events: none; }
.input.sp-q { padding-inline-start: 44px; -webkit-appearance: none; appearance: none; } /* 돋보기 16 + 20 + 간격 8 */
.sp-q::-webkit-search-decoration { -webkit-appearance: none; }
.sp-cats-wrap { margin-top: 24px; }
.sp-cats { display: flex; flex-wrap: wrap; gap: 8px; }
/* 분류 알약: 선택 = 세그먼트와 같은 말(회색 면 + --text-3 테두리 + 600). 굵기가 바뀌어도 폭이 안 흔들리게 굵은 글자 폭을 미리 잡음 */
.sp-cat { position: relative; display: inline-flex; align-items: center; height: 40px; padding: 1px 16px 0; border-radius: var(--r-pill); border: 1px solid var(--line-2); font-size: 14px; line-height: 22px; font-weight: 500; color: var(--text-2); white-space: nowrap; } /* 전환 효과 없음: 선택이 바로 바뀌게(탭과 같은 방식) */
.sp-cat:where(:not(:disabled)):hover { color: var(--text); background: var(--ghost-hover); } /* 비활성(빌드가 미리 넣은 단추 — support.js가 활성으로 다시 그리기 전)은 마우스 반응 없음. :where로 우선순위를 .sp-cat:hover와 같게(0,2,0) — 아래 선택 규칙(aria-pressed)이 이겨 선택 배경 유지 */
.sp-cat:disabled { cursor: default; }
.sp-cat[aria-pressed="true"] { background: var(--seg-on); border-color: var(--text-3); color: var(--text); font-weight: 600; }
.sp-cat span { display: inline-grid; }
.sp-cat span::after { content: attr(data-t); font-weight: 600; height: 0; overflow: hidden; visibility: hidden; }

/* ── 자주 묻는 질문: 목록(공통 .faq-item을 선 목록으로) ── */
.sp-count { font-size: 14px; line-height: 22px; color: var(--text-2); overflow-wrap: anywhere; }
.sp-faq { margin-top: 16px; border-top: 1px solid var(--line); }
.sp-empty { padding-block: 24px; border-bottom: 1px solid var(--line); }
.sp-empty-t { font-size: 18px; line-height: 26px; font-weight: 600; overflow-wrap: anywhere; }
.sp-empty-d { margin-top: 8px; color: var(--text-2); }
.sp-empty-act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; } /* 버튼 사이 12(사이트 공통) */
.sp-more { margin-top: 24px; font-size: 14px; line-height: 22px; color: var(--text-2); }

/* ── 공지사항 목록(공통 .rows 상자) ── */
.sp-nlist > a { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; column-gap: 16px; transition: background-color .15s; }
.sp-ntitle { font-size: 16px; line-height: 26px; font-weight: 600; text-wrap: pretty; } /* 두 줄로 접힐 때 끝에 한 낱말만 남지 않게 */
.sp-ntitle .chip { margin-inline-end: 8px; vertical-align: 1px; }
.sp-nmeta { font-size: 14px; line-height: 22px; color: var(--text-3); white-space: nowrap; }
.sp-ngo { color: var(--text-3); font-size: 20px; line-height: 1; text-align: end; margin-top: -3px; transition: transform .15s var(--ease), color .15s; }
.sp-nlist > a:hover .sp-ngo { color: var(--text); transform: translateX(2px); }
.sp-nempty { color: var(--text-2); }

/* ── 1:1 문의: 왼쪽 안내 ── */
.sp-side-h { font-size: 18px; line-height: 26px; font-weight: 700; letter-spacing: -0.015em; }
.sp-tips { margin-top: 8px; display: grid; gap: 8px; color: var(--text-2); max-width: 360px; } /* 제목→본문 8(카드 제목과 같은 값) */
.sp-tips li { position: relative; padding-inline-start: 12px; }
.sp-tips li::before { content: ""; position: absolute; inset-inline-start: 0; top: 11px; width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }
.sp-tips b { color: var(--text); font-weight: 600; }
.sp-side-mail { margin-top: 24px; font-size: 14px; line-height: 22px; color: var(--text-2); }

/* ── 1:1 문의: 폼(입력 묶음 사이 24, 두 칸 줄은 12열의 절반씩) ── */
.sp-form .field { margin-top: 24px; }
.sp-form .select.is-empty { color: var(--text-3); } /* 필수 칸이 아직 '골라 주세요'면 자리 글(placeholder)처럼 */
.sp-form .select option { color: var(--text); }
.sp-form > .field:first-child { margin-top: 0; }
.sp-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.sp-help-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.sp-help-row .field-help { margin-bottom: 0; }
.sp-help-row .field-help:first-child { flex: 1; min-width: 0; }
.sp-counter { flex: none; }
.sp-agree { margin-top: 12px; } /* 체크 줄의 위아래 11은 누르는 칸 — 잉크 기준으로 다른 입력 묶음 사이와 같게(28.6 / 29.1) */
.sp-form .field-err:last-child { margin-bottom: -5px; } /* 묶음 끝 오류 글줄의 아래 여백 상쇄 → 오류가 떠도 묶음 사이 잉크 간격 그대로 */
.sp-agree-line { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; } /* '내용 보기'는 동의 문구 바로 옆(무엇의 내용인지 붙여서) */
.sp-agree-btn { position: relative; font-size: 14px; line-height: 22px; font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); white-space: nowrap; }
.sp-agree-btn::after { content: ""; position: absolute; inset: -11px -8px; } /* 누르는 칸 44 */
.sp-agree-btn:hover, .sp-agree-btn[aria-expanded="true"] { text-decoration-color: currentColor; }
.sp-agree-detail { display: grid; gap: 4px; margin-top: 4px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 13px; line-height: 20px; color: var(--text-2); }
.sp-agree-detail > div { display: flex; gap: 12px; }
.sp-agree-detail dt { flex: none; width: 56px; color: var(--text-3); }
.sp-agree-detail dd { text-wrap: pretty; }
.sp-agree .field-err { margin-top: 0; }
.sp-submit { margin-top: 32px; }
.sp-preview { margin-top: 16px; font-size: 14px; line-height: 22px; color: var(--text-2); } /* 동의 줄(누르는 칸 11 포함) → 안내 잉크 32 = 설명→버튼 */
.sp-preview + .sp-submit { margin-top: 12px; } /* 미리보기 안내는 버튼에 붙은 설명 */

/* ── 1:1 문의: 보낸 뒤 ── */
.sp-done { padding-top: calc(var(--pad) - 4px); } /* 제목 글줄 위 여백 4 상쇄 → 위아래 같은 안쪽 여백 */
.sp-done-t { font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; } /* 좁은 폰에서 두 줄일 때 한쪽으로 쏠리지 않게 */
.sp-done-t:focus { outline: none; }
.sp-done-d { margin-top: 8px; color: var(--text-2); overflow-wrap: anywhere; }
.sp-done-d b { color: var(--text); font-weight: 600; }
.sp-done-btn { margin-top: 24px; }

/* ── 제휴·파트너 문의(탭 밖 구역, 4:8) ── */
.sp-partner { padding-bottom: var(--section); }
.sp-pwrap { align-items: start; }
.sp-pside { grid-column: 1 / span 4; }
.sp-pmain { grid-column: 5 / span 8; }
.sp-plead { margin-top: 16px; color: var(--text-2); }
.sp-partner p, .sp-side-text, .sp-tips li, .sp-empty-d, .sp-preview { text-wrap: pretty; }
.sp-done-d { text-wrap: balance; } /* 두 줄짜리 안내라 고르게(pretty는 1440에서 끝 구절 77/595px만 남음) */ /* 마지막 줄에 낱말 하나만 남지 않게 */
.sp-pcontact { padding-top: 2px; } /* 첫 글줄 잉크 윗선 = 왼쪽 제목 잉크 윗선(1440 실측 차 0.5) */
.sp-pmail-d { color: var(--text-2); }
.sp-pmail { margin-top: 8px; font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.sp-pact { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.sp-copied { margin-top: 12px; font-size: 14px; line-height: 22px; color: var(--text-2); }
.sp-copied:empty { display: none; }

/* ── 반응형 ── */
@media (max-width: 960px) {
  .sp-side, .sp-main, .sp-pside, .sp-pmain { grid-column: 1 / -1; }
  .sp-grid, .sp-pwrap { row-gap: 32px; }
  .sp-faq-side { position: static; }
  .sp-pcontact { padding-top: 0; }
  .sp-side-text, .sp-tips { max-width: 640px; }
}
@media (max-width: 640px) {
  .sp-grid, .sp-pwrap { row-gap: 24px; }
  .sp-row { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .sp-cat::after { content: ""; position: absolute; inset: -2px 0; } /* 보이는 높이 40, 누르는 칸 44(줄 사이 8이라 안 겹침) */
  .sp-nlist > a { grid-template-columns: minmax(0, 1fr) 20px; grid-template-areas: "t go" "m go"; row-gap: 4px; padding-bottom: 15px; } /* 아래가 작은 글줄(14/22)이라 1 줄임 — 딱지 줄(위 19)과 글자 줄(위 21) 둘 다 위아래 차 1 안쪽 */
  .sp-ntitle { grid-area: t; }
  .sp-nmeta { grid-area: m; }
  .sp-ngo { grid-area: go; }
  .sp-submit .btn, .sp-pact .btn { width: 100%; }
  .sp-pact { display: grid; grid-template-columns: 1fr 1fr; }
  .sp-pmail { font-size: 18px; line-height: 26px; }
}
