/* =========================================================
   심리토크 모바일 다듬기 (2.1.0, 2026-11-24)
   - _Layout.cshtml 의 </body> 직전에서 마지막으로 읽힘 → 페이지별 CSS 위에 덮어씀
   - 이 파일 링크 한 줄만 빼면 원래 디자인으로 돌아감
   - 기준: 휴대폰 390px 실측 (본문 최소 12px, 보조 글자 최소 11px, 터치 영역 최소 32px)
   ========================================================= */

/* ---------- 1. 글꼴: Pretendard (OFL 오픈소스, 상업 무료) ---------- */
* {
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
                 "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "맑은 고딕", sans-serif;
}
/* 아이콘 글꼴은 그대로 */
[class^="xi-"], [class*=" xi-"], [class^="xi-"]::before, [class*=" xi-"]::before { font-family: 'xeicon' !important; }

html {
    -webkit-text-size-adjust: 100%;   /* 아이폰 가로 회전 때 글자 멋대로 커지는 것 방지 */
    text-size-adjust: 100%;
}
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    word-break: keep-all;               /* 한글 단어 중간에서 줄바꿈 안 되게 */
    overflow-wrap: anywhere;
}
a, button, label, [role="button"], input[type="radio"] + * {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;        /* 두 번 탭 확대 지연 제거 */
}
/* 키보드 사용자용 초점 표시 (마우스 클릭 땐 안 보임) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 2px solid #0e8079;
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 1-1. 휴대폰 문자 인증 (2.2.0) ---------- */
.pv-box { margin-top: 8px; }
.pv-row { display: flex; gap: 8px; align-items: center; }
.pv-row .pv-code { flex: 1; min-width: 0; }
.pv-send {
    flex-shrink: 0; height: 44px; padding: 0 14px; border-radius: 10px; border: 1.5px solid #0e8079;
    background: #f6fdfc; color: #0e8079; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.pv-send:disabled { opacity: .55; cursor: default; }
.pv-code { height: 44px; border: 1.5px solid #ddd; border-radius: 10px; padding: 0 12px; font-size: 16px; letter-spacing: 3px; }
.pv-msg { min-height: 18px; margin-top: 6px; font-size: 13px; color: #666; }
.pv-msg.pv-ok { color: #1a7a45; }
.pv-msg.pv-err { color: #dc2626; }
.pv-guard {
    max-width: 520px; margin: 18px auto; padding: 22px 18px; border-radius: 14px; background: #fff;
    border: 1px solid #e1f5f2; box-shadow: 0 4px 16px rgba(14, 128, 121, .08); text-align: center;
}
.pv-guard h3 { font-size: 18px; margin: 0 0 8px; color: #333; }
.pv-guard p { font-size: 14px; color: #666; line-height: 1.6; margin: 0 0 14px; }
.pv-guard .pv-row { justify-content: center; }
.pv-guard .pv-submit {
    margin-top: 12px; width: 100%; height: 46px; border: 0; border-radius: 12px; color: #fff; font-weight: 700; font-size: 15px;
    background: linear-gradient(135deg, #0e8079, #149e95); cursor: pointer;
}

/* ---------- 2. 휴대폰 (768px 이하) ---------- */
@media (max-width: 768px) {

    /* 입력칸 16px 미만이면 아이폰이 화면을 확대함 → 16px 고정 */
    input[type="text"], input[type="tel"], input[type="email"], input[type="password"],
    input[type="search"], input[type="number"], select, textarea {
        font-size: 16px !important;
    }

    /* 하단 메뉴 글자 키움 (아이폰 홈 막대 여백은 _Layout 인라인 스타일에 이미 있음) */
    #bottom-nav .bnav-item span { font-size: 12px; font-weight: 600; }
    body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }

    /* 메인 - 상담사 카드 */
    .spec-track .spec-tag            { font-size: 11.5px; }
    .heart-btn .heart-count,
    .name-heart .heart-count         { font-size: 12px; }
    .thumb .profile-link-btn         { font-size: 12.5px; min-height: 28px; }
    .call-buttons .call-btn          { font-size: 13px; min-height: 36px; font-weight: 700; }
    .live-badge #live-counselor-count{ font-size: 12.5px; }
    .photo-status-banner             { font-size: 12.5px; }

    /* 전화상담 결제(/Charge) */
    .charge-card-inner .charge-vat   { font-size: 11.5px; }
    .charge-card-inner .charge-point { font-size: 13px; }
    .charge-method-card .charge-card-inner > div { font-size: 11px !important; color: #888 !important; }

    /* 선불 포인트 충전(/Charge/Pay) */
    .pay-amount-point                { font-size: 12.5px; }
    .pay-amount-badge                { font-size: 10.5px; padding: 1px 7px; }
    .pay-method-card                 { font-size: 13px; }
    .pay-method-card small           { font-size: 11px !important; }
    .pay-method-info                 { font-size: 13px; line-height: 1.6; }
    .pay-method-info-sub             { font-size: 12px; }
    .pay-phone-error, .pay-phone-ok  { font-size: 12.5px; }
    .pay-bank-owner                  { font-size: 12px; }
    .pay-bank-desc                   { font-size: 12.5px; line-height: 1.6; }
    .pay-trust-text                  { font-size: 12.5px; line-height: 1.55; }
    .pay-notice                      { font-size: 13px; line-height: 1.65; }
    .pay-phone-input                 { height: 46px; }

    /* 약관 · 개인정보처리방침: 양쪽 정렬은 좁은 화면에서 단어 사이가 크게 벌어짐 → 왼쪽 정렬 */
    .policy-section p                { text-align: left; line-height: 1.75; }

    /* 로그인 */
    .auth-forgot                     { font-size: 13px; padding: 6px 0; }

    /* 공용 푸터: 읽기 쉽게 + 링크 누르기 쉽게 */
    .site-footer .footer-about p,
    .site-footer .footer-info p      { font-size: 12.5px; line-height: 1.65; }
    .site-footer .footer-links ul    { gap: 0 4px; }
    .site-footer .footer-links ul li a { font-size: 13px; display: inline-block; padding: 8px 6px; }
    .site-footer .footer-bottom      { font-size: 11.5px; }
}

/* ---------- 3. 카카오톡 등 앱 안 브라우저 안내 띠 (2.2.0, inapp.js) ---------- */
.inapp-notice { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 12px;
    border-radius: 12px; background: #fff8e1; border: 1px solid #f3dc8a; color: #5b4a12; font-size: 13px; line-height: 1.55; text-align: left; }
.inapp-notice span { flex: 1; }
.inapp-notice button { flex-shrink: 0; height: 36px; padding: 0 12px; border-radius: 9px; border: 0;
    background: #0e8079; color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }

/* ---------- 4. 심리토크: 고민 주제 고르기 ---------- */
.topic-row { display: flex; gap: 8px; margin: 12px 0 0; padding: 2px 2px 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.topic-row::-webkit-scrollbar { display: none; }
.topic-chip { flex: 0 0 auto; height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.55); background: rgba(255,255,255,.16);
    color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.topic-chip:hover { background: rgba(255,255,255,.28); }
.topic-chip.is-on { background: #fff; color: #0e8079; border-color: #fff; }
.topic-chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- 5. 심리토크: 이용안내 글 상자 (옛 안내 그림 대신) ---------- */
.stk-guide { background: #f9fdfd; border: 1px solid #d7f3ef; border-radius: 16px; padding: 18px 16px; line-height: 1.65; }
.stk-guide-head { text-align: center; margin-bottom: 14px; }
.stk-guide-head strong { display: block; font-size: 18px; color: #0c615c; letter-spacing: -0.02em; }
.stk-guide-head span { display: block; margin-top: 4px; font-size: 15px; font-weight: 700; color: #2a3a3a; }
.stk-guide-head small { display: block; font-size: 12.5px; font-weight: 400; color: #6b7a7a; }
.stk-guide-box { background: #fff; border: 1px solid #d9f2ef; border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.stk-guide-box b { display: block; margin-bottom: 6px; color: #0e8079; font-size: 14.5px; }
.stk-guide-box ol, .stk-guide-box ul { margin: 0; padding-left: 20px; font-size: 14px; color: #344747; }
.stk-guide-box li { margin: 3px 0; }
.stk-guide-foot { margin: 12px 0 0; font-size: 13px; color: #6b7a7a; text-align: center; }

/* ---------- 6. 심리토크: 친구 같은 민트 색 (1.0.0) ----------
   버튼 · 본문 강조 #0e8079(흰 글자 대비 4.8:1) · 상표 민트 #0f8a82 · 밝은 민트 #2bb5a3(테두리 · 장식) · 하늘색 #5ab8f0(보조 장식)
   밝은 민트 · 하늘색은 흰 바탕 본문 글자에 쓰지 않습니다(대비 부족) · 바탕 #f3fbfa */
body { background: #f3fbfa; }
.hero-section { box-shadow: 0 6px 18px rgba(11, 86, 81, 0.22); border: 1px solid rgba(43, 181, 163, 0.45); }
#main-hero-title::after { content: ''; display: block; width: 48px; height: 3px; margin: 10px auto 0; border-radius: 3px; background: linear-gradient(90deg, #2bb5a3, #5ab8f0); }
.hero-subtitle { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.topic-chip { border-color: rgba(255, 255, 255, 0.6); }
.topic-chip.is-on { background: #fff; color: #0b4f4b; border-color: #5ab8f0; box-shadow: 0 0 0 2px rgba(90, 184, 240, 0.45); }
.topic-chip:focus-visible { outline-color: #5ab8f0; }
.site-footer .footer-about .footer-logo img { filter: none; opacity: 1; }
.site-footer .footer-links ul li a:hover { color: #8fe3d6; }
.site-footer .footer-info strong { color: #e6f8f5; }
.stk-guide { border-color: #c0ece6; }
.stk-guide-head strong { color: #0e8079; }
