/* ============================================================
 * 상담소 v2 (saju_reading_index_v2.php) — 화상 상담 · 질문 상담 두 탭
 *  - 시안 docs/202061118_renew_main/md-counsel.css 를 옮긴 것: 머리 · 탭 · 거르기 칩 · 선생님 카드(.vc-card)
 *  - 질문 상담은 시안에 없어 같은 카드 틀에 질문 상담 정보를 담는다
 *  - 폰 1열 · 태블릿 2열 · PC 3열 (md2_pc.css 상단 메뉴가 있으면 제목 줄은 숨긴다)
 *  - body.md2 아래만
 * ============================================================ */
body.md2 .ck-page { padding-bottom: 96px; min-height: 100vh; background: var(--bg); }

/* 머리 (시안 .vc-head) */
body.md2 .ck-head { position: sticky; top: var(--md2-top); z-index: 5; background: var(--bg); padding: 12px var(--md2-gutter) 0; }
body.md2 .ck-head-row { display: flex; align-items: center; justify-content: space-between; height: 40px; }
body.md2 .ck-title { margin: 0; font-family: var(--title); font-weight: 800; font-size: 22px; letter-spacing: -0.04em; color: var(--ink); }
body.md2 .ck-head-r { display: flex; align-items: center; gap: 8px; }
body.md2 .ck-points { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 4px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.md2 .ck-p { width: 24px; height: 24px; border-radius: 12px; background: var(--seal); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
body.md2 .ck-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; margin-top: 8px; border-bottom: 1px solid var(--line); }
body.md2 .ck-tab { height: 44px; font-size: 15px; font-weight: 600; color: var(--ink-3); white-space: nowrap; transition: color var(--md-select-dur); }
body.md2 .ck-tab.on { color: var(--ink); font-weight: 700; }
body.md2 .ck-tab-ink { position: absolute; left: 0; bottom: -1px; width: 50%; height: 2.5px; background: var(--ink); transform: translateX(100%); transition: transform .3s var(--md-ease); }
body.md2 .ck-tabs.is-video .ck-tab-ink { transform: none; }
body.md2 .ck-panel { padding-bottom: 8px; }

/* 화상 — 곧 열려요 (CLINIC_VIDEO_OPEN = false 일 때) */
body.md2 .ck-soon { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 72px 24px 40px; }
body.md2 .ck-soon-ic { width: 52px; height: 52px; border-radius: 26px; background: var(--green); color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px rgba(112,255,24,.18); margin-bottom: 8px; }
body.md2 .ck-soon b { font-family: var(--title); font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
body.md2 .ck-soon span { font-size: 14px; line-height: 1.6; color: var(--ink-3); }
body.md2 .ck-soon-btn { margin-top: 14px; height: 44px; padding: 0 20px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; }

/* 거르기 칩 (시안 .vc-filters) */
body.md2 .vc-filters { display: flex; align-items: center; gap: 6px; padding: 18px var(--md2-gutter) 8px; overflow-x: auto; scrollbar-width: none; }
body.md2 .vc-filters::-webkit-scrollbar { display: none; }
body.md2 .vc-chip { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; height: 32px; padding: 0 13px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); white-space: nowrap; transition: background-color var(--md-select-dur), border-color var(--md-select-dur), color var(--md-select-dur); }
body.md2 .vc-chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
body.md2 .vc-chip.globe { color: var(--blue-ink); border-color: #9FD3FF; background: var(--blue-soft); }
body.md2 .vc-chip.globe.on { background: var(--blue); border-color: var(--blue); color: #fff; }

/* 수 · 토글 · 정렬 (시안 .vc-filters2 — 정렬은 시안에 없어 같은 줄 오른쪽에 작게) */
body.md2 .vc-filters2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 var(--md2-gutter) 12px; font-size: 12.5px; color: var(--ink-3); min-height: 30px; }
body.md2 .vc-filters2 > span { white-space: nowrap; }
body.md2 .vc-filters2 b { color: var(--ink); font-weight: 700; }
body.md2 .vc-filters2 b.g { color: var(--green-ink); }
body.md2 .vc-f2-r { display: flex; align-items: center; gap: 12px; margin-left: auto; }
body.md2 .vc-toggle { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
body.md2 .vc-toggle i { width: 30px; height: 18px; border-radius: 9px; background: var(--line); position: relative; transition: background-color .2s; flex: none; }
body.md2 .vc-toggle i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 7px; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
body.md2 .vc-toggle.on { color: var(--ink); }
body.md2 .vc-toggle.on i { background: var(--green); }
body.md2 .vc-toggle.on i::after { transform: translateX(12px); }
body.md2 .vc-sort { display: flex; gap: 2px; }
body.md2 .vc-sort button { height: 26px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; transition: color var(--md-select-dur), background-color var(--md-select-dur); }
body.md2 .vc-sort button.on { color: var(--ink); background: var(--paper); }
body.md2 .ck-mine { position: relative; font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
body.md2 .ck-dot { display: inline-block; width: 6px; height: 6px; margin-left: 3px; border-radius: 3px; background: var(--accent); vertical-align: 6px; }

/* 카드 목록 (시안 .vc-list) — 폰 1열 */
body.md2 .vc-list { padding: 0 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
body.md2 .vc-none { grid-column: 1 / -1; text-align: center; padding: 40px 0; color: var(--ink-3); font-size: 14px; }
body.md2 .vc-none button { display: block; margin: 12px auto 0; height: 36px; padding: 0 14px; border-radius: 10px; background: var(--paper); font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* 선생님 카드 (시안 .vc-card) */
body.md2 .vc-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
/* 사진은 고정 높이 대신 비율로 — 카드가 넓어져도 얼굴이 잘리지 않게 (고정 188px 은 넓은 화면에서 이마만 보였다) */
body.md2 .vc-card-media { position: relative; aspect-ratio: 4 / 3; cursor: pointer; overflow: hidden; background: var(--paper-2); }
body.md2 .vc-card-media .md2-ph { position: absolute; inset: 0; background-position: 50% 25%; }
body.md2 .vc-card-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, transparent 30%, transparent 50%, rgba(0,0,0,.7) 100%); pointer-events: none; }
body.md2 .vc-badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
body.md2 .vc-badge { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: #fff; padding: 5px 10px; border-radius: 99px; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); white-space: nowrap; }
body.md2 .vc-badge svg { flex-shrink: 0; }
body.md2 .vc-badge.live { background: var(--green); color: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
body.md2 .vc-badge.instant { background: var(--accent); color: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
body.md2 .vc-badge.request { background: rgba(255,255,255,.92); color: var(--blue-ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
body.md2 .vc-badge.globe { background: rgba(62,166,255,.92); }
body.md2 .vc-badge.event { background: var(--accent); -webkit-backdrop-filter: none; backdrop-filter: none; }
body.md2 .vc-badge.r { margin-left: auto; }
body.md2 .vc-card-name { position: absolute; left: 14px; right: 14px; bottom: 12px; color: #fff; display: flex; flex-direction: column; gap: 2px; }
body.md2 .vc-card-name b, body.md2 .vc-card-name a { font-family: var(--title); font-weight: 800; font-size: 21px; letter-spacing: -0.03em; color: #fff; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: flex-start; max-width: 100%; }
body.md2 .vc-card-name span { font-size: 12px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.md2 .vc-card-body { flex: 1; display: flex; flex-direction: column; padding: 12px 14px 14px; }
body.md2 .vc-card-body p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.md2 .vc-card-gap { flex: 1 0 0; }
body.md2 .vc-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
body.md2 .vc-price { white-space: nowrap; }
body.md2 .vc-price b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
body.md2 .vc-price span { font-size: 12px; color: var(--ink-3); margin-left: 3px; }
body.md2 .vc-card-acts { display: flex; gap: 6px; flex-shrink: 0; }
body.md2 .vc-btn, body.md2 .vc-btn-line { height: 38px; padding: 0 16px; border-radius: 10px; font-size: 13.5px; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
body.md2 .vc-btn { background: var(--seal); color: #fff; }
body.md2 .vc-btn-line { border: 1px solid var(--line); color: var(--ink); background: var(--card); }
body.md2 .vc-btn.instant { background: var(--accent); color: #fff; padding: 0 18px; }
body.md2 .vc-btn.now { background: var(--green); color: var(--ink); box-shadow: 0 4px 12px -4px rgba(112,255,24,.8); }
body.md2 .vc-btn.request { background: var(--card); color: var(--blue-ink); border: 1.5px solid var(--blue); }
body.md2 .vc-btn:disabled, body.md2 .vc-btn-line:disabled { background: var(--paper-2); color: var(--ink-3); border-color: transparent; box-shadow: none; cursor: default; }
/* 가장 빠른 예약 띠 (즉시 예약) · 예약 요청 띠 */
body.md2 .vc-earliest, body.md2 .vc-reqnote { display: flex; align-items: baseline; gap: 8px; margin: -2px 0 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; white-space: nowrap; min-width: 0; }
body.md2 .vc-earliest { background: var(--accent-soft-2); border: 1px solid #FFC2CF; }
body.md2 .vc-earliest-k { font-size: 11.5px; font-weight: 700; color: var(--accent); }
body.md2 .vc-earliest b { font-size: 15px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
body.md2 .vc-earliest em { font-style: normal; margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--accent); background: #FFD6DF; padding: 2px 8px; border-radius: 99px; }
body.md2 .vc-earliest.none { background: var(--paper); border-color: var(--line); cursor: default; }
body.md2 .vc-earliest.none b { font-size: 13.5px; font-weight: 700; color: var(--ink-3); }
body.md2 .vc-reqnote { background: var(--blue-soft); border: 1px dashed #9FD3FF; }
body.md2 .vc-reqnote-k { font-size: 11.5px; font-weight: 700; color: var(--blue-ink); }
body.md2 .vc-reqnote b { font-size: 13.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
body.md2 .vc-reqnote em { font-style: normal; margin-left: auto; font-size: 11px; color: var(--ink-3); }
body.md2 .vc-reqnote.off { cursor: default; }
body.md2 .vc-langs { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12px; color: var(--blue-ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 질문 상담 카드 — 고민 분야 · 답변 방식 */
body.md2 .vc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
body.md2 .vc-tags span { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--paper); color: var(--ink-2); }

/* 고민 남기기로 */
body.md2 .ck-ask { display: flex; align-items: center; gap: 12px; margin: 20px 16px 0; padding: 16px; border-radius: 16px; background: var(--blue-soft); text-decoration: none; }
body.md2 .ck-ask-t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
body.md2 .ck-ask-t b { font-size: 14.5px; font-weight: 700; color: var(--ink); }
body.md2 .ck-ask-t span { font-size: 12.5px; color: var(--blue-ink); }
body.md2 .ck-ask-go { font-size: 24px; color: var(--blue-ink); line-height: 1; }

/* 폰 — 수 · 정렬 · 토글이 한 줄에 다 안 들어가면 정렬 · 토글을 아래 줄로 (가로 넘침 방지) */
body.md2 .vc-filters2 { flex-wrap: wrap; row-gap: 6px; }
@media (max-width: 430px) {
    body.md2 .vc-sort button { padding: 0 5px; }
    body.md2 .vc-f2-r { gap: 8px; }
}

/* 큰 폰 · 태블릿 — 카드 2열 (한 열로 넓게 늘이면 사진이 너무 커진다) */
@media (min-width: 600px) {
    body.md2 .vc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* 2열 카드는 폭이 좁아 사진을 세로로 조금 길게 — 얼굴이 덜 잘리게 */
    body.md2 .vc-card-media { aspect-ratio: 1 / 1; }
}
/* PC — 넓은 틀(md2-wide 1120) · 카드 3열 · 탭은 왼쪽에 좁게 */
@media (min-width: 100000px) { /* PC 틀 꺼 둠 — 넓은 화면도 태블릿 틀(750 · 하단 탭바). 다시 켜려면 1024px */
    body.md2 .ck-head { padding-top: 20px; }
    body.md2 .ck-tabs { grid-template-columns: 180px 180px; }
    body.md2 .ck-tab-ink { width: 180px; transform: translateX(180px); }
    body.md2 .ck-tab { font-size: 16px; }
    body.md2 .vc-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--md2-grid-gap); padding: 0 var(--md2-gutter); }
    body.md2 .vc-filters { padding-top: 22px; }
    body.md2 .ck-ask { margin: 28px var(--md2-gutter) 0; padding: 20px 22px; }
    body.md2 .vm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (hover: hover) {
    body.md2 .vc-chip:not(.on):hover { border-color: #C9CED6; }
    body.md2 .vc-btn:not(:disabled):hover, body.md2 .vc-btn-line:not(:disabled):hover { filter: brightness(1.06); }
    body.md2 .ck-tab:not(.on):hover { color: var(--ink-2); }
    body.md2 .ck-ask:hover { filter: brightness(.98); }
}
@media (prefers-reduced-motion: reduce) {
    body.md2 .ck-tab-ink, body.md2 .ck-tab, body.md2 .vc-toggle i, body.md2 .vc-toggle i::after, body.md2 .vc-chip, body.md2 .vc-sort button { transition: none; }
}
