/* 2026-07-22 모바일 화면 전용 정리 */
@media (max-width: 800px) {
    html { -webkit-text-size-adjust: 100%; }
    a { color: inherit; }

    /* 홈 상단 카테고리: 긴 프리미엄 문구에도 좌우 여백 확보 */
    .mobile-fixed-category {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 11px !important;
        padding-right: 22px !important;
        padding-left: 22px !important;
    }
    .mobile-fixed-category .mobile-category-button,
    .mobile-category-strip .mobile-category-button {
        min-width: 0 !important;
        padding: 13px 10px !important;
        color: #332820;
        font-size: 13px !important;
        letter-spacing: -.035em;
    }
    .mobile-fixed-category .mobile-category-button { width:100% !important; }
    .mobile-category-strip {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 11px !important;
        width: 100% !important;
        overflow: visible !important;
        padding: 18px 22px 16px !important;
    }
    .mobile-category-strip .mobile-category-button {
        width: 100% !important;
        min-height: 52px !important;
        flex: none !important;
    }
    .mobile-category-button.active { color: #fff !important; }

    /* 홈의 HOT·추천 모임·요양기관 미리보기 규격 통일 */
    .popular-meeting-grid,
    .home-preview-grid,
    #homeFacilityGrid {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 12px !important;
        overflow-x: auto !important;
        overflow-y: hidden;
        padding: 2px 1px 12px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .popular-meeting-grid::-webkit-scrollbar,
    .home-preview-grid::-webkit-scrollbar,
    #homeFacilityGrid::-webkit-scrollbar { display: none; }
    .popular-meeting-grid .home-preview-card,
    .home-preview-grid .home-preview-card,
    #homeFacilityGrid .facility-home-card {
        display: flex !important;
        flex: 0 0 72% !important;
        min-width: 72% !important;
        width: 72% !important;
        min-height: 0 !important;
        flex-direction: column !important;
        scroll-snap-align: start;
        color: #332820 !important;
    }
    .popular-meeting-grid .home-preview-image,
    .home-preview-grid .home-preview-image,
    #homeFacilityGrid .facility-home-card .home-preview-image {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 1 / 1 !important;
        flex: none;
    }
    .popular-meeting-grid .home-preview-card > div:last-child,
    .home-preview-grid .home-preview-card > div:last-child,
    #homeFacilityGrid .facility-home-card > div:last-child {
        display: block !important;
        min-height: 132px;
        padding: 14px !important;
        background: #fff;
    }
    .home-preview-card h3,
    .home-preview-card p,
    .home-preview-card span { -webkit-text-fill-color: currentColor; }

    /* 추천 설명을 모바일에서 한 줄로 */
    .home-section-heading { gap: 8px !important; }
    .home-section-heading > div { min-width: 0; }
    .home-section-heading p {
        overflow: hidden;
        max-width: 100%;
        color: #6f655e !important;
        font-size: 11px !important;
        letter-spacing: -.045em;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .home-section-heading > a { color: #332820 !important; font-size: 12px !important; }

    /* 지역 모임 목록에서 Safari 기본 파란 글자 제거 */
    .category-btn:not(.active),
    .meeting-list-card,
    .meeting-list-card h3,
    .meeting-list-card b { color: #332820 !important; }
    .meeting-list-card .badge { color: #81593e !important; }

    /* 마이페이지 하단 메뉴를 홈 메뉴와 같은 규격으로 */
    .mypage-shell { padding-bottom: 92px; }
    .mobile-bottom-bar {
        height: 76px !important;
        grid-template-columns: repeat(5, 1fr) !important;
        background: rgba(255,255,255,.97) !important;
        box-shadow: 0 -5px 20px rgba(56,37,24,.07);
        backdrop-filter: blur(10px);
    }
    .mobile-bottom-bar button {
        gap: 4px !important;
        color: #776b63 !important;
        font-size: 11px !important;
    }
    .mobile-bottom-bar button svg { width: 25px; height: 25px; }
    .mobile-bottom-bar button.active { color: #8b5e3c !important; }

    /* 나의 요양기관: 전화번호 세 칸을 동일한 폭으로 */
    .phone-input-group {
        width: min(100%, 360px);
        grid-template-columns: minmax(0,1fr) 8px minmax(0,1fr) 8px minmax(0,1fr) !important;
        gap: 5px !important;
    }
    .phone-input-group input,
    .phone-input-group select {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 52px !important;
        padding: 0 6px !important;
        border-radius: 13px !important;
        font-size: 14px;
        text-align: center;
    }

    /* 운영시간: 시간 / ~ / 시간 형식으로 화면 안에 고정 */
    .business-hours { width: 100%; gap: 11px !important; }
    .hours-row {
        width: min(100%, 340px);
        grid-template-columns: 38px minmax(0,1fr) 14px minmax(0,1fr) !important;
        gap: 5px !important;
        justify-content: start;
    }
    .hours-row input {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 46px !important;
        padding: 0 6px !important;
        border-radius: 13px !important;
        font-size: 13px;
        text-align: center;
    }
    .hours-row > span { text-align: center; }

    /* 요양기관 미리보기·사진 확대창의 파란 글자와 X 제거 */
    .customer-preview-dialog a,
    .customer-preview-dialog button:not(.active),
    .preview-content-dialog a,
    .preview-content-dialog button,
    .post-detail-dialog a,
    .post-detail-dialog button {
        color: #332820 !important;
        -webkit-text-fill-color: #332820;
    }
    .customer-preview-dialog .facility-content-tabs button.active,
    .customer-preview-dialog .post-category-tabs button.active {
        color: #fff !important;
        -webkit-text-fill-color: #fff;
    }
    .dialog-close,
    .post-dialog-close,
    .preview-content-dialog .dialog-close,
    .customer-preview-dialog .dialog-close {
        color: #332820 !important;
        -webkit-text-fill-color: #332820 !important;
    }
}
