/* =========================================================
   심리케어24 모바일 다듬기 (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 #7d429a;
    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 #7d429a;
    background: #f9f4ff; color: #7d429a; 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 #ece3f3; box-shadow: 0 4px 16px rgba(125,66,154,.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, #7d429a, #b06ece); 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: #7d429a; color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }

/* ---------- 4. 이용안내 글 상자 (2.2.3, 옛 안내 그림 대신) ---------- */
.help-guide { background: #faf6fd; border: 1px solid #e6d8f0; border-radius: 16px; padding: 18px 16px; line-height: 1.65; }
.help-guide-head { text-align: center; margin-bottom: 14px; }
.help-guide-head strong { display: block; font-size: 18px; color: #5e3079; letter-spacing: -0.02em; }
.help-guide-head span { display: block; margin-top: 4px; font-size: 15px; font-weight: 700; color: #2b2233; }
.help-guide-head small { display: block; font-size: 12.5px; font-weight: 400; color: #746a7d; }
.help-guide-box { background: #fff; border: 1px solid #e9def2; border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.help-guide-box b { display: block; margin-bottom: 6px; color: #7d429a; font-size: 14.5px; }
.help-guide-box ol, .help-guide-box ul { margin: 0; padding-left: 20px; font-size: 14px; color: #37303d; }
.help-guide-box li { margin: 3px 0; }
.help-guide-foot { margin: 12px 0 0; font-size: 13px; color: #655c6d; text-align: center; }
