/* shared/mobile.css - 휴대폰 화면 기본 규칙 (모든 사이트 공통, 2026-10-31 새로 씀)
   unify.css 바로 다음에 불러온다. 각 사이트의 휴대폰 화면은 그 사이트의 mobile.css 가 맡는다
   (선교회 = member/css/mobile.css). 휴대폰 = 화면 폭 720px 이하 한 가지로 맞춘다.

   글자 크기 기준 (휴대폰)
     본문 · 입력 칸 16px  /  버튼 · 탭 15px  /  날짜 · 설명 같은 작은 글자 14px  /  배지 숫자만 12px
     카드 제목 20px  /  글 제목 16px  /  페이지 제목 24px
   누르는 곳은 높이 44px 이상, 칸 사이 16px, 화면 좌우 여백 16px */

:root {
    --m-fs: 16px;         /* 본문 */
    --m-fs-btn: 15px;     /* 버튼 · 탭 */
    --m-fs-meta: 14px;    /* 날짜 · 설명 · 표 */
    --m-fs-badge: 12px;   /* 배지 숫자 */
    --m-tap: 44px;        /* 누르는 곳 최소 높이 */
    --m-gap: 16px;        /* 칸 사이 */
}

@media (max-width: 720px) {
    html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
    body { line-height: 1.6; overflow-wrap: break-word; }

    /* 입력 칸 16px - 이보다 작으면 아이폰이 화면을 확대해 버린다 */
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
    select, textarea { font-size: 16px; }

    /* 사진 · 영상이 화면 밖으로 나가지 않게 */
    img, video, iframe { max-width: 100%; }

    /* ── 신학원 · 관리자 · 행정 네트워크 위쪽 오른쪽 버튼 (shared/site-header.js) ── */
    .lwh { gap: 2px; }
    .lwh-btn, .lwh-avatar { width: 38px; height: 38px; }
    .navbar-brand, .navbar-brand .logo-image { flex-shrink: 0; }
    .lwh-badge { min-width: 18px; height: 18px; font-size: var(--m-fs-badge); }
    .lwh-lang { height: 36px; padding: 0 3px 0 6px; }
    .lwh-lang svg { display: none; }
    .lwh-lang button { min-width: 32px; font-size: 13.5px; }
    .lwh-panel { position: fixed; top: calc(var(--lw-header-h, 60px) + 4px); right: 8px; left: 8px; max-width: none; width: auto; max-height: calc(100vh - var(--lw-header-h, 60px) - 16px); overflow-y: auto; }
    .lwh-sites .lw-site-row { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; grid-auto-rows: auto; gap: 16px 4px; }
    .lwh-sites .lw-site-row .app { font-size: 13px; }
    .lwh-notices header button { font-size: var(--m-fs-meta); padding: 8px 10px; }
    .lwh-notices li > a, .lwh-notices li > div { font-size: 15px; line-height: 1.5; padding-top: 10px; padding-bottom: 10px; }
    .lwh-notices small, .lwh-me small { font-size: 13px; }
    .lwh-empty, .lwh-guest { font-size: 15px; }

    /* ── 사이트 버튼 줄 (shared/site-row.js) - 한 줄에 4개
       (site-header.js 가 site-row.css 를 이 파일보다 뒤에 붙이는 페이지가 있어서 html 을 앞에 붙여 이기게 한다) ── */
    html .lw-site-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 4px; padding: 16px 6px; }
    html .lw-site-row .app { font-size: 13.5px; gap: 8px; }
    html[lang="es"] .lw-site-row .app { font-size: 13px; }
    html .lw-site-row .app-icon { width: 54px; height: 54px; font-size: 26px; border-radius: 10px; }

    /* ── 한국어 / 스페인어 버튼 ── */
    .lang-switch .lang-btn { font-size: 13.5px; padding: 6px 10px; }

    /* ── 교회 나라 탭 (shared/countries.js) - 옆으로 밀어서 ── */
    .lw-country-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-bottom: 12px; }
    .lw-country-tabs::-webkit-scrollbar { display: none; }
    .lw-country-tab { flex-shrink: 0; min-height: var(--m-tap); font-size: var(--m-fs-btn); }
    .lw-country-tab small { font-size: 13px; }

    /* ── 로그인 · 가입 · 비밀번호 찾기 화면 (shared/style.css - 선교회 · 신학원 · 관리자 공통) ── */
    .auth-header { padding: 32px 20px 28px; }
    .auth-body { padding: 26px 20px 24px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-row-end, .site-links, .hint, .twofa-secret { font-size: var(--m-fs-meta); }
    .site-links a { display: inline-block; padding: 6px 2px; }

    /* ── 성경 (shared/bible-book.css) ── */
    .bb-text { padding: 16px 14px; }
    .bb .bb-v { font-size: calc(17.5px * var(--bb-scale, 1)); line-height: 1.8; }
    .bb .bb-v sup { font-size: calc(13px * var(--bb-scale, 1)); }
    .bb-textstyle > span:first-child, .bb-textstyle button { font-size: var(--m-fs-meta); min-height: 40px; }
    .bb-books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bb .hy-count, .bb-note, .bb-hit b { font-size: var(--m-fs-meta); }
    .bb-scopes button, .bb-title-row .sc-link, .bb-selbar .sc-btn,
    .bb-showvers > span, .bb-showvers button { font-size: var(--m-fs-meta); min-height: 40px; }
    .bb-selbar-vers button { font-size: 13.5px; min-height: 36px; }
    .bb-tag { font-size: var(--m-fs-badge); }

    /* ── 달력 (shared/event-calendar.css) - 칸 안 막대 대신 점, 아래 목록은 한 줄로 ── */
    .evc-nav h3 { min-width: 0; font-size: 19px; }
    .evc-filter button { font-size: var(--m-fs-meta); min-height: 40px; }
    .evc-dow { font-size: 13px; }
    .evc-day { min-height: 54px; align-items: center; padding: 4px 2px; }
    .evc-num { align-self: center; font-size: 15px; }
    .evc-bars { display: none; }
    .evc-dots { display: flex; }
    .evc-below, .evc-two { grid-template-columns: minmax(0, 1fr); }
    .evc-detail { padding-left: 12px; }
    .evc-date small, .evc-item-text small { font-size: 13.5px; }
    .evc-item-text { font-size: 15.5px; }
    .evc-tag { font-size: var(--m-fs-badge); }
    .evc-actions button { font-size: var(--m-fs-meta); min-height: 40px; }
    .evc-modal-box label { font-size: 15px; }
}

/* 아주 좁은 휴대폰: 위쪽 도구 묶음의 집(선교회 홈) 버튼은 숨김 - 사이트(⊞) 버튼 안에 선교회 홈이 있다 */
@media (max-width: 420px) {
    .lwh .lwh-home { display: none; }
}
