/**
 * 교회 공개 페이지 스타일
 * --theme-primary, --theme-secondary 는 메인 템플릿에서 인라인으로 설정
 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #333;
    --gray-100: #f7f7f7;
    --gray-200: #e8e8e8;
    --gray-300: #d1d5db;
    --gray-400: #999;
    --gray-500: #6b7280;
    --gray-600: #666;
    --gray-900: #111827;
    --white: #fff;
    --radius: 12px;
    --theme-primary: #667eea;
    --theme-secondary: #764ba2;
}

body {
    font-family: 'Noto Sans KR', -apple-system, sans-serif;
    background: var(--gray-100);
    color: var(--primary);
    line-height: 1.6;
    padding-bottom: 70px;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--white);
    min-height: 100vh;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-nav-logo {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    flex: 1;
    text-align: center;
}

.top-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.top-nav-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.top-nav-btn:hover::after {
    content: 'HCJoyn 바로가기';
    position: absolute;
    bottom: -35px;
    right: 0;
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

.top-nav-btn:hover::before {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 8px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #333;
    z-index: 1001;
}

.top-nav-btn-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.page-header {
    text-align: center;
    padding: 30px 20px 20px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--gray-600);
}

.main-hero {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.main-hero.has-image {
    background: none;
}

.main-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-hero-icon {
    font-size: 80px;
    margin-bottom: 10px;
}

.main-hero-text {
    font-size: 14px;
    opacity: 0.9;
}

.inactive-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px 16px;
    margin: 15px 20px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.inactive-notice-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.inactive-notice-text {
    line-height: 1.5;
}

.inactive-notice a {
    color: #856404;
    font-weight: 600;
}

.section {
    padding: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title::before {
    content: '';
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--primary);
    flex-shrink: 0;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-box {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 15px;
}

.info-box-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}

.info-item {
    display: flex;
    margin-bottom: 8px;
    font-size: 13px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    color: var(--gray-600);
    min-width: 60px;
}

.info-value {
    color: var(--primary);
    font-weight: 500;
}

/* 갤러리: 3장씩 슬라이드, 썸네일 아래 제목 */
.gallery-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gallery-carousel-viewport {
    flex: 1;
    overflow: hidden;
}
.gallery-carousel-track {
    display: flex;
    gap: 12px;
    transition: transform 0.3s ease;
}
.gallery-item {
    flex: 0 0 calc(33.333% - 8px);
    min-width: 0;
    text-align: center;
}
.gallery-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}
.gallery-item-title,
.gallery-item span {
    display: block;
    font-size: 13px;
    color: var(--gray-700, #374151);
    margin-top: 8px;
    font-weight: 500;
}
.gallery-carousel-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--gray-300, #d1d5db);
    background: var(--white, #fff);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--gray-600, #4b5563);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.gallery-carousel-btn:hover {
    background: var(--gray-100, #f3f4f6);
    color: var(--primary);
}
.section-empty {
    color: var(--gray-500, #6b7280);
    font-size: 14px;
    padding: 20px 0;
    margin: 0;
}
@media (max-width: 768px) {
    .gallery-item { flex: 0 0 calc(50% - 6px); }
    .gallery-carousel-btn { width: 36px; height: 36px; font-size: 20px; }
}

.video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.video-gallery-item {
    text-align: center;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-label {
    display: block;
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 8px;
}

.video-placeholder {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: var(--gray-100);
    border-radius: 12px;
}

.video-placeholder-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    margin-bottom: 10px;
}

.video-placeholder-text {
    font-size: 13px;
    color: var(--gray-600);
}

.post-list {
    list-style: none;
}

.post-item {
    padding: 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 0;
    background: none;
    border: none;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.post-item-btn:hover {
    background: var(--gray-100);
}

.post-item-thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray-200);
}

.post-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-item-title {
    flex: 1;
    font-weight: 500;
    min-width: 0;
}

.post-item-date {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--gray-500);
}

.board-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    padding: 12px 0;
}

