/* ============================================================================
 * mobile-concept-hs.css — 홈스테이 /homestay_shool 모바일(≤767px) 전용 배치 (opt-in 프로젝트 mobile · 사이클 2)
 * 확정 목업 「나안」 규격(보딩스쿨 mobile-concept.css 와 같은 값). 폭 ≤ 767px · body.page-hs 한정, 768px 이상 무영향.
 * 마크업·스크립트·링크는 그대로 두고 배치·모양만 바꾼다 (기능 100% 보존).
 * ========================================================================== */

@media (max-width: 767px) {

    body.page-hs {
        --mh-g: #1f6b45; --mh-g2: #2e8557; --mh-ink: #152420; --mh-sub: #5c6b64;
        --mh-line: #e1e9e4; --mh-bg: #f3f8f5; --mh-mint: #e3f2e9; --mh-yel: #ffd24a;
        background: var(--mh-bg);
    }
    body.page-hs [id^="section-"] { scroll-margin-top: 84px; }

    /* ---------- C1 짧은 상단 ---------- */
    body.page-hs .hero { padding: 14px 16px 12px; text-align: left; background: linear-gradient(135deg, #0d3a27 0%, #1f6b45 100%); }
    body.page-hs .hero::before { display: none; }
    body.page-hs .hero .hero-inner { display: flex; flex-direction: column; padding: 0; max-width: none; margin: 0; }
    body.page-hs .hero .hero-badge { display: none; }
    body.page-hs .hero .hero-lead { order: -1; margin: 0 0 3px; font-size: 11.5px; color: #c4e3d0; opacity: 1; text-align: left; max-width: none; }
    body.page-hs .hero .hero-title { margin: 0 0 4px; font-size: 18px; line-height: 1.35; letter-spacing: -.02em; text-align: left; word-break: keep-all; }
    body.page-hs .hero .hero-title em { color: var(--mh-yel); font-style: normal; }
    body.page-hs .hero .hero-stats { display: flex; justify-content: flex-start; gap: 14px; margin-top: 8px; }
    body.page-hs .hero .hero-stat { display: flex; gap: 4px; align-items: baseline; padding: 0; text-align: left; }
    body.page-hs .hero .hero-stat + .hero-stat::before { display: none; }
    body.page-hs .hero .hero-stat .num { font-size: 14px; color: var(--mh-yel); font-weight: 800; }
    body.page-hs .hero .hero-stat .lbl { font-size: 12px; opacity: .9; margin: 0; }

    /* ---------- 바로가기 4칸 (기존 sub-nav 재스타일 — 링크·자동 강조 그대로) ---------- */
    body.page-hs .sub-nav { position: static; box-shadow: none; border: 0; background: var(--mh-bg); padding: 12px 14px 4px; }
    body.page-hs .sub-nav .container { padding: 0; max-width: none; }
    body.page-hs .sub-nav .sub-nav-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0; overflow: visible; justify-content: stretch; }
    body.page-hs .sub-nav .sub-nav-list li { list-style: none; margin: 0; }
    body.page-hs .sub-nav .sub-nav-chip { display: grid; place-items: center; gap: 2px; min-height: 56px; padding: 8px 2px; background: #fff; border: 1px solid var(--mh-line); border-radius: 14px; font-size: 12px; font-weight: 800; color: var(--mh-ink); text-align: center; white-space: normal; box-shadow: none; }
    body.page-hs .sub-nav .sub-nav-chip::before { font-size: 18px; line-height: 1; }
    body.page-hs .sub-nav .sub-nav-list li:nth-child(1) .sub-nav-chip::before { content: "⭐"; }
    body.page-hs .sub-nav .sub-nav-list li:nth-child(2) .sub-nav-chip::before { content: "🏫"; }
    body.page-hs .sub-nav .sub-nav-list li:nth-child(3) .sub-nav-chip::before { content: "📄"; }
    body.page-hs .sub-nav .sub-nav-list li:nth-child(4) .sub-nav-chip::before { content: "❓"; }
    body.page-hs .sub-nav .sub-nav-chip.is-active { background: var(--mh-g); color: #fff; border-color: var(--mh-g); }

    /* ---------- 공통 배치: 여백·구간 ---------- */
    body.page-hs .wrap { box-sizing: border-box; width: 100%; min-width: 0; max-width: none; padding: 0 14px; margin: 0; flex: 1 1 100%; }
    body.page-hs .board-wrap { min-width: 0; }
    body.page-hs .page-section { padding: 12px 0 2px; background: transparent; }
    body.page-hs .page-section--muted { background: transparent; }
    body.page-hs .page-section .container, body.page-hs .page-section .container-narrow { padding: 0 !important; max-width: none; }
    body.page-hs .section-head { margin: 0 0 10px; padding: 0; }
    body.page-hs .section-title { font-size: 16px; font-weight: 800; letter-spacing: -.02em; color: var(--mh-ink); }
    body.page-hs .section-count { font-size: 12px; color: var(--mh-g2); font-weight: 700; }

    /* ---------- 추천 보딩스쿨: 세로 순위 행 (회원은 추천 전체가 그대로 보인다) ---------- */
    body.page-hs .feat-rail-wrap .feat-nav { display: none; }
    body.page-hs #hs_feat_rail { display: block; overflow: visible; padding: 0; margin: 0; background: #fff; border: 1px solid var(--mh-line); border-radius: 16px; }
    body.page-hs #hs_feat_rail .feat-card.card--rail, body.page-hs #hs_feat_rail .feat-card { max-width: none; flex: none; }
    body.page-hs #hs_feat_rail .feat-card { display: grid; grid-template-columns: 26px 44px minmax(0, 1fr) auto; grid-template-areas: "rk in nm pr" "rk in tg pr"; column-gap: 11px; row-gap: 2px; align-items: center; width: auto; min-width: 0; min-height: 54px; padding: 5px 12px; border: 0; border-bottom: 1px solid var(--mh-line); border-radius: 0; box-shadow: none; background: #fff; text-decoration: none; }
    body.page-hs #hs_feat_rail .feat-card:last-child { border-bottom: 0; }
    body.page-hs #hs_feat_rail .feat-rank { position: static; grid-area: rk; width: 26px; height: 26px; font-size: 12px; background: var(--mh-g); box-shadow: none; }
    body.page-hs #hs_feat_rail .feat-top, body.page-hs #hs_feat_rail .feat-body { display: contents; }
    body.page-hs #hs_feat_rail .feat-init { grid-area: in; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--mh-mint); color: var(--mh-g); font-family: inherit; font-size: 14px; font-weight: 800; }
    body.page-hs #hs_feat_rail .feat-prov { grid-area: tg; position: static; justify-self: start; align-self: center; min-width: 28px; text-align: center; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--mh-mint); color: var(--mh-g2); }
    body.page-hs #hs_feat_rail .feat-name { grid-area: nm; margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -.02em; color: var(--mh-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: auto; -webkit-line-clamp: unset; display: block; }
    body.page-hs #hs_feat_rail .feat-reason { grid-area: tg; justify-self: start; align-self: center; margin: 0 0 0 40px; font-size: 10.5px; font-weight: 700; line-height: 1.5; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
    body.page-hs #hs_feat_rail .feat-price { grid-area: pr; font-family: inherit; font-size: 13px; font-weight: 800; color: var(--mh-g); text-align: right; white-space: nowrap; }
    body.page-hs #hs_feat_rail .feat-price-unit { font-size: 10px; color: var(--mh-sub); }

    /* ---------- 전체 보딩스쿨: 칩 줄 + 목록 행 ---------- */
    body.page-hs .hs-gate-hint { margin: 0 0 8px; padding: 8px 12px; font-size: 11.5px; line-height: 1.45; border-radius: 12px; }
    body.page-hs .filter-bar { padding: 0; background: none; border: 0; box-shadow: none; margin: 0 0 8px; }
    body.page-hs .filter-row { margin: 0 0 6px; padding: 0; }
    body.page-hs .filter-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    body.page-hs .filter-chips { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; scrollbar-width: none; padding: 0 0 2px; }
    body.page-hs .filter-chips::-webkit-scrollbar { display: none; }
    body.page-hs .filter-chip { flex: 0 0 auto; min-height: 34px; padding: 6px 13px; border: 1px solid var(--mh-line); border-radius: 999px; background: #fff; color: var(--mh-sub); font-size: 12.5px; font-weight: 700; }
    body.page-hs .filter-chip.is-active { background: var(--mh-g); border-color: var(--mh-g); color: #fff; }
    body.page-hs .filter-search-input { width: 100%; min-height: 44px; border-radius: 12px; font-size: 13px; }

    body.page-hs #hs_card_list.cards { display: block; max-width: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--mh-line); border-radius: 16px; overflow: hidden; }
    body.page-hs #hs_card_list .province-header { padding: 8px 12px; margin: 0; font-size: 12px; font-weight: 800; color: var(--mh-g2); background: var(--mh-mint); }
    body.page-hs #hs_card_list .card { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 11px; align-items: center; min-height: 56px; padding: 6px 12px; margin: 0; border: 0; border-bottom: 1px solid var(--mh-line); border-radius: 0; box-shadow: none; background: #fff; text-decoration: none; }
    body.page-hs #hs_card_list .card:last-child { border-bottom: 0; }
    body.page-hs #hs_card_list .card { position: relative; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; row-gap: 2px; padding: 8px 12px; }
    body.page-hs #hs_card_list .card-av { grid-column: 1; grid-row: 1 / 3; align-self: center; width: 44px; height: 44px; margin: 0; border-radius: 12px; background: var(--mh-mint); border: 0; }
    body.page-hs #hs_card_list .card-av-initial { color: var(--mh-g); font-size: 12px; font-weight: 800; }
    body.page-hs #hs_card_list .card-body { grid-column: 2; grid-row: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding-right: 84px; }
    body.page-hs #hs_card_list .card-title { flex: 0 0 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    body.page-hs #hs_card_list .card-badges { margin: 0; }
    body.page-hs #hs_card_list .card-meta { flex: 1 1 auto; min-width: max-content; margin: 0; white-space: nowrap; }
    body.page-hs #hs_card_list .cost-strip { grid-column: 2; grid-row: 2; display: flex; align-items: baseline; gap: 5px; margin: 0; padding: 0; border: 0; background: none; white-space: nowrap; }
    body.page-hs #hs_card_list .cost-cell { display: flex; flex: 0 0 auto; width: auto; align-items: baseline; gap: 3px; padding: 0; text-align: left !important; }
    body.page-hs #hs_card_list .cost-cell--plus { font-size: 11px; color: var(--mh-sub); }
    body.page-hs #hs_card_list .cost-cell--plus:nth-last-child(2) { display: none; }
    body.page-hs #hs_card_list .cost-lbl { display: inline; font-size: 10px; color: var(--mh-sub); }
    body.page-hs #hs_card_list .cost-val { font-size: 12px; font-weight: 700; color: var(--mh-ink); }
    body.page-hs #hs_card_list .cost-cell--total { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: block; text-align: right !important; }
    body.page-hs #hs_card_list .cost-cell--total .cost-lbl { display: block; font-size: 10px; }
    body.page-hs #hs_card_list .cost-cell--total .cost-val { font-size: 14px; font-weight: 800; color: var(--mh-g); }
    body.page-hs #hs_card_list .card-head { display: contents; }
    body.page-hs #hs_card_list .card-title { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -.02em; color: var(--mh-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    body.page-hs #hs_card_list .card-badges { display: inline-flex; margin: 2px 6px 0 0; }
    body.page-hs #hs_card_list .card-meta { display: inline; margin: 0; font-size: 11.5px; color: var(--mh-sub); }
    body.page-hs #hs_card_list .card-meta { white-space: nowrap; }
    body.page-hs #hs_empty, body.page-hs #hs_show_more { margin-top: 10px; }

    /* ---------- 가입 안내(gate) 카드 ---------- */
    body.page-hs .member-gate { padding: 16px; background: var(--mh-g); color: #fff; border: 0; border-radius: 18px; box-shadow: none; }
    body.page-hs .member-gate .member-gate-title { margin: 0 0 4px; font-size: 15px; color: #fff; letter-spacing: -.02em; }
    body.page-hs .member-gate .member-gate-desc { margin: 0 0 10px; font-size: 12px; line-height: 1.5; color: #d3ebdc; }
    body.page-hs .member-gate .btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 12px; background: #fff; color: var(--mh-g); font-size: 14px; font-weight: 800; box-shadow: none; }
    body.page-hs .member-gate > p:last-child { margin: 9px 0 0 !important; font-size: 11.5px !important; color: #d3ebdc !important; text-align: center; line-height: 1.45; }
    body.page-hs #section-list .container > p[style*="text-align:center"] { margin: 0 0 8px !important; text-align: left !important; font-size: 11.5px !important; }

    /* ---------- 참고자료 행 ---------- */

    /* ---------- 참고자료·사립학교 홈스테이 행 ---------- */
    body.page-hs #section-refs .blog-list { display: grid; gap: 8px; }
    body.page-hs #section-refs .blog-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px; background: #fff; border: 1px solid var(--mh-line); border-radius: 14px; color: var(--mh-ink); }
    body.page-hs #section-refs .blog-icon { flex: 0 0 28px; width: 28px; height: 28px; font-size: 12px; border-radius: 8px; }
    body.page-hs #section-refs .blog-text { flex: 1; min-width: 0; }
    body.page-hs #section-refs .blog-title { font-size: 13.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    body.page-hs #section-refs .blog-list { background: transparent; border: 0; padding: 0; }
    body.page-hs #section-refs .blog-item { box-sizing: border-box; width: 100%; max-width: 100%; overflow: hidden; }
    body.page-hs #section-refs .blog-meta { font-size: 11px; color: var(--mh-sub); }
    body.page-hs #section-refs .blog-arrow { flex: 0 0 auto; font-size: 20px; color: var(--mh-sub); }
    body.page-hs #section-private .hs-private-grid, body.page-hs #hs_private_list { display: block; padding: 0; margin: 0; background: #fff; border: 1px solid var(--mh-line); border-radius: 16px; overflow: hidden; }
    body.page-hs #section-private .hs-private-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 11px; row-gap: 2px; align-items: center; min-height: 56px; padding: 8px 12px; margin: 0; border: 0; border-bottom: 1px solid var(--mh-line); border-radius: 0; box-shadow: none; transform: none; }
    body.page-hs #section-private .hs-private-card:last-child { border-bottom: 0; }
    body.page-hs #section-private .hs-private-card .logo { grid-row: 1 / 4; grid-column: 1; margin: 0; width: 44px; height: 44px; font-size: 13px; }
    body.page-hs #section-private .hs-private-card h4 { grid-column: 2; margin: 0; font-size: 14px; font-weight: 700; }
    body.page-hs #section-private .hs-private-card .city { grid-column: 2; margin: 0; font-size: 11.5px; }
    body.page-hs #section-private .hs-private-card .tags { grid-column: 2; margin: 0; flex-wrap: nowrap; }

    /* ---------- 공용 하단 섹션 (보딩스쿨 화면에서만 — 공용 PHP·다른 페이지 무영향) ---------- */
    body.page-hs .footer-sections { padding: 0; }
    body.page-hs .prep-cross-recommend, body.page-hs .study-cards-section, body.page-hs .uni-cta-band,
    body.page-hs .prep-university, body.page-hs .prep-faq { box-sizing: border-box; width: 100%; max-width: none; margin: 0; padding: 12px 14px 2px; background: transparent; border: 0; }
    body.page-hs .study-cards-section .container-narrow, body.page-hs .prep-university .container-narrow, body.page-hs .prep-faq .container-narrow { max-width: none; width: auto; padding: 0; margin: 0; }
    body.page-hs .prep-cross-recommend h2, body.page-hs .study-cards-section .study-h2, body.page-hs .prep-university h2, body.page-hs .prep-faq h2 { margin: 0 0 8px; font-size: 16px; font-weight: 800; text-align: left; letter-spacing: -.02em; color: var(--mh-ink); }
    body.page-hs .ige-trust-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 14px 0; padding: 8px 4px; background: #fff; border: 1px solid var(--mh-line); border-radius: 14px; }
    body.page-hs .ige-trust-bar .trust-item { padding: 0; text-align: center; border: 0; }
    body.page-hs .ige-trust-bar .trust-num { font-size: 15px; font-weight: 800; color: var(--mh-g); }
    body.page-hs .ige-trust-bar .trust-desc, body.page-hs .ige-trust-bar .trust-label { font-size: 9.5px; color: var(--mh-sub); line-height: 1.3; }

    body.page-hs .prep-cross-recommend .cross-cards, body.page-hs .study-cards-section .cross-cards { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 0; margin: 0; }
    body.page-hs .prep-cross-recommend .cross-cards { grid-template-columns: 1fr 1fr; }
    body.page-hs .prep-cross-recommend .cross-card, body.page-hs .study-cards-section .cross-card { box-sizing: border-box; width: auto; min-width: 0; max-width: none; margin: 0; padding: 10px 12px; text-align: left; background: #fff; border: 1px solid var(--mh-line); border-radius: 16px; box-shadow: none; }
    body.page-hs .cross-card .cross-icon { display: inline; margin: 0 6px 0 0; font-size: 16px; }
    body.page-hs .cross-card .cross-title, body.page-hs .cross-card h3 { display: inline; margin: 0; font-size: 14px; font-weight: 800; color: var(--mh-ink); }
    body.page-hs .cross-card .cross-cost { margin: 4px 0 0; font-family: inherit; font-size: 13px; font-weight: 800; color: var(--mh-g); }
    body.page-hs .cross-card .cross-krw { margin: 0; font-size: 10.5px; }
    body.page-hs .cross-card .cross-desc { margin: 2px 0 0; font-size: 11px; color: var(--mh-sub); line-height: 1.4; }
    body.page-hs .cross-card .cross-link { display: none; }
    body.page-hs .study-cards-section .cross-card { display: block; position: relative; padding: 10px 12px; min-height: 0; height: auto; }
    body.page-hs .study-cards-section .cross-card .cross-icon { display: inline; font-size: 18px; margin: 0 6px 0 0; vertical-align: middle; }
    body.page-hs .study-cards-section .cross-card .cross-title, body.page-hs .study-cards-section .cross-card h3 { font-size: 13.5px; vertical-align: middle; }
    body.page-hs .study-cards-section .cross-card .cross-desc { display: block; margin: 2px 0 0; font-size: 11px; line-height: 1.3; }
    body.page-hs .study-cards-section .study-badge-lock, body.page-hs .study-cards-section .study-badge-free { position: static; float: right; display: inline-block; margin: 0 0 0 6px; font-size: 10px; line-height: 1.5; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
    body.page-hs .study-cards-section .study-sub { display: none; }
    body.page-hs .study-cards-section .study-footer { margin: 8px 0 0; padding: 6px 10px; font-size: 11px; line-height: 1.5; background: #fff; border: 1px solid var(--mh-line); border-radius: 12px; }
    body.page-hs .prep-cross-recommend .cross-footer { margin: 8px 0 6px; text-align: left; font-size: 12px; color: var(--mh-sub); }
    body.page-hs .prep-cross-recommend .btn-consult-secondary { display: flex; align-items: center; min-height: 44px; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--mh-g); color: #fff; font-size: 14px; font-weight: 800; text-align: left; box-shadow: none; }

    body.page-hs .uni-cta-band { padding-top: 8px; padding-bottom: 0; }
    body.page-hs .uni-cta-band .uni-cta-link { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 12px 14px; background: #fff; border: 1px solid var(--mh-g); border-radius: 14px; color: var(--mh-g); font-size: 13.5px; font-weight: 800; box-shadow: none; }
    body.page-hs .prep-university .university-list { display: grid; gap: 8px; margin: 0; padding: 0; }
    body.page-hs .prep-university .university-item { display: block; min-height: 44px; padding: 8px 14px; background: #fff; border: 1px solid var(--mh-line); border-radius: 14px; }
    body.page-hs .prep-university .university-title { margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.4; }
    body.page-hs .prep-university .university-meta { margin: 2px 0 0; font-size: 11px; color: var(--mh-sub); }
    body.page-hs .prep-university .uni-header-badge { font-size: 11px; }
    body.page-hs .prep-faq { padding-bottom: 20px; }
    body.page-hs .prep-faq .faq-item { margin: 0 0 8px; padding: 0 14px; background: #fff; border: 1px solid var(--mh-line); border-radius: 14px; box-shadow: none; }
    body.page-hs .prep-faq .faq-q { min-height: 44px; padding: 9px 0; font-size: 13px; line-height: 1.4; }
    body.page-hs .prep-faq .faq-a { font-size: 12.5px; }
}
