/* =========================================================
   DJ CHURCH — Modern Style
========================================================= */
:root{
  --navy: #12182b;
  --navy-2: #1c2440;
  --gold: #c9a227;
  --gold-light: #e6c862;
  --gray-50: #f7f8fa;
  --gray-100: #eef0f4;
  --gray-300: #d6dae3;
  --gray-500: #8891a3;
  --gray-700: #4b5468;
  --text: #1b1f2e;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(18,24,43,0.08);
  --shadow-lg: 0 20px 50px rgba(18,24,43,0.16);
  --max-width: 1160px;
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family:'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--gray-50);
  line-height:1.6;
  -webkit-font-smoothing: antialiased;
}
a{ text-decoration:none; color:inherit; }
img{ max-width:100%; display:block; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family:inherit; cursor:pointer; }

/* ---------- Header ---------- */
.site-header{
  position: sticky; top:0; z-index:100;
  background: rgba(18,24,43,0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.header-inner{
  max-width: var(--max-width); margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding: 16px 24px; gap:20px;
}
.logo{
  font-size:22px; font-weight:900; color:#fff; letter-spacing:1px;
  display:inline-flex; align-items:center; gap:10px;
  white-space:nowrap; flex-shrink:0;
}
.logo span{ color: var(--gold); font-weight: 900; }
.logo-image img{ height:36px; width:auto; display:block; }
.logo-suffix{ font-size:22px; font-weight:700; color:var(--gold); letter-spacing:0; }
.logo-suffix-link{ text-decoration:none; display:inline-flex; align-items:center; margin-left:14px; }
.logo-suffix-link:hover .logo-suffix{ color:var(--gold-light); }
.main-nav{ display:flex; align-items:center; justify-content:flex-start; gap:18px; flex:1; flex-wrap:wrap; row-gap:10px; }
.main-nav a{ color:#e7e9f2; font-size:13.5px; font-weight:500; transition:.2s; white-space:nowrap; }
.main-nav a:hover{ color: var(--gold-light); }

.nav-dropdown{ position:relative; }
.nav-dropdown summary{
  color:#e7e9f2; font-size:14.5px; font-weight:500; cursor:pointer; list-style:none; white-space:nowrap;
}
.nav-dropdown summary::-webkit-details-marker{ display:none; }
.nav-dropdown summary:hover{ color: var(--gold-light); }
.nav-dropdown .dropdown-menu{
  position:absolute; top:calc(100% + 14px); left:0; background: var(--navy-2);
  border-radius:10px; padding:8px; min-width:150px; box-shadow: var(--shadow-lg); z-index:60;
}
.nav-dropdown .dropdown-menu a{
  display:block; padding:9px 12px; border-radius:6px; font-size:14px; font-weight:500; color:#e7e9f2; white-space:nowrap;
}
.nav-dropdown .dropdown-menu a:hover{ background: rgba(255,255,255,0.08); color: var(--gold-light); }
.nav-user{ color: var(--gold-light); font-size:14px; font-weight:500; }
.nav-user:hover{ text-decoration:underline; }
.nav-btn{
  padding:7px 16px; border-radius:30px; background: var(--gold);
  color: var(--navy) !important; font-weight:700 !important;
}
.nav-btn:hover{ background: var(--gold-light); }
.nav-btn-outline{
  background:transparent; border:1px solid var(--gray-500);
  color:#e7e9f2 !important; font-weight:500 !important;
}
.nav-admin{ color:#ff8a8a !important; font-weight:700 !important; }
.nav-staff{ color: var(--gold-light) !important; font-weight:700 !important; }
.nav-btn-logout{ margin-left:auto; }
.admin-nav-push{ margin-left:auto; }
.nav-toggle{ display:none; background:none; border:none; flex-direction:column; gap:5px; }
.nav-toggle span{ width:24px; height:2px; background:#fff; display:block; }

/* ---------- Hero ---------- */
.hero{
  position:relative; color:#fff; overflow:hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #24305c 100%);
  padding: 60px 24px;
  min-height: 92vh;
  display:flex; align-items:center; justify-content:center;
  text-align:center;
}
.hero::after{
  content:''; position:absolute; inset:0; pointer-events:none;
  background: radial-gradient(circle at 80% 20%, rgba(201,162,39,0.18), transparent 55%);
}
.hero-content{ position:relative; z-index:1; max-width:760px; margin:0 auto; }
.hero-eyebrow{
  display:inline-block; padding:6px 16px; border:1px solid rgba(230,200,98,0.5);
  border-radius:30px; color: var(--gold-light); font-size:13px; letter-spacing:2px; margin-bottom:22px;
}
.hero h1{ font-size:42px; font-weight:900; margin:0 0 18px; line-height:1.3; }
.hero p{ font-size:16px; color:#c7cbe0; margin:0 0 34px; }
.hero-actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.hero-wysiwyg{ margin-bottom:34px; }
.hero-wysiwyg h1, .hero-wysiwyg h2, .hero-wysiwyg h3{ font-weight:900; margin:0 0 18px; line-height:1.3; }
.hero-wysiwyg h2{ font-size:34px; }
.hero-wysiwyg h3{ font-size:22px; }
.hero-wysiwyg p{ font-size:16px; margin:0 0 10px; }
.hero-wysiwyg img{ max-width:100%; border-radius:8px; margin:0 0 18px; }
.hero-wysiwyg-mobile{ display:none !important; }
@media (max-width:640px){
  .hero-wysiwyg-desktop{ display:none !important; }
  .hero-wysiwyg-mobile{ display:block !important; }
  .hero-actions-many{ display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; justify-items:stretch; }
  .hero-actions-many .btn{
    padding:10px 6px; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    text-align:center;
  }
}
.hero-tab-btn{
  padding:8px 18px; border:1px solid var(--gray-300); border-radius:8px; background:#fff;
  font-size:13.5px; font-weight:700; color:var(--gray-500); cursor:pointer;
}
.hero-tab-btn.active{ background:var(--gold); border-color:var(--gold); color:#fff; }
.hero-edit-tab-btn{
  padding:8px 18px; border:1px solid var(--gray-300); border-radius:8px; background:#fff;
  font-size:13.5px; font-weight:700; color:var(--gray-500); cursor:pointer;
}
.hero-edit-tab-btn.active{ background:#12182b; border-color:#12182b; color:#fff; }
.hero-edit-tab-btn:disabled{ opacity:.4; cursor:not-allowed; }
.btn{
  display:inline-block; padding:14px 30px; border-radius:30px; font-weight:700; font-size:14.5px;
  transition:.2s; border:1px solid transparent;
}
.btn-primary{ background: var(--gold); color:var(--navy); }
.btn-primary:hover{ background: var(--gold-light); transform:translateY(-2px); }
.btn-ghost{ border-color: rgba(255,255,255,0.35); color:#fff; }
.btn-ghost:hover{ background: rgba(255,255,255,0.08); }

/* ---------- Sections ---------- */
.section{ max-width: var(--max-width); margin: 0 auto; padding: 70px 24px; }
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; margin-bottom:34px; flex-wrap:wrap; gap:10px;}
.section-head h2{ font-size:26px; font-weight:900; margin:0; }
.section-head .eyebrow{ display:block; color:var(--gold); font-weight:700; font-size:13px; letter-spacing:2px; margin-bottom:8px; }
.section-more{ font-size:13.5px; font-weight:700; color:var(--gray-700); }
.section-more:hover{ color: var(--navy); }

.quick-info{
  max-width: var(--max-width); margin: 56px auto 0; position:relative; z-index:2;
  display:grid; grid-template-columns:repeat(4,1fr); gap:18px; padding: 0 24px;
}
.quick-card{
  background:#fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding:26px 22px; text-align:center; transition:.2s;
}
.quick-card:hover{ transform:translateY(-4px); box-shadow: var(--shadow-lg); }
.quick-card .ico{ font-size:26px; margin-bottom:10px; }
.quick-card h3{ margin:0 0 6px; font-size:15px; }
.quick-card p{ margin:0; font-size:13px; color:var(--gray-700); }

.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }

.card{
  background:#fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow:hidden; transition:.2s;
}
.card:hover{ transform:translateY(-4px); box-shadow: var(--shadow-lg); }
.card-thumb{ width:100%; aspect-ratio:16/10; object-fit:cover; background: var(--gray-100); }
.card-body{ padding:18px 20px; }
.card-tag{ display:inline-block; font-size:11px; font-weight:700; color:var(--gold); letter-spacing:1px; margin-bottom:8px; }
.card-title{ font-size:16px; font-weight:700; margin:0 0 8px; line-height:1.4; }
.card-desc{ font-size:13.5px; color:var(--gray-700); margin:0 0 12px; }
.card-meta{ font-size:12px; color:var(--gray-500); display:flex; justify-content:space-between; }

/* ---------- List (board) ---------- */
.board-list{ background:#fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow:hidden; }
.board-row{
  display:flex; align-items:center; gap:16px; padding:18px 24px;
  border-bottom:1px solid var(--gray-100);
}
.board-row:last-child{ border-bottom:none; }
.board-row:hover{ background: var(--gray-50); }
.board-pin{ background: var(--gold); color:#fff; font-size:11px; font-weight:700; padding:3px 9px; border-radius:20px; }
.board-title{ flex:1; font-size:14.5px; font-weight:500; }
.board-num{ font-size:12.5px; color:var(--gray-500); min-width:36px; text-align:center; }
.board-date{ font-size:12.5px; color:var(--gray-500); min-width:90px; text-align:right; }
.board-views{ font-size:12px; color:var(--gray-500); min-width:60px; text-align:right; }

.board-toolbar{ display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.search-box{ display:flex; gap:8px; }
.search-box input{
  padding:10px 14px; border:1px solid var(--gray-300); border-radius:8px; font-size:13.5px; width:220px;
}
.search-box button{ padding:10px 16px; border:none; border-radius:8px; background:var(--navy); color:#fff; font-size:13px; font-weight:700;}

/* ---------- Forms ---------- */
.form-wrap{
  max-width:460px; margin:60px auto; background:#fff; padding:44px 40px;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.form-wrap.wide{ max-width:720px; }
.form-wrap.register-wide{ max-width:920px; }
.form-wrap h1{ font-size:22px; font-weight:900; margin:0 0 6px; text-align:center; }
.form-sub{ text-align:center; color:var(--gray-700); font-size:13.5px; margin:0 0 30px; }
.form-group{ margin-bottom:18px; }
.form-group label{ display:block; font-size:13.5px; font-weight:700; margin-bottom:7px; }
.form-group input, .form-group textarea, .form-group select{
  width:100%; padding:12px 14px; border:1px solid var(--gray-300); border-radius:8px; font-size:14px; font-family:inherit;
}
.form-group textarea{ resize:vertical; min-height:140px; }
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-actions{ display:flex; gap:10px; margin-top:26px; }
.form-actions .btn, .form-actions button{ flex:1; text-align:center; }
.btn-submit{
  border:none; background: var(--navy); color:#fff; padding:14px; border-radius:8px; font-weight:700; font-size:14.5px;
}
.btn-submit:hover{ background: var(--navy-2); }
.btn-secondary{
  border:1px solid var(--gray-300); background:#fff; padding:14px; border-radius:8px; font-weight:700; color:var(--gray-700);
}
.form-footer{ text-align:center; font-size:13px; color:var(--gray-700); margin-top:22px; }
.form-footer a{ color: var(--navy); font-weight:700; }
.alert{ padding:12px 16px; border-radius:8px; font-size:13.5px; margin-bottom:18px; }
.alert-error{ background:#fdecec; color:#c0392b; }
.alert-success{ background:#eafaf1; color:#1e8449; }

/* ---------- View page ---------- */
.view-wrap{ background:#fff; border-radius: var(--radius); box-shadow: var(--shadow); padding:40px; }
.view-header{ border-bottom:2px solid var(--navy); padding-bottom:20px; margin-bottom:26px; }
.view-header h1{ font-size:24px; margin:0 0 12px; }
.view-meta{ display:flex; gap:16px; font-size:13px; color:var(--gray-500); flex-wrap:wrap; }
.view-body{ font-size:15px; line-height:1.9; min-height:120px; white-space:pre-line; }
.view-media{ margin:24px 0; }
.view-media iframe, .view-media audio{ width:100%; border:none; border-radius:10px; }
.view-media iframe{ aspect-ratio:16/9; height:auto; }
.view-actions{ margin-top:30px; display:flex; gap:10px; }

/* ---------- Gallery ---------- */
.gallery-tabs{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:26px; }
.gallery-tab{
  padding:10px 20px; border-radius:30px; font-size:13.5px; font-weight:700;
  background:#fff; border:1px solid var(--gray-300); color:var(--gray-700); transition:.2s;
}
.gallery-tab:hover{ border-color: var(--navy); color: var(--navy); }
.gallery-tab.active{ background: var(--navy); border-color: var(--navy); color:#fff; }
.gallery-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.gallery-item{ border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow); background:#fff; }
.gallery-item img{ aspect-ratio:4/3; object-fit:cover; width:100%; }
.bulletin-item img{ aspect-ratio:4/3; object-fit:contain; background:var(--gray-100); }
.photo-stack{ display:flex; flex-direction:column; gap:16px; margin-top:20px; }
.photo-stack img{ width:100%; height:auto; display:block; border-radius:8px; box-shadow:var(--shadow); }
.gallery-item .card-body{ padding:14px 16px; }
.photo-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:20px; }
.photo-grid img{ aspect-ratio:1/1; object-fit:cover; border-radius:8px; }
.newmember-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.newmember-item{ background:#fff; border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow); text-align:center; }
.newmember-item img{ aspect-ratio:1/1; object-fit:cover; width:100%; }
.newmember-item p{ margin:0; padding:10px 8px; font-size:13px; font-weight:500; color:var(--gray-700); }

.nf-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }
.nf-card{ background:#fff; border:1px solid #222; border-radius:4px; overflow:hidden; }
.nf-photo{ background:var(--gray-100); }
.nf-photo img{ width:100%; aspect-ratio:3/4; object-fit:cover; display:block; }
.nf-table{ width:100%; border-collapse:collapse; }
.nf-table th, .nf-table td{ border-top:1px solid #222; padding:8px 10px; font-size:13px; text-align:left; }
.nf-table th{ background:var(--gray-50); font-weight:700; width:70px; white-space:nowrap; }
.nf-table td{ color:var(--gray-700); }
.nf-table tr:first-child th, .nf-table tr:first-child td{ border-top:1px solid #222; }

/* 메인 페이지 미리보기 전용: 다른 탭(newmember-grid) 게시물과 크기를 맞춘 컴팩트 버전 */
.nf-grid-compact{ grid-template-columns:repeat(4,1fr); gap:18px; }
.nf-grid-compact .nf-photo img{ aspect-ratio:1/1; }
.nf-grid-compact .nf-table th, .nf-grid-compact .nf-table td{ padding:6px 8px; font-size:11.5px; }
.nf-grid-compact .nf-table th{ width:56px; }

/* ---------- About (교회소개) 사이드바 레이아웃 ---------- */
.about-layout{ display:flex; align-items:flex-start; gap:48px; max-width:var(--max-width); margin:0 auto; padding:0 24px 70px; }
.about-side{ width:220px; flex-shrink:0; padding-top:34px; border-top:2px solid var(--navy); }
.about-side h2{ font-size:20px; font-weight:900; margin:0 0 20px; }
.about-side nav{ display:flex; flex-direction:column; border-bottom:2px solid var(--navy); }
.about-side nav a{ padding:13px 4px; font-size:14.5px; color:var(--gray-700); border-top:1px solid var(--gray-100); }
.about-side nav a:first-child{ border-top:none; }
.about-side nav a:hover{ color:var(--navy); }
.about-side nav a.active{ color:var(--navy); font-weight:700; }
.about-content{ flex:1; min-width:0; padding-top:34px; }

.welcome-hero{
  position:relative; border-radius:var(--radius); overflow:hidden; min-height:560px;
  display:flex; align-items:center; justify-content:center; padding:60px 24px;
  background:linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #24305c 100%);
  background-size:cover; background-position:center;
}
.welcome-card{
  position:relative; max-width:520px; width:100%; text-align:center; color:#fff;
  background:rgba(15,20,38,0.55); backdrop-filter:blur(3px);
  border:1px solid rgba(255,255,255,0.25); border-radius:18px; padding:44px 36px;
}
.welcome-card .script{ font-family:Georgia, 'Times New Roman', serif; font-style:italic; font-size:34px; margin:0 0 18px; }
.welcome-card p{ font-size:14.5px; line-height:1.9; color:#e7e9f2; margin:0 0 10px; white-space:pre-line; }
.welcome-card .welcome-title{ font-size:17px; font-weight:700; margin:22px 0 4px; }
.welcome-photo{ margin:22px auto 0; width:110px; height:110px; border-radius:50%; object-fit:cover; border:3px solid rgba(255,255,255,0.5); }
.welcome-brand{ margin-top:26px; font-size:26px; font-weight:900; letter-spacing:1px; }
.welcome-brand span{ display:block; color:var(--gold-light); }

/* ---------- Worship / Location ---------- */
.info-table{ width:100%; border-collapse:collapse; background:#fff; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); }
.info-table th, .info-table td{ padding:16px 20px; text-align:left; border-bottom:1px solid var(--gray-100); font-size:14px; }
.info-table th{ background: var(--gray-50); width:180px; color:var(--gray-700); font-weight:700; }
.map-frame{ width:100%; height:380px; border:0; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Pagination ---------- */
.pagination{ display:flex; justify-content:center; gap:6px; margin-top:28px; }
.page-link{
  padding:8px 14px; border-radius:8px; font-size:13.5px; background:#fff; border:1px solid var(--gray-300); color:var(--gray-700);
}
.page-link.active{ background: var(--navy); color:#fff; border-color:var(--navy); }

/* ---------- Admin ---------- */
.admin-shell{ display:flex; min-height: calc(100vh - 140px); }
.admin-side{ width:220px; background: var(--navy); color:#fff; padding:30px 0; }
.admin-side a{ display:block; padding:14px 26px; color:#c7cbe0; font-size:14px; }
.admin-side a:hover, .admin-side a.active{ background: var(--navy-2); color:#fff; border-left:3px solid var(--gold); }
.admin-side-group summary{
  display:flex; align-items:center; justify-content:space-between; cursor:pointer;
  padding:14px 26px; color:#c7cbe0; font-size:14px; list-style:none; user-select:none;
  border-left:3px solid transparent;
}
.admin-side-group summary.has-link{ padding:0 26px; }
.admin-side-group summary a{
  display:block; flex:1; padding:14px 0; color:inherit; background:none !important; border-left:none !important;
}
.admin-side-group summary a:hover, .admin-side-group summary a.active{ color:#fff; }
.admin-side-group summary::-webkit-details-marker{ display:none; }
.admin-side-group summary::after{ content:'▾'; font-size:11px; transition:transform .15s; opacity:.7; }
.admin-side-group[open] summary::after{ transform:rotate(180deg); }
.admin-side-group summary:hover{ background: var(--navy-2); color:#fff; border-left-color: var(--gold); }
.admin-side-group[open] summary{ background: var(--navy-2); color:#fff; border-left-color: var(--gold); }
.admin-side-group a{ padding-left:44px; font-size:13.5px; background:rgba(0,0,0,0.12); }
.admin-side-group a:hover, .admin-side-group a.active{
  color: var(--gold-light); font-weight:700;
  background: rgba(0,0,0,0.12); border-left: 3px solid transparent;
}
.admin-content{ flex:1; padding:34px 40px; }

/* ---------- Modal (검색 결과 팝업 등) ---------- */
.modal-overlay{
  display:none; position:fixed; inset:0; background:rgba(18,24,43,0.55);
  z-index:200; align-items:flex-start; justify-content:center; padding:80px 20px;
}
.modal-overlay.open{ display:flex; }
.modal-box{
  background:#fff; border-radius:var(--radius); box-shadow:var(--shadow-lg);
  width:100%; max-width:520px; max-height:70vh; overflow-y:auto;
}
.modal-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px; border-bottom:1px solid var(--gray-100); position:sticky; top:0; background:#fff;
}
.modal-header h3{ margin:0; font-size:16px; }
.modal-close{ border:none; background:none; font-size:22px; line-height:1; cursor:pointer; color:var(--gray-500); }
.modal-close:hover{ color:var(--navy); }
#searchModalBody{ padding:8px 0; }
#searchModalBody .board-list{ box-shadow:none; border-radius:0; }
#searchModalBody .empty-state{ padding:30px 20px; }
.admin-content h1{ font-size:22px; margin:0 0 22px; }
.admin-table{ width:100%; border-collapse:collapse; background:#fff; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); }
.admin-table th, .admin-table td{ padding:14px 18px; border-bottom:1px solid var(--gray-100); font-size:13.5px; text-align:left; }
.admin-table th{ background:var(--gray-50); font-weight:700; }
.admin-table tr.dragging{ opacity:.4; background:var(--gray-50); }
.org-dept-table th, .org-dept-table td{ border-right:1px solid var(--gray-100); }
.admin-table .drag-handle{ user-select:none; }
.admin-toolbar{ display:flex; justify-content:space-between; margin-bottom:18px; }
.badge{ padding:3px 10px; border-radius:20px; font-size:11.5px; font-weight:700; }
.badge-notice{ background:#fdecd8; color:#b9770e; }
.badge-normal{ background:var(--gray-100); color:var(--gray-700); }
.badge-super{ background:var(--navy); color:#fff; }
.badge-sub{ background:rgba(201,162,39,0.16); color:#8a6c14; }
.action-link{ font-size:12.5px; font-weight:700; color:var(--navy); margin-right:10px; }
.action-link.danger{ color:#c0392b; }
.stat-cards{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-bottom:30px; }
.stat-card{ background:#fff; border-radius:var(--radius); box-shadow:var(--shadow); padding:22px; }
.stat-card .num{ font-size:26px; font-weight:900; color:var(--navy); }
.stat-card .label{ font-size:13px; color:var(--gray-700); margin-top:4px; }

.schedule-cal{ background:#fff; border-radius:var(--radius); box-shadow:var(--shadow); padding:20px; }
.schedule-cal-toolbar{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.schedule-cal-nav{
  width:30px; height:30px; border:1px solid var(--gray-300); border-radius:6px; background:#fff;
  font-size:15px; cursor:pointer; color:var(--gray-700);
}
.schedule-cal-nav:hover{ background:var(--gray-100); }
.schedule-cal-month{ font-size:15px; font-weight:700; min-width:110px; }
.schedule-cal-add{ margin-left:auto; padding:8px 16px; font-size:13px; }
.schedule-cal-weekdays{
  display:grid; grid-template-columns:repeat(7, 1fr); text-align:center;
  font-size:12.5px; color:var(--gray-500); font-weight:700; margin-bottom:6px;
}
.schedule-cal-grid{ display:flex; flex-direction:column; gap:2px; }
.schedule-cal-week{ position:relative; border-top:1px solid var(--gray-100); padding:6px 0; }
.schedule-cal-week:first-child{ border-top:none; }
.schedule-cal-daynums{ display:grid; grid-template-columns:repeat(7, 1fr); }
.schedule-cal-daynum-cell{
  min-height:24px; cursor:pointer; border-radius:6px; padding:2px 4px;
}
.schedule-cal-daynum-cell:hover{ background:var(--gray-50); }
.schedule-cal-daynum-cell.empty{ cursor:default; }
.schedule-cal-daynum-cell.empty:hover{ background:transparent; }
.schedule-cal-daynum-cell.outside-month span{ color:var(--gray-300); font-weight:500; }
.schedule-cal-daynum-cell.is-today span{
  display:inline-flex; align-items:center; justify-content:center;
  width:20px; height:20px; border-radius:50%; background:var(--gold); color:#fff;
}
.schedule-cal-daynum-cell span{ font-size:12.5px; color:var(--gray-700); font-weight:700; }
.schedule-cal-bars{ position:relative; margin-top:2px; }
.schedule-cal-bar{
  position:absolute; color:#fff; font-size:12px; font-weight:500; line-height:22px;
  padding:0 10px; border-radius:11px; cursor:pointer;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  box-sizing:border-box; margin:0 2px;
}
.schedule-cal-bar:hover{ filter:brightness(0.92); }
.schedule-cal-bar.no-round-left{ border-top-left-radius:0; border-bottom-left-radius:0; margin-left:0; }

.schedule-tooltip{
  position:fixed; z-index:200; background:#12182b; color:#fff; border-radius:8px;
  padding:8px 12px; font-size:12.5px; align-items:center; gap:14px; pointer-events:none;
  box-shadow: var(--shadow-lg); white-space:nowrap;
}
.schedule-tooltip::after{
  content:''; position:absolute; top:100%; left:16px;
  border:6px solid transparent; border-top-color:#12182b;
}
.schedule-tooltip .tt-time{ font-weight:700; }
.schedule-tooltip .tt-author{ color:var(--gray-300); }

.schedule-modal-backdrop{
  position:fixed; inset:0; background:rgba(18,24,43,0.5); z-index:100;
  display:flex; align-items:center; justify-content:center; padding:20px;
}
.schedule-modal{
  position:relative;
  background:#fff; border-radius:12px; padding:24px; width:100%; max-width:400px;
  box-shadow: var(--shadow-lg);
}
.schedule-modal-close{
  position:absolute; top:14px; right:14px;
  width:28px; height:28px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--gray-100, #f0f1f5); border:none; cursor:pointer;
  color:var(--gray-500, #6b7280); font-size:16px; line-height:1; padding:0;
  transition: background .15s ease, color .15s ease;
}
.schedule-modal-close:hover{
  background:var(--gray-200, #e2e4ea); color:var(--navy, #12182b);
}

@media (max-width:640px){
  .schedule-cal-bar{ font-size:10.5px; padding:0 6px; }
}

/* ---------- Footer ---------- */
.site-footer{ background: var(--navy); color:#aab0c6; padding:44px 24px; margin-top:60px; }
.footer-inner{ max-width: var(--max-width); margin:0 auto; text-align:center; }
.footer-brand{ font-size:18px; font-weight:900; color:#fff; margin-bottom:12px; }
.footer-brand span{ color: var(--gold); }
.footer-inner p{ font-size:12.5px; margin:4px 0; }
.footer-copy{ opacity:.7; margin-top:14px; }

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

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .grid-2, .grid-3, .quick-info, .gallery-grid{ grid-template-columns:1fr 1fr; }
  .photo-grid, .newmember-grid{ grid-template-columns:repeat(3,1fr); }
  .nf-grid{ grid-template-columns:repeat(2,1fr); }
  .nf-grid-compact{ grid-template-columns:repeat(3,1fr); }
  .admin-shell{ flex-direction:column; }
  .admin-side{ width:100%; display:flex; overflow-x:auto; padding:0; }
  .admin-side a{ padding:14px 18px; border-left:none !important; white-space:nowrap; }
}
@media (max-width: 640px){
  .nav-toggle{ display:flex; }
  .main-nav{
    position:absolute; top:100%; left:0; right:0; background:var(--navy-2);
    flex-direction:column; align-items:flex-start; padding:16px 24px; display:none; gap:16px;
  }
  .main-nav.open{ display:flex; }
  .hero h1{ font-size:28px; }
  .hero-tagline .hero-line{ display:block; }
  .quick-info{ grid-template-columns:1fr 1fr; margin-top:20px; }
  .grid-2, .grid-3, .gallery-grid{ grid-template-columns:1fr; }
  .photo-grid, .newmember-grid{ grid-template-columns:repeat(2,1fr); }
  .nf-grid{ grid-template-columns:1fr; }
  .nf-grid-compact{ grid-template-columns:repeat(2,1fr); }
  .form-row{ grid-template-columns:1fr; }
  .stat-cards{ grid-template-columns:1fr 1fr; }
  .about-layout{ flex-direction:column; gap:20px; }
  .about-side{ width:100%; padding-top:20px; }
  .about-side nav{ flex-direction:row; flex-wrap:wrap; border-bottom:none; }
  .about-side nav a{ border-top:none; padding:6px 10px; background:var(--gray-100); border-radius:20px; font-size:13px; }
  .about-content{ padding-top:0; }
  .welcome-hero{ min-height:auto; padding:40px 16px; }
  .welcome-card{ padding:30px 20px; }
  .welcome-card .script{ font-size:26px; }
  .terms-box{ max-height:140px; }
}

/* 라이트박스: 사진 클릭 시 큰 사이즈로 보기 */
.lightbox-overlay{
  position:fixed; inset:0; background:rgba(10,13,25,0.92);
  display:flex; align-items:center; justify-content:center;
  opacity:0; visibility:hidden; transition:opacity .2s ease;
  z-index:2000; padding:40px;
}
.lightbox-overlay.open{ opacity:1; visibility:visible; }
.lightbox-img{
  max-width:90vw; max-height:90vh; border-radius:8px;
  box-shadow: var(--shadow-lg); cursor:default;
}
.lightbox-close{
  position:absolute; top:20px; right:28px; color:#fff; font-size:36px;
  line-height:1; cursor:pointer; font-weight:300;
}

/* 다음세대 포스팅 WYSIWYG 편집기 */
.wysiwyg-toolbar{
  display:flex; flex-wrap:wrap; gap:4px; align-items:center;
  background:var(--gray-50); border:1px solid var(--gray-300); border-bottom:none;
  border-radius:10px 10px 0 0; padding:8px;
}
.wysiwyg-toolbar button{
  border:1px solid transparent; background:transparent; border-radius:6px;
  padding:6px 10px; font-size:13.5px; cursor:pointer; color:var(--text);
}
.wysiwyg-toolbar button:hover{ background:var(--gray-100); border-color:var(--gray-300); }
.wysiwyg-toolbar select{
  border:1px solid var(--gray-300); background:#fff; border-radius:6px;
  padding:5px 8px; font-size:13px; color:var(--text); cursor:pointer;
}
.wysiwyg-sep{ width:1px; height:20px; background:var(--gray-300); margin:0 4px; }
.wysiwyg-color-picker{ position:relative; }
.wysiwyg-color-toggle{
  display:flex; align-items:center; gap:5px;
  border:1px solid transparent; background:transparent; border-radius:6px;
  padding:6px 8px; font-size:13.5px; cursor:pointer; color:var(--text);
}
.wysiwyg-color-toggle:hover{ background:var(--gray-100); border-color:var(--gray-300); }
.wysiwyg-color-swatch{
  display:inline-block; width:14px; height:14px; border-radius:4px;
  border:1px solid var(--gray-300);
}
.wysiwyg-color-panel{
  display:none; position:absolute; top:calc(100% + 6px); left:0; z-index:20;
  background:#fff; border:1px solid var(--gray-300); border-radius:10px;
  box-shadow: var(--shadow-lg); padding:12px; width:max-content;
}
.wysiwyg-color-panel.open{ display:block; }
.wysiwyg-color-grid{
  display:grid; grid-template-columns:repeat(7, 20px); gap:6px; margin-bottom:10px;
}
.wysiwyg-swatch-btn{
  box-sizing:border-box;
  width:20px; height:20px; border-radius:5px; border:1px solid var(--gray-300);
  cursor:pointer; padding:0;
}
.wysiwyg-swatch-btn:hover{ transform:scale(1.12); }
.wysiwyg-color-custom-label{
  display:flex; align-items:center; justify-content:space-between;
  font-size:12.5px; color:var(--gray-700); font-weight:400; padding-top:8px;
  border-top:1px solid var(--gray-100);
}
.wysiwyg-color-custom-label input[type="color"]{
  width:24px; height:24px; padding:0; border:1px solid var(--gray-300); border-radius:6px;
  cursor:pointer; background:#fff;
}
.wysiwyg-editor{
  min-height:320px; border:1px solid var(--gray-300); border-radius:0 0 10px 10px;
  padding:18px; font-size:15px; line-height:1.7; background:#fff;
}
.wysiwyg-editor:focus{ outline:2px solid var(--gold); outline-offset:-2px; }
.wysiwyg-editor img{ max-width:100%; border-radius:8px; }
.wysiwyg-editor h2{ font-size:22px; margin:16px 0 10px; }
.wysiwyg-editor h3{ font-size:18px; margin:14px 0 8px; }
.wysiwyg-editor p{ margin:0 0 12px; }
.wysiwyg-editor ul, .wysiwyg-editor ol{ margin:0 0 12px 22px; }

/* 회원 관리: 권한 배지 클릭 시 뜨는 레이어 메뉴 */
.role-dropdown{ position:relative; display:inline-block; }
.role-badge-btn{ border:none; cursor:pointer; font-family:inherit; }
.role-dropdown-menu{
  display:none; z-index:200;
  background:#fff; border:1px solid var(--gray-300); border-radius:8px;
  box-shadow: var(--shadow-lg); min-width:130px; padding:6px;
}
.role-dropdown-menu.role-dropdown-menu-fixed{ position:fixed; }
.role-dropdown-menu.open{ display:block; }
.role-dropdown-menu a{
  display:block; padding:8px 10px; border-radius:6px; font-size:13px; font-weight:600;
  color:var(--text); white-space:nowrap;
}
.role-dropdown-menu a:hover{ background:var(--gray-100); }

/* 교회시설안내 관리: 타일 추가 카드 */
.tile-add-card{
  max-width:640px; margin-top:24px; padding:22px; border:1px solid var(--gray-300);
  border-radius:14px; background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%);
  box-shadow: var(--shadow);
}
.tile-add-label{
  display:flex; align-items:center; gap:16px; padding:18px; border:1.5px dashed var(--gray-300);
  border-radius:10px; cursor:pointer; transition:.2s; background:#fff;
}
.tile-add-label:hover{ border-color: var(--gold); background: rgba(201,162,39,0.05); }
.tile-add-icon{ font-size:26px; }
.tile-add-label strong{ display:block; font-size:14.5px; color:var(--text); }
.tile-add-label small{ display:block; font-size:12px; color:var(--gray-500); margin-top:2px; }
.tile-add-label input[type="file"]{ display:none; }
.tile-add-submit{ display:block; width:100%; margin-top:14px; padding:13px; font-size:14.5px; }

/* 회원가입: 이용약관/개인정보 처리방침 박스 */
.terms-box{
  max-height:160px; overflow-y:auto;
  padding:18px 20px; margin:18px 0 4px;
  border:1px solid var(--gray-300); border-radius:10px; background:var(--gray-50);
  font-size:12.5px; line-height:1.6; color:var(--gray-700);
}
.terms-box h3{ font-size:14.5px; margin:14px 0 8px; color:var(--navy); }
.terms-box h3:first-child{ margin-top:0; }
.terms-box p{ margin:8px 0; }
.terms-scroll-hint{ font-size:11.5px; color:var(--gray-500); margin:0 0 14px; }
.terms-agree{
  display:flex; align-items:center; gap:8px; font-size:13.5px; font-weight:600;
  margin:0 0 20px; cursor:pointer;
}
.terms-agree input{ width:auto; }

/* 교회시설안내 관리: 드래그 앤 드롭 타일 그리드 */
.tile-grid{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:18px;
}
.tile-card{
  position:relative; background:#fff; border:1px solid var(--gray-300); border-radius:12px;
  overflow:hidden; cursor:grab; transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  box-shadow: 0 2px 8px rgba(18,24,43,0.06);
}
.tile-card:hover{ box-shadow: var(--shadow-lg); transform:translateY(-2px); }
.tile-card.dragging{ opacity:.4; cursor:grabbing; }
.tile-card-img{ width:66%; aspect-ratio:1; object-fit:cover; display:block; margin:14px auto 0; border-radius:8px; }
.tile-drag-handle{
  position:absolute; top:8px; left:8px; background:rgba(18,24,43,0.55); color:#fff;
  font-size:12px; letter-spacing:1px; padding:4px 7px; border-radius:6px; pointer-events:none;
}
.tile-card-delete{
  position:absolute; top:8px; right:8px; width:26px; height:26px; border-radius:50%;
  background:rgba(18,24,43,0.55); color:#fff; display:flex; align-items:center; justify-content:center;
  font-size:16px; line-height:1; transition:.15s;
}
.tile-card-delete:hover{ background:#c0392b; }
.tile-card-form{
  display:flex; gap:6px; padding:10px; border-top:1px solid var(--gray-100);
}
.tile-card-form input[type="text"]{
  flex:1; font-size:12.5px; padding:7px 9px; border:1px solid var(--gray-300); border-radius:6px;
}
.tile-card-form button{
  padding:7px 12px; border-radius:6px; font-size:12.5px; font-weight:700; border:none;
  background: var(--gold); color: var(--navy); cursor:pointer; transition:.15s;
}
.tile-card-form button:hover{ background: var(--gold-light); }

/* 교회조직 관리: 테이블 미리보기 레이어 */
.table-preview-overlay{
  position:fixed; inset:0; background:rgba(10,13,25,0.75);
  display:flex; align-items:center; justify-content:center;
  opacity:0; visibility:hidden; transition:opacity .2s ease; z-index:500; padding:30px;
}
.table-preview-overlay.open{ opacity:1; visibility:visible; }
.table-preview-panel{
  background:#fff; border-radius:14px; box-shadow: var(--shadow-lg);
  max-width:min(1100px, 95vw); max-height:90vh; width:100%;
  display:flex; flex-direction:column; overflow:hidden;
}
.table-preview-toolbar{
  display:flex; align-items:center; gap:24px; flex-wrap:wrap;
  padding:16px 22px; border-bottom:1px solid var(--gray-300); background:var(--gray-50);
}
.table-preview-toolbar label{
  display:flex; align-items:center; gap:10px; font-size:13px; font-weight:700; color:var(--text);
}
.table-preview-toolbar input[type="range"]{ width:130px; }
.table-preview-body{ padding:24px; overflow:auto; }
.table-preview-body .org-dept-table{ margin:0 auto; transition:font-size .1s ease; }