.board-pagination a {
    color: var(--theme-primary, #667eea);
    text-decoration: none;
    font-size: 14px;
}

.board-pagination-info {
    font-size: 13px;
    color: var(--gray-500);
}

/* 게시글 읽기 모달 */
.board-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.board-modal[hidden] {
    display: none;
}

.board-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.board-modal-content {
    position: relative;
    max-width: 100%;
    max-height: 90vh;
    overflow: auto;
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    width: 100%;
}

.board-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--gray-200);
    border: none;
    border-radius: 8px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--gray-600);
}

.board-modal-title {
    font-size: 18px;
    margin: 0 0 8px 0;
    padding-right: 36px;
}

.board-modal-date {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0 0 12px 0;
}

.board-modal-thumb {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 200px;
}

.board-modal-thumb img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
}

.board-modal-body {
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.board-modal-body br {
    white-space: normal;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray-400);
    font-size: 11px;
    padding: 5px 15px;
    transition: color 0.2s;
}

.nav-item.active,
.nav-item:hover {
    color: var(--primary);
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-icon i {
    font-size: 1.25rem;
}

/* 하단 네비 HC 바로가기 (모바일에서만 표시, 상단 아이콘 대체) - 터치 영역 확대 */
.nav-item-hc {
    min-height: 48px;
    min-width: 56px;
    padding: 8px 16px !important;
    justify-content: center;
}
.nav-item-hc .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-item-hc-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

/* 데스크톱: 하단 HC 항목 숨김(상단에만 표시) */
@media (min-width: 769px) {
    .bottom-nav .nav-item-hc {
        display: none;
    }
}

/* 모바일: 상단 HC 버튼 숨김, 하단 HC 버튼 더 크게(터치 친화) */
@media (max-width: 768px) {
    .top-nav .top-nav-btn-hc {
        display: none !important;
    }
    .bottom-nav .nav-item-hc {
        display: flex;
        min-height: 52px;
        min-width: 64px;
        padding: 10px 18px !important;
    }
    .bottom-nav .nav-item-hc-icon {
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 10px;
    }
}

.registration-success-toast {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    z-index: 10000;
    animation: jmp-slideDown 0.3s ease, jmp-fadeOut 0.3s ease 2.7s forwards;
}

.success-icon {
    width: 20px;
    height: 20px;
    background: #fff;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.success-text {
    font-size: 14px;
    font-weight: 500;
}

@keyframes jmp-slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes jmp-fadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

.registration-pending-toast {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    z-index: 10000;
    animation: jmp-slideDown 0.3s ease;
    max-width: 90%;
}

.pending-icon {
    font-size: 16px;
}

.pending-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.qr-section {
    text-align: center;
    padding: 20px;
    padding-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.church-qr-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 20px;
    background: var(--theme-primary, var(--primary));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.church-qr-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.church-share-joyn-sns {
    width: 100%;
    max-width: 280px;
}

.church-share-joyn-sns .joyn-sns-wrap {
    justify-content: center;
}

.church-share-joyn-sns .joyn-sns-buttons {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
}

.church-share-joyn-sns .joyn-sns-btn {
    flex: none !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
}

.church-share-joyn-sns .joyn-sns-btn svg,
.church-share-joyn-sns .joyn-sns-btn .joyn-sns-icon {
    width: 20px !important;
    height: 20px !important;
}

/* QR 모달 */
.church-qr-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.church-qr-modal[hidden] {
    display: none !important;
}

.church-qr-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.church-qr-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 360px;
    width: 100%;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.church-qr-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200, #e5e7eb);
}

.church-qr-modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.church-qr-modal-close {
    padding: 0.35rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-600, #6b7280);
    font-size: 1.5rem;
    line-height: 1;
}

.church-qr-modal-close:hover {
    color: #000;
}

.church-qr-modal-body {
    padding: 1.25rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.church-qr-link {
    display: inline-block;
    flex-shrink: 0;
}

.church-qr-img {
    display: block;
    width: 200px;
    height: 200px;
    min-width: 200px;
    min-height: 200px;
    margin: 0 auto;
    object-fit: contain;
}

.church-qr-caption {
    margin: 1rem 0 0;
    font-size: 0.875rem;
    color: var(--gray-600, #6b7280);
    line-height: 1.5;
}

.church-qr-modal-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.church-qr-modal-actions .church-qr-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.875rem;
    border: 1px solid var(--gray-300, #d1d5db);
    border-radius: 8px;
    background: #fff;
    color: var(--gray-700, #374151);
    cursor: pointer;
}

.church-qr-modal-actions .church-qr-btn-outline:hover {
    background: var(--gray-50, #f9fafb);
}

.church-qr-share-feedback {
    font-size: 0.8rem;
    color: #059669;
    opacity: 0;
    transition: opacity 0.2s;
}

.church-qr-share-feedback.is-visible {
    opacity: 1;
}

.church-qr-joyn-sns {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200, #e5e7eb);
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
}

.church-qr-joyn-sns .joyn-sns-wrap {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
}

/* 모달 내 SNS 버튼 크기 제한 (아이콘이 아주 크게 나오는 것 방지) */
.church-qr-joyn-sns .joyn-sns-buttons {
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
}

.church-qr-joyn-sns .joyn-sns-btn {
    flex: none !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    padding: 8px !important;
}

.church-qr-joyn-sns .joyn-sns-btn svg,
.church-qr-joyn-sns .joyn-sns-btn .joyn-sns-icon {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
}

/* QR 모달 테마 리셋: 교회 페이지 다크/라이트 무관하게 모달만 밝은 배경으로 (액츠와 동일) */
.church-qr-modal-theme-reset.church-qr-modal {
    z-index: 100001;
}

.church-qr-modal-theme-reset .church-qr-modal-backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.church-qr-modal-theme-reset .church-qr-modal-content {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    color: #1a1814 !important;
}

.church-qr-modal-theme-reset .church-qr-modal-header {
    border-bottom: 1px solid #e5e7eb !important;
}

.church-qr-modal-theme-reset .church-qr-modal-title {
    color: #1a1814 !important;
}

.church-qr-modal-theme-reset .church-qr-modal-close {
    color: #57524a !important;
    background: transparent !important;
}

.church-qr-modal-theme-reset .church-qr-modal-close:hover {
    color: #1a1814 !important;
}

.church-qr-modal-theme-reset .church-qr-caption {
    color: #6b7280 !important;
}

.church-qr-modal-theme-reset .church-qr-joyn-sns {
    border-top-color: #e5e7eb !important;
}

/* SNS 명칭(카카오톡, 라인 등) 숨김 - 아이콘만 표시 */
.church-qr-joyn-sns .joyn-sns-label,
.church-qr-modal-theme-reset .church-qr-joyn-sns .joyn-sns-label {
    display: none !important;
}

/* 버튼 색상은 joyn-sns 플러그인 브랜드 컬러 유지 (color: inherit 제거로 흑백 현상 해결) */

.church-qr-modal-theme-reset .church-qr-joyn-sns .joyn-sns-btn {
    flex: none !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
}

.church-qr-modal-theme-reset .church-qr-joyn-sns .joyn-sns-btn svg,
.church-qr-modal-theme-reset .church-qr-joyn-sns .joyn-sns-btn .joyn-sns-icon {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
}

.qr-image {
    display: inline-block;
}

.qr-image img {
    display: block;
    width: 100px;
    height: 100px;
}

.contact-list {
    list-style: none;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 36px;
    height: 36px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
}

.contact-info {
    flex: 1;
}

.contact-label {
    font-size: 12px;
    color: var(--gray-600);
}

.contact-value {
    font-weight: 500;
}

.contact-value a {
    color: var(--primary);
    text-decoration: none;
}

.contact-map-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--gray-400);
    border-radius: 6px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.2s;
}

.contact-map-btn .map-icon {
    display: none;
}

.contact-map-btn:hover {
    background: var(--gray-100);
    border-color: var(--primary);
}

.settings-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--gray-400);
    border-radius: 6px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.settings-btn:hover {
    background: var(--gray-100);
    border-color: var(--primary);
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.settings-overlay.active {
    display: flex;
}

.settings-panel {
    background: var(--white);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    animation: jmp-slideUp 0.3s ease;
}

@keyframes jmp-slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.settings-title {
    font-size: 18px;
    font-weight: 700;
}

.settings-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-600);
}

.settings-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 70px);
}

.settings-section {
    margin-bottom: 25px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-600);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--gray-100);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.settings-item:hover {
    background: var(--gray-200);
}

.settings-item:last-child {
    margin-bottom: 0;
}

.settings-item-icon {
    font-size: 24px;
    margin-right: 15px;
}

.settings-item-content {
    flex: 1;
}

.settings-item-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.settings-item-desc {
    font-size: 12px;
    color: var(--gray-600);
}

.settings-item-arrow {
    color: var(--gray-400);
    font-size: 18px;
}

.settings-badge {
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.member-list {
    list-style: none;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-100);
    border-radius: 10px;
    margin-bottom: 10px;
}

.member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gray-200);
    object-fit: cover;
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-email {
    font-size: 12px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-date {
    font-size: 11px;
    color: var(--gray-400);
}

.member-actions {
    display: flex;
    gap: 6px;
}

.member-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.member-btn-approve {
    background: #22c55e;
    color: #fff;
}

.member-btn-approve:hover {
    background: #16a34a;
}

.member-btn-reject {
    background: #ef4444;
    color: #fff;
}

.member-btn-reject:hover {
    background: #dc2626;
}

.member-btn-remove {
    background: var(--gray-200);
    color: var(--gray-600);
}

.member-btn-remove:hover {
    background: var(--gray-300);
}

.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.empty-state-text {
    font-size: 14px;
}

.settings-subpanel {
    display: none;
}

.settings-subpanel.active {
    display: block;
}

.settings-form-group {
    margin-bottom: 20px;
}

.settings-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-600);
}

.settings-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.settings-input:focus {
    outline: none;
    border-color: #667eea;
}

.settings-textarea {
    min-height: 100px;
    resize: vertical;
}

.settings-file-upload {
    border: 2px dashed var(--gray-200);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.settings-file-upload:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.settings-file-upload-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.settings-file-upload-text {
    font-size: 14px;
    color: var(--gray-600);
}

.settings-file-preview {
    margin-top: 15px;
}

.settings-file-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

.settings-btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.settings-btn-save {
    flex: 1;
    padding: 14px;
    background: #667eea;
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.settings-btn-save:hover {
    background: #5a6fd6;
}

.settings-btn-save:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
}

.settings-btn-cancel {
    padding: 14px 20px;
    background: var(--gray-100);
    color: var(--primary);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 400;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

.jmp-ad-slot {
    padding: 10px 20px;
    text-align: center;
}

.jmp-ad-slot:empty {
    display: none;
}

@media (min-width: 481px) {
body {
        background: #e8e8e8;
    }
.container {
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
}

/* ═══════════════════════════════════════════════════════
   테마별 시각 적용 (body[data-theme] — church-8themes.html 기준)
   교회관리자가 선택한 테마에 따라 배경·강조색이 변경됩니다.
   ═══════════════════════════════════════════════════════ */

/* 1. 성스러운 골드 */
body[data-theme="sacred"] { background: #f8f4ed; color: #2c2c3a; }
body[data-theme="sacred"] .container { background: #fff; }
body[data-theme="sacred"] .top-nav { background: rgba(248,244,237,.95); border-bottom-color: rgba(26,39,68,.06); }
body[data-theme="sacred"] .top-nav-logo { color: #1a2744; }
body[data-theme="sacred"] .main-hero-icon { background: linear-gradient(135deg,#1a2744,#2a3e66); }
body[data-theme="sacred"] .section-title::before { background: #b8963e; }
body[data-theme="sacred"] .info-label { color: #b8963e; }

/* 2. 다크 코스모스 */
body[data-theme="cosmos"] { background: #0c0c16; color: #b8b8cc; }
body[data-theme="cosmos"] .container { background: rgba(255,255,255,.03); }
body[data-theme="cosmos"] .top-nav { background: rgba(12,12,22,.9); border-bottom-color: rgba(255,255,255,.05); }
body[data-theme="cosmos"] .top-nav-logo { color: #e0d8f0; }
body[data-theme="cosmos"] .main-hero-icon { background: linear-gradient(135deg,#281e40,#3a2860); }
body[data-theme="cosmos"] .section-title { color: #ddd0f0; }
body[data-theme="cosmos"] .section-title::before { background: #9878c0; }
body[data-theme="cosmos"] .info-box { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.05); }
body[data-theme="cosmos"] .info-box-title { color: #ccc0e0; }
body[data-theme="cosmos"] .info-label { color: #9878c0; }
body[data-theme="cosmos"] .info-value { color: rgba(180,180,200,.7); }

/* 3. 숲속 예배당 */
body[data-theme="forest"] { background: #f0ede4; color: #2a3028; }
body[data-theme="forest"] .container { background: #f9f7f1; }
body[data-theme="forest"] .top-nav { background: rgba(240,237,228,.95); border-bottom-color: rgba(60,80,50,.06); }
body[data-theme="forest"] .top-nav-logo { color: #3a5030; }
body[data-theme="forest"] .main-hero-icon { background: linear-gradient(135deg,#3a5030,#5a7840); }
body[data-theme="forest"] .section-title::before { background: #8aaa60; }
body[data-theme="forest"] .info-label { color: #6a9040; }

/* 4. 모던 볼드 */
body[data-theme="bold"] { background: #fff; color: #1a1a1a; }
body[data-theme="bold"] .container { background: #fff; }
body[data-theme="bold"] .top-nav { background: rgba(255,255,255,.95); border-bottom-color: rgba(0,0,0,.04); }
body[data-theme="bold"] .top-nav-logo { color: #1a1a1a; font-weight: 900; }
body[data-theme="bold"] .main-hero-icon { background: #1a1a1a; }
body[data-theme="bold"] .section-title::before { background: #e03030; width: 4px; }
body[data-theme="bold"] .info-label { color: #e03030; }

/* 5. 소프트 블룸 */
body[data-theme="bloom"] { background: #faf5f8; color: #4a3a48; }
body[data-theme="bloom"] .container { background: #fff; }
body[data-theme="bloom"] .top-nav { background: rgba(250,245,248,.95); border-bottom-color: rgba(180,140,170,.06); }
body[data-theme="bloom"] .top-nav-logo { color: #8a5a80; }
body[data-theme="bloom"] .main-hero-icon { background: linear-gradient(135deg,#dca0c8,#b8a0d8); }
body[data-theme="bloom"] .section-title::before { background: #dca0c8; }
body[data-theme="bloom"] .info-label { color: #c888b0; }

/* 6. 레트로 앰버 */
body[data-theme="retro"] { background: #f4ecd8; color: #3a2e24; }
body[data-theme="retro"] .container { background: #f9f3e4; }
body[data-theme="retro"] .top-nav { background: rgba(244,236,216,.95); border-bottom-color: rgba(100,70,40,.06); }
body[data-theme="retro"] .top-nav-logo { color: #8a5a20; }
body[data-theme="retro"] .main-hero-icon { background: linear-gradient(135deg,#c87828,#e89838); }
body[data-theme="retro"] .section-title::before { background: #c87828; }
body[data-theme="retro"] .info-label { color: #c87828; }

/* 7. 오션 브리즈 */
body[data-theme="ocean"] { background: #f0f5f8; color: #1e3040; }
body[data-theme="ocean"] .container { background: #fff; }
body[data-theme="ocean"] .top-nav { background: rgba(240,245,248,.95); border-bottom-color: rgba(20,80,120,.05); }
body[data-theme="ocean"] .top-nav-logo { color: #1a4060; }
body[data-theme="ocean"] .main-hero-icon { background: linear-gradient(135deg,#1a4060,#2a7898); }
body[data-theme="ocean"] .section-title::before { background: #28a0b8; }
body[data-theme="ocean"] .info-label { color: #28a0b8; }

/* 8. 미니멀 젠 */
body[data-theme="zen"] { background: #fafafa; color: #2a2a2a; }
body[data-theme="zen"] .container { background: #fff; }
body[data-theme="zen"] .top-nav { background: rgba(250,250,250,.95); border-bottom-color: rgba(0,0,0,.03); }
body[data-theme="zen"] .top-nav-logo { color: #2a2a2a; font-weight: 600; }
body[data-theme="zen"] .main-hero-icon { background: #f0f0f0; }
body[data-theme="zen"] .section-title::before { background: #aaa; width: 2px; }
body[data-theme="zen"] .info-label { color: #999; }
