/* =====================================================
 * nanum.css  –  나눔포털 전용 스타일
 * ===================================================== */

/* ── CSS 변수 ─────────────────────────────────────── */
:root {
  /* ── 색상 변수 ── */
  --nm-red:    #e84b3a;
  --nm-green:  #27ae60;
  --nm-blue:   #2980b9;
  --nm-purple: #8e44ad;
  --nm-orange: #e67e22;
  --nm-gray:   #64748b;
  --nm-bg:     #f8fafc;
  --nm-white:  #ffffff;
  --nm-border: #e2e8f0;
  --nm-text:   #1e293b;
  --nm-sub:    #475569;
  --nm-radius: 12px;
  --nm-shadow: 0 2px 12px rgba(0,0,0,.08);

  /* ── 타이포그래피 스케일 (PROJECT_RULES.md 원칙3 / layout.css --fs-* 공통 참조) ── */
  --nm-fs-xs: var(--fs-xs, 12px);   /* 12px — 배지 전용 */
  --nm-fs-sm: var(--fs-sm, 14px);   /* 14px — 메타·날짜·보조텍스트 최솟값 */
  --nm-fs-base: var(--fs-base, 16px);   /* 16px — 본문 기본 */
  --nm-fs-md: var(--fs-md, 17px);   /* 17px — 강조 본문·버튼·폼 */
  --nm-fs-lg: var(--fs-lg, 18px);   /* 18px — 카드 제목·섹션명 */
  --nm-fs-xl: var(--fs-xl, 20px);   /* 20px — 서브 헤더 */
  --nm-fs-2xl: var(--fs-2xl, 24px);   /* 24px — 페이지 제목 */
  --nm-fs-3xl: var(--fs-3xl, 28px);   /* 28px — 섹션 대제목 */
  --nm-fs-hero: var(--fs-hero, 32px);   /* 32px — 히어로 제목 */
}

/* ── 히어로 배너 ──────────────────────────────────── */
.nm-hero {
  background: linear-gradient(135deg, #e84b3a 0%, #c0392b 60%, #8e1a1a 100%);
  padding: 40px 24px 48px;
  color: #fff;
  border-radius: 0 0 20px 20px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.nm-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.nm-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.nm-hero h1 {
  margin: 0 0 8px;
  font-size: var(--nm-fs-hero);
  font-weight: 900;
  letter-spacing: -.5px;
}
.nm-hero p {
  margin: 0;
  font-size: var(--nm-fs-base);
  opacity: .88;
}
.nm-hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.nm-hero-stat {
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 10px 18px;
  text-align: center;
  backdrop-filter: blur(4px);
}
.nm-hero-stat strong {
  display: block;
  font-size: var(--nm-fs-xl);
  font-weight: 900;
}
.nm-hero-stat span {
  font-size: var(--nm-fs-sm);
  opacity: .85;
}

/* ── 메인 컨테이너 ─────────────────────────────────── */
.nm-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── 섹션 타이틀 ───────────────────────────────────── */
.nm-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--nm-fs-xl);
  font-weight: 800;
  color: var(--nm-text);
  margin: 0 0 18px;
}
.nm-section-title i { color: var(--nm-red); }
.nm-section-more {
  margin-left: auto;
  font-size: var(--nm-fs-sm);
  color: var(--nm-gray);
  text-decoration: none;
  font-weight: 500;
}
.nm-section-more:hover { color: var(--nm-red); }

/* ── 4대 메뉴 카드 그리드 ────────────────────────── */
.nm-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.nm-type-card {
  background: var(--nm-white);
  border-radius: var(--nm-radius);
  padding: 24px 16px 20px;
  text-align: center;
  text-decoration: none;
  color: var(--nm-text);
  box-shadow: var(--nm-shadow);
  border: 2px solid transparent;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.nm-type-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
}
.nm-type-card.donation  { border-top: 4px solid var(--nm-red); }
.nm-type-card.volunteer { border-top: 4px solid var(--nm-green); }
.nm-type-card.market    { border-top: 4px solid var(--nm-blue); }
.nm-type-card.talent    { border-top: 4px solid var(--nm-purple); }
.nm-type-card .tc-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--nm-fs-icon);
  margin: 0 auto 12px;
}
.nm-type-card.donation  .tc-icon { background: #fde8e6; color: var(--nm-red); }
.nm-type-card.volunteer .tc-icon { background: #d5f5e3; color: var(--nm-green); }
.nm-type-card.market    .tc-icon { background: #d6eaf8; color: var(--nm-blue); }
.nm-type-card.talent    .tc-icon { background: #e8daef; color: var(--nm-purple); }
.nm-type-card .tc-name  { font-size: var(--nm-fs-lg); font-weight: 800; margin-bottom: 4px; }
.nm-type-card .tc-count { font-size: var(--nm-fs-sm); color: var(--nm-gray); }
.nm-type-card .tc-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: var(--nm-fs-xs); background: #ef4444; color: #fff;
  border-radius: 20px; padding: 2px 8px; font-weight: 700;
}

/* ── 긴급요청 배너 ─────────────────────────────────── */
.nm-urgent-banner {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: var(--nm-radius);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  color: #fff;
  margin-bottom: 28px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(239,68,68,.35);
  transition: transform .2s;
}
.nm-urgent-banner:hover { transform: translateY(-2px); color: #fff; }
.nm-urgent-banner .ub-icon {
  width: 48px; height: 48px; background: rgba(255,255,255,.2);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: var(--nm-fs-icon); flex-shrink: 0;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}
.nm-urgent-banner .ub-text strong { font-size: var(--nm-fs-md); font-weight: 800; }
.nm-urgent-banner .ub-text p { margin: 2px 0 0; font-size: var(--nm-fs-base); opacity: .88; }
.nm-urgent-banner .ub-count {
  margin-left: auto; background: rgba(255,255,255,.25);
  border-radius: 10px; padding: 8px 16px; text-align: center; flex-shrink: 0;
}
.nm-urgent-banner .ub-count strong { display: block; font-size: var(--nm-fs-2xl); font-weight: 900; }
.nm-urgent-banner .ub-count span   { font-size: var(--nm-fs-sm); opacity: .85; }

/* ── 게시글 카드 리스트 ─────────────────────────────── */
.nm-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.nm-post-card {
  background: var(--nm-white);
  border-radius: var(--nm-radius);
  overflow: hidden;
  box-shadow: var(--nm-shadow);
  border: 1px solid var(--nm-border);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--nm-text);
}
.nm-post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.nm-post-card .pc-thumb {
  width: 100%; aspect-ratio: 16/9;
  background: #f1f5f9;
  object-fit: cover;
}
.nm-post-card .pc-thumb-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--nm-fs-icon-lg); color: #cbd5e1;
}
.nm-post-card .pc-body {
  padding: 14px 16px;
  flex: 1; display: flex; flex-direction: column;
}
.nm-post-card .pc-tags { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.nm-post-card .pc-title {
  font-size: var(--nm-fs-lg); font-weight: 700; line-height: 1.4;
  margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nm-post-card .pc-meta { margin-top: auto; font-size: var(--nm-fs-sm); color: var(--nm-gray); }
.nm-post-card .pc-meta span + span::before { content: ' · '; }
.nm-post-card .pc-edit-bar { margin-top:8px; display:flex; gap:6px; }
.nm-post-card .pc-edit-bar a { text-decoration:none; }

/* ── 뱃지/태그 ─────────────────────────────────────── */
.nm-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--nm-fs-xs); font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
  white-space: nowrap;
}
.nm-badge-donation  { background: #fde8e6; color: #c0392b; }
.nm-badge-volunteer { background: #d5f5e3; color: #1e8449; }
.nm-badge-market    { background: #d6eaf8; color: #1a5276; }
.nm-badge-talent    { background: #e8daef; color: #6c3483; }
.nm-badge-urgent    { background: #fee2e2; color: #ef4444; }
.nm-badge-open      { background: #dcfce7; color: #16a34a; }
.nm-badge-done      { background: #e2e8f0; color: #64748b; }
.nm-badge-free      { background: #fef3c7; color: #d97706; }

/* ── 나눔 온도 온도계 ──────────────────────────────── */
.nm-temp-widget {
  background: var(--nm-white);
  border-radius: var(--nm-radius);
  padding: 20px;
  box-shadow: var(--nm-shadow);
  border: 1px solid var(--nm-border);
  text-align: center;
}
.nm-temp-circle {
  width: 100px; height: 100px;
  border-radius: 50%;
  margin: 0 auto 10px;
  background: conic-gradient(
    var(--temp-color, #e84b3a) calc(var(--temp-pct, 36.5) * 1%),
    #f1f5f9 0
  );
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.nm-temp-circle::before {
  content: '';
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
}
.nm-temp-val {
  position: relative; z-index: 1;
  font-size: var(--nm-fs-xl); font-weight: 900; color: var(--temp-color, #e84b3a);
}
.nm-temp-label { font-size: var(--nm-fs-sm); color: var(--nm-gray); margin-top: 4px; }

/* ── 랭킹 리스트 ───────────────────────────────────── */
.nm-rank-list { list-style: none; padding: 0; margin: 0; }
.nm-rank-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--nm-border);
}
.nm-rank-item:last-child { border-bottom: none; }
.nm-rank-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--nm-bg); font-weight: 900; font-size: var(--nm-fs-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nm-rank-item:nth-child(1) .nm-rank-num { background: #fbbf24; color: #fff; }
.nm-rank-item:nth-child(2) .nm-rank-num { background: #9ca3af; color: #fff; }
.nm-rank-item:nth-child(3) .nm-rank-num { background: #b45309; color: #fff; }
.nm-rank-info { flex: 1; }
.nm-rank-name { font-size: var(--nm-fs-base); font-weight: 700; }
.nm-rank-sub  { font-size: var(--nm-fs-sm); color: var(--nm-gray); }
.nm-rank-temp { font-size: var(--nm-fs-md); font-weight: 800; color: var(--nm-red); }

/* ── 서브 헤더 (각 섹션 공통) ─────────────────────── */
.nm-sub-header {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--nm-border);
  margin-bottom: 24px;
}
.nm-sub-header h1 {
  font-size: var(--nm-fs-2xl); font-weight: 900; margin: 0 0 6px;
  display: flex; align-items: center; gap: 10px;
}
.nm-sub-header p { font-size: var(--nm-fs-base); color: var(--nm-sub); margin: 0; }

/* ── 필터 바 ───────────────────────────────────────── */
.nm-filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: var(--nm-white);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: var(--nm-shadow);
}
.nm-filter-bar select,
.nm-filter-bar input[type="text"] {
  border: 1px solid var(--nm-border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: var(--nm-fs-base);
  background: var(--nm-bg);
  color: var(--nm-text);
  outline: none;
  transition: border-color .2s;
}
.nm-filter-bar select:focus,
.nm-filter-bar input[type="text"]:focus { border-color: var(--nm-red); }
.nm-filter-label { font-size: var(--nm-fs-base); font-weight: 600; color: var(--nm-sub); white-space: nowrap; }

/* ── 버튼 ──────────────────────────────────────────── */
.nm-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--nm-fs-md); font-weight: 700;
  padding: 9px 20px; border-radius: 8px;
  border: none; cursor: pointer; text-decoration: none;
  transition: background .2s, transform .15s;
}
.nm-btn:active { transform: scale(.97); }
.nm-btn-primary  { background: var(--nm-red);    color: #fff; }
.nm-btn-primary:hover  { background: #c0392b; color: #fff; }
.nm-btn-green    { background: var(--nm-green);  color: #fff; }
.nm-btn-green:hover    { background: #1e8449; color: #fff; }
.nm-btn-blue     { background: var(--nm-blue);   color: #fff; }
.nm-btn-blue:hover     { background: #1a5276; color: #fff; }
.nm-btn-purple   { background: var(--nm-purple); color: #fff; }
.nm-btn-purple:hover   { background: #6c3483; color: #fff; }
.nm-btn-outline  {
  background: transparent; color: var(--nm-red);
  border: 2px solid var(--nm-red);
}
.nm-btn-outline:hover  { background: var(--nm-red); color: #fff; }
.nm-btn-sm { font-size: var(--nm-fs-base); padding: 6px 14px; }
.nm-btn-ghost {
  background: #f1f5f9; color: #1e293b;
  border: 1px solid transparent;
}
.nm-btn-ghost:hover { background: #e2e8f0; }
.nm-btn-full { width: 100%; padding: 13px; font-size: var(--nm-fs-md); justify-content: center; }

/* ── 빈 상태 ───────────────────────────────────────── */
.nm-empty {
  text-align: center; padding: 56px 24px;
  background: var(--nm-bg); border-radius: var(--nm-radius);
  border: 2px dashed var(--nm-border);
}
.nm-empty i { font-size: var(--nm-fs-icon-lg); color: #cbd5e1; display: block; margin-bottom: 14px; }
.nm-empty p { font-size: var(--nm-fs-base); color: var(--nm-gray); margin: 0 0 18px; }

/* ── 파트너 기관 그리드 ─────────────────────────────── */
.nm-partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.nm-partner-card {
  background: var(--nm-white);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--nm-shadow);
}
.nm-partner-card .pa-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: #fde8e6; color: var(--nm-red);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--nm-fs-icon); margin: 0 auto 10px;
}
.nm-partner-card .pa-name { font-size: var(--nm-fs-base); font-weight: 700; }
.nm-partner-card .pa-region { font-size: var(--nm-fs-sm); color: var(--nm-gray); }

/* ── 반응형 ────────────────────────────────────────── */
@media (max-width: 900px) {
  .nm-type-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .nm-hero h1    { font-size: var(--nm-fs-2xl); }
  .nm-type-grid  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .nm-hero-stats { gap: 10px; }
  .nm-post-grid  { grid-template-columns: 1fr; }
  .nm-urgent-banner .ub-count { display: none; }
  .nm-filter-bar { flex-direction: column; align-items: stretch; }
}

/* =====================================================
 * 달력 / 예약 모듈 전용 스타일
 * ===================================================== */

/* ── 달력 컨테이너 ────────────────────────────────── */
.nm-cal-wrap {
  background: var(--nm-white);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius);
  box-shadow: var(--nm-shadow);
  overflow: hidden;
}

/* ── 달력 헤더 (월 네비게이션) ───────────────────── */
.nm-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #e84b3a, #c0392b);
  color: #fff;
}
.nm-cal-header h2 {
  font-size: var(--nm-fs-xl);
  font-weight: 900;
  margin: 0;
  letter-spacing: -.3px;
}
.nm-cal-nav {
  width: 36px; height: 36px;
  border: none; background: rgba(255,255,255,.2);
  color: #fff; border-radius: 8px;
  font-size: var(--nm-fs-base); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.nm-cal-nav:hover { background: rgba(255,255,255,.35); }
.nm-cal-today-btn {
  font-size: var(--nm-fs-base); padding: 6px 14px;
  background: rgba(255,255,255,.2); color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 6px; cursor: pointer; font-weight: 700;
  transition: background .15s;
}
.nm-cal-today-btn:hover { background: rgba(255,255,255,.35); }

/* ── 요일 헤더 ────────────────────────────────────── */
.nm-cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f8fafc;
  border-bottom: 1px solid var(--nm-border);
}
.nm-cal-dow span {
  text-align: center;
  padding: 8px 0;
  font-size: var(--nm-fs-sm);
  font-weight: 700;
  color: var(--nm-gray);
}
.nm-cal-dow span:first-child { color: #ef4444; }
.nm-cal-dow span:last-child  { color: #3b82f6; }

/* ── 날짜 그리드 ──────────────────────────────────── */
.nm-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.nm-cal-cell {
  min-height: 100px;
  border-right: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  padding: 6px;
  position: relative;
  cursor: pointer;
  transition: background .1s;
  vertical-align: top;
}
.nm-cal-cell:nth-child(7n) { border-right: none; }
.nm-cal-cell:hover { background: #fef9f9; }
.nm-cal-cell.nm-cal-other  { background: #fafafa; }
.nm-cal-cell.nm-cal-today  { background: #fff5f5; }
.nm-cal-cell.nm-cal-today .nm-cal-day {
  background: #e84b3a; color: #fff;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.nm-cal-cell.nm-cal-selected { background: #fff0ee; outline: 2px solid #e84b3a; }
.nm-cal-day {
  font-size: var(--nm-fs-sm); font-weight: 700;
  color: var(--nm-text);
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.nm-cal-cell.nm-cal-other .nm-cal-day { color: #c0c8d4; }
.nm-cal-cell:nth-child(7n+1) .nm-cal-day { color: #ef4444; }
.nm-cal-cell:nth-child(7n+1).nm-cal-today .nm-cal-day { color: #fff; }
.nm-cal-cell:nth-child(7n)   .nm-cal-day { color: #3b82f6; }
.nm-cal-cell:nth-child(7n).nm-cal-today  .nm-cal-day { color: #fff; }

/* ── 달력 이벤트 칩 ───────────────────────────────── */
.nm-cal-event {
  display: block;
  font-size: var(--nm-fs-xs);
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity .15s;
  line-height: 1.5;
}
.nm-cal-event:hover { opacity: .8; }
.nm-cal-event.ev-volunteer { background: #d5f5e3; color: #1e8449; }
.nm-cal-event.ev-donation  { background: #fde8e6; color: #c0392b; }
.nm-cal-event.ev-market    { background: #d6eaf8; color: #1a5276; }
.nm-cal-event.ev-talent    { background: #e8daef; color: #6c3483; }
.nm-cal-event.ev-personal  { background: #fef3c7; color: #92400e; }
.nm-cal-event.ev-urgent    { background: #fee2e2; color: #ef4444; }
.nm-cal-event.ev-mine      { border-left: 3px solid currentColor; }
.nm-cal-more {
  font-size: var(--nm-fs-xs); color: var(--nm-gray);
  padding: 1px 4px; cursor: pointer;
  font-weight: 600;
}
.nm-cal-more:hover { color: var(--nm-red); }

/* ── 달력 필터 바 ─────────────────────────────────── */
.nm-cal-filter {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--nm-border);
  background: #fafbfc;
}
.nm-cal-filter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--nm-fs-sm); font-weight: 600;
  padding: 5px 12px; border-radius: 20px;
  border: 2px solid transparent;
  cursor: pointer; transition: all .15s;
  user-select: none;
}
.nm-cal-filter-chip.active-volunteer { background: #d5f5e3; color: #1e8449; border-color: #27ae60; }
.nm-cal-filter-chip.active-donation  { background: #fde8e6; color: #c0392b; border-color: #e84b3a; }
.nm-cal-filter-chip.active-market    { background: #d6eaf8; color: #1a5276; border-color: #2980b9; }
.nm-cal-filter-chip.active-talent    { background: #e8daef; color: #6c3483; border-color: #8e44ad; }
.nm-cal-filter-chip.active-personal  { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.nm-cal-filter-chip:not([class*="active"]) { background: #f1f5f9; color: #64748b; }
.nm-cal-filter-chip:not([class*="active"]):hover { background: #e2e8f0; }

/* ── 사이드 패널 (날짜 클릭 시 이벤트 목록) ─────── */
.nm-cal-side {
  border-left: 1px solid var(--nm-border);
  min-height: 400px;
  display: flex; flex-direction: column;
}
.nm-cal-side-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--nm-border);
  background: #f8fafc;
  font-size: var(--nm-fs-md); font-weight: 800;
}
.nm-cal-side-body { padding: 12px; flex: 1; overflow-y: auto; }
.nm-cal-side-empty {
  text-align: center; padding: 32px 16px;
  color: #94a3b8; font-size: var(--nm-fs-base);
}
.nm-cal-side-empty i { font-size: var(--nm-fs-icon-lg); display: block; margin-bottom: 10px; }

/* ── 이벤트 카드 (사이드 패널) ───────────────────── */
.nm-ev-card {
  border-radius: 10px;
  border: 1px solid var(--nm-border);
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.nm-ev-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--ev-color, #e84b3a);
}
.nm-ev-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
  transform: translateX(2px);
}
.nm-ev-card-title {
  font-size: var(--nm-fs-lg); font-weight: 700;
  margin-bottom: 5px;
  padding-left: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nm-ev-card-meta {
  font-size: var(--nm-fs-sm); color: var(--nm-gray);
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-left: 4px;
}

/* ── 신청 모달 ────────────────────────────────────── */
.nm-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.nm-modal-overlay.open {
  opacity: 1; pointer-events: all;
}
.nm-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%; max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  transform: translateY(20px) scale(.97);
  transition: transform .25s;
}
.nm-modal-overlay.open .nm-modal {
  transform: translateY(0) scale(1);
}
.nm-modal-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--nm-border);
  display: flex; align-items: flex-start; gap: 10px;
}
.nm-modal-header h3 {
  font-size: var(--nm-fs-xl); font-weight: 900; margin: 0;
  flex: 1; line-height: 1.35;
}
.nm-modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: #f1f5f9;
  font-size: var(--nm-fs-base); cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.nm-modal-close:hover { background: #fee2e2; color: #ef4444; }
.nm-modal-body { padding: 20px 22px; }
.nm-modal-footer {
  padding: 14px 22px 20px;
  border-top: 1px solid var(--nm-border);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ── 신청 폼 ──────────────────────────────────────── */
.nm-form-group { margin-bottom: 16px; }
.nm-form-label {
  display: block; font-size: var(--nm-fs-md); font-weight: 700;
  color: var(--nm-text); margin-bottom: 6px;
}
.nm-form-label span.req { color: #ef4444; margin-left: 3px; }
.nm-form-ctrl {
  width: 100%;
  border: 1.5px solid var(--nm-border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: var(--nm-fs-base);
  color: var(--nm-text);
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.nm-form-ctrl:focus {
  border-color: #e84b3a;
  box-shadow: 0 0 0 3px rgba(232,75,58,.12);
}
.nm-form-ctrl.error { border-color: #ef4444; }
.nm-form-hint { font-size: var(--nm-fs-sm); color: var(--nm-gray); margin-top: 4px; }
.nm-form-error { font-size: var(--nm-fs-sm); color: #ef4444; margin-top: 4px; display: none; }
.nm-form-error.show { display: block; }

/* ── 타임슬롯 선택 그리드 ─────────────────────────── */
.nm-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.nm-slot-btn {
  padding: 8px 4px;
  border: 2px solid var(--nm-border);
  border-radius: 8px;
  background: #fff;
  font-size: var(--nm-fs-base); font-weight: 600;
  cursor: pointer; text-align: center;
  transition: all .15s;
  line-height: 1.4;
}
.nm-slot-btn:hover:not(:disabled)  { border-color: #e84b3a; background: #fff5f5; }
.nm-slot-btn.selected { border-color: #e84b3a; background: #fde8e6; color: #c0392b; }
.nm-slot-btn:disabled {
  background: #f1f5f9; color: #adb5bd;
  cursor: not-allowed; text-decoration: line-through;
}
.nm-slot-btn .slot-avail { font-size: var(--nm-fs-sm); color: #27ae60; }
.nm-slot-btn.selected .slot-avail { color: #c0392b; }
.nm-slot-btn:disabled .slot-avail { color: #adb5bd; }

/* ── 신청 상태 배지 ───────────────────────────────── */
.nm-app-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--nm-fs-xs); font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
}
.nm-app-status.pending  { background: #fef3c7; color: #92400e; }
.nm-app-status.approved { background: #dcfce7; color: #166534; }
.nm-app-status.rejected { background: #fee2e2; color: #991b1b; }
.nm-app-status.done     { background: #dbeafe; color: #1e40af; }
.nm-app-status.cancelled{ background: #f1f5f9; color: #64748b; }

/* ── 내 예약 목록 카드 ────────────────────────────── */
.nm-my-app-card {
  background: #fff;
  border: 1px solid var(--nm-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex; gap: 12px; align-items: flex-start;
}
.nm-my-app-date {
  min-width: 52px;
  text-align: center;
  background: #fde8e6;
  border-radius: 8px;
  padding: 8px 4px;
  flex-shrink: 0;
}
.nm-my-app-date .date-m { font-size: var(--nm-fs-sm); color: #c0392b; font-weight: 700; }
.nm-my-app-date .date-d { font-size: var(--nm-fs-xl);   color: #e84b3a; font-weight: 900; line-height: 1; }
.nm-my-app-date .date-t { font-size: var(--nm-fs-sm);   color: #64748b; }
.nm-my-app-info { flex: 1; min-width: 0; }
.nm-my-app-title {
  font-size: var(--nm-fs-md); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 5px;
}
.nm-my-app-meta { font-size: var(--nm-fs-sm); color: var(--nm-gray); }

/* ── 알림 드롭다운 ────────────────────────────────── */
.nm-notif-dot {
  position: absolute; top: -3px; right: -3px;
  width: 8px; height: 8px;
  background: #ef4444; border-radius: 50%;
  border: 2px solid #fff;
}
.nm-notif-list { max-height: 360px; overflow-y: auto; }
.nm-notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex; gap: 10px; align-items: flex-start;
  cursor: pointer; transition: background .1s;
}
.nm-notif-item:hover { background: #fef9f9; }
.nm-notif-item.unread { background: #fff8f8; }
.nm-notif-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--nm-fs-base); flex-shrink: 0;
}
.nm-notif-body { flex: 1; min-width: 0; }
.nm-notif-title { font-size: var(--nm-fs-base); font-weight: 700; }
.nm-notif-time  { font-size: var(--nm-fs-sm); color: #94a3b8; }

/* ── 주간 뷰 ──────────────────────────────────────── */
.nm-week-grid {
  display: grid;
  grid-template-columns: 50px repeat(7, 1fr);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius);
  overflow: hidden;
}
.nm-week-time-col {
  background: #f8fafc;
  border-right: 1px solid var(--nm-border);
}
.nm-week-time-cell {
  height: 50px;
  display: flex; align-items: flex-start;
  justify-content: center;
  font-size: var(--nm-fs-sm); color: #94a3b8;
  padding-top: 3px;
  border-bottom: 1px solid #f1f5f9;
}
.nm-week-day-col {
  border-right: 1px solid var(--nm-border);
  position: relative;
}
.nm-week-day-col:last-child { border-right: none; }
.nm-week-day-header {
  text-align: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--nm-border);
  background: #f8fafc;
  font-size: var(--nm-fs-sm); font-weight: 700;
}
.nm-week-day-header.today { background: #fde8e6; color: #e84b3a; }
.nm-week-slot {
  height: 50px;
  border-bottom: 1px solid #f8fafc;
  position: relative;
}
.nm-week-event {
  position: absolute;
  left: 2px; right: 2px;
  border-radius: 4px;
  font-size: var(--nm-fs-xs); font-weight: 600;
  padding: 2px 4px;
  overflow: hidden;
  cursor: pointer;
  z-index: 1;
}

/* ── 반응형 (달력) ────────────────────────────────── */
@media (max-width: 900px) {
  .nm-cal-cell { min-height: 70px; }
  .nm-cal-event { font-size: var(--nm-fs-xs); }
  .nm-cal-side { border-left: none; border-top: 1px solid var(--nm-border); }
}
@media (max-width: 640px) {
  .nm-cal-cell { min-height: 52px; padding: 4px; }
  .nm-cal-day  { font-size: var(--nm-fs-sm); }
  .nm-cal-event { display: none; }
  .nm-cal-cell.has-event::after {
    content: '';
    width: 6px; height: 6px;
    background: var(--nm-red);
    border-radius: 50%;
    display: block; margin: 2px auto 0;
  }
  .nm-modal { border-radius: 12px 12px 0 0; }
  .nm-slot-grid { grid-template-columns: repeat(2, 1fr); }
}
/* =====================================================
 * 나눔 상세(Detail) 전용 스타일
 * ===================================================== */

/* ── 상세 레이아웃 ──────────────────────────────────── */
.nd-main { min-width: 0; } /* flex/grid 자식 overflow 방지 */

/* 상태 배지 추가 변형 */
.nm-badge-progress  { background: #fef9c3; color: #92400e; }
.nm-badge-featured  { background: #fef3c7; color: #d97706; }
.nm-badge-dday      { background: #dbeafe; color: #1e40af; }
.nm-badge-dday-0    { background: #fee2e2; color: #ef4444; }

/* 연관 게시글 그리드 */
.nd-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 4px;
}
.nd-related-item {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  padding: 10px;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  transition: border-color .15s;
}
.nd-related-item:hover { border-color: var(--nm-red); }
.nd-related-thumb {
  width: 44px; height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.nd-related-placeholder {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: #fde8e6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--nm-red);
  font-size: var(--nm-fs-sm);
}
.nd-related-info { overflow: hidden; }
.nd-related-title {
  font-size: var(--nm-fs-base);
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nd-related-sub {
  font-size: var(--nm-fs-sm);
  color: #64748b;
  margin-top: 2px;
}

/* 신청 현황 카드 내 숫자 강조 */
.nd-app-count-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.nd-app-count-num {
  font-size: var(--nm-fs-2xl);
  font-weight: 900;
  color: var(--nm-red);
  line-height: 1;
}
.nd-app-count-label {
  font-size: var(--nm-fs-sm);
  color: #64748b;
}

/* 신청 현황 진행바 */
.nd-progress-bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}
.nd-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--nm-red), #c0392b);
  border-radius: 4px;
  transition: width .5s;
}
.nd-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--nm-fs-sm);
  color: #94a3b8;
}

/* 신청 완료 상태 박스 */
.nd-closed-box {
  text-align: center;
  padding: 28px 22px;
}
.nd-closed-icon {
  font-size: var(--nm-fs-icon-lg);
  color: #cbd5e1;
  margin-bottom: 10px;
  display: block;
}
.nd-closed-title {
  font-size: var(--nm-fs-lg);
  font-weight: 700;
  color: #64748b;
}
.nd-closed-sub {
  font-size: var(--nm-fs-sm);
  color: #94a3b8;
  margin-top: 4px;
}

/* 후기 별점 */
.nd-star-off { opacity: .25; }
.nd-score-label { color: #64748b; margin-left: 4px; }

/* 금액/가치 강조 */
.nd-price-val {
  font-weight: 700;
  color: var(--nm-red);
}

/* 평점 메타 */
.nd-meta-rating { color: #f59e0b; }

/* 장소 주소 서브텍스트 */
.nd-addr-sub { font-size: var(--nm-fs-sm); color: #64748b; display: block; margin-top: 2px; }

/* 신청 인원 진행바 (본문 내) */
.nd-inner-bar {
  margin-top: 6px;
  height: 6px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
}
.nd-inner-fill {
  height: 100%;
  background: var(--nm-red);
  border-radius: 4px;
  transition: width .4s;
}

/* 리뷰 헤더 카운트 */
.nd-review-cnt {
  font-size: var(--nm-fs-sm);
  font-weight: 400;
  color: #64748b;
  margin-left: 4px;
}

/* 목록 모드 페이지네이션 */
.nd-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}
.nd-page-link {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: var(--nm-fs-sm);
  font-weight: 600;
  text-decoration: none;
  background: #f1f5f9;
  color: #1e293b;
  transition: background .15s, color .15s;
}
.nd-page-link:hover { background: #fde8e6; color: var(--nm-red); }
.nd-page-link.active { background: var(--nm-red); color: #fff; }

/* 목록 모드 카테고리 탭 */
.nd-cat-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* 목록 모드 결과 수 */
.nd-list-count {
  font-size: var(--nm-fs-sm);
  color: #64748b;
  margin-left: auto;
}

/* 목록 모드 헤더 */
.nd-list-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.nd-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
  margin-top: 24px;
}
@media (max-width: 860px) {
  .nd-layout { grid-template-columns: 1fr; }
  .nd-sidebar { order: -1; }
}

/* ── 헤더 영역 ──────────────────────────────────────── */
.nd-header {
  background: #fff;
  border-radius: var(--nm-radius);
  border: 1px solid var(--nm-border);
  padding: 28px 28px 24px;
  margin-bottom: 20px;
}
.nd-header-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.nd-title {
  font-size: var(--nm-fs-2xl);
  font-weight: 800;
  color: var(--nm-text);
  line-height: 1.4;
  margin: 0 0 16px;
}
.nd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: var(--nm-fs-sm);
  color: var(--nm-gray);
  padding-top: 14px;
  border-top: 1px solid var(--nm-border);
}
.nd-meta-item { display: flex; align-items: center; gap: 6px; }
.nd-meta-item i { color: var(--nm-red); font-size: var(--nm-fs-sm); }

/* ── 본문 ────────────────────────────────────────────── */
.nd-body {
  background: #fff;
  border-radius: var(--nm-radius);
  border: 1px solid var(--nm-border);
  padding: 28px;
  margin-bottom: 20px;
  font-size: var(--nm-fs-base);
  line-height: 1.8;
  color: var(--nm-text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── 정보 박스 ──────────────────────────────────────── */
.nd-info-box {
  background: #fff;
  border-radius: var(--nm-radius);
  border: 1px solid var(--nm-border);
  padding: 24px 28px;
  margin-bottom: 20px;
}
.nd-info-box h3 {
  font-size: var(--nm-fs-lg);
  font-weight: 700;
  color: var(--nm-text);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nd-info-box h3 i { color: var(--nm-red); }
.nd-info-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: var(--nm-fs-base);
}
.nd-info-row:last-child { border-bottom: none; padding-bottom: 0; }
.nd-info-label {
  min-width: 90px;
  font-weight: 600;
  color: var(--nm-sub);
  flex-shrink: 0;
}
.nd-info-value { color: var(--nm-text); flex: 1; }

/* ── 태그 ────────────────────────────────────────────── */
.nd-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.nd-tag {
  background: #f1f5f9;
  color: var(--nm-sub);
  font-size: var(--nm-fs-sm);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
}

/* ── 사이드바 카드 ──────────────────────────────────── */
.nd-sidebar {}
.nd-card {
  background: #fff;
  border-radius: var(--nm-radius);
  border: 1px solid var(--nm-border);
  padding: 22px;
  margin-bottom: 16px;
}
.nd-card-title {
  font-size: var(--nm-fs-lg);
  font-weight: 700;
  color: var(--nm-text);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nd-card-title i { color: var(--nm-red); }

/* ── 작성자 카드 ────────────────────────────────────── */
.nd-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.nd-author-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--nm-red), #c0392b);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: var(--nm-fs-icon); font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.nd-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nd-author-name { font-size: var(--nm-fs-md); font-weight: 700; color: var(--nm-text); }
.nd-author-sub  { font-size: var(--nm-fs-sm); color: var(--nm-gray); margin-top: 3px; }

/* ── 신청 버튼 영역 ─────────────────────────────────── */
.nd-apply-box {
  background: linear-gradient(135deg, #e84b3a 0%, #c0392b 100%);
  border-radius: var(--nm-radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 16px;
  color: #fff;
}
.nd-apply-box .nd-apply-title { font-size: var(--nm-fs-md); font-weight: 700; margin-bottom: 6px; }
.nd-apply-box .nd-apply-desc  { font-size: var(--nm-fs-sm); opacity: .88; margin-bottom: 16px; }
.nd-apply-btn {
  display: block;
  width: 100%;
  padding: 13px;
  background: #fff;
  color: var(--nm-red);
  font-size: var(--nm-fs-md);
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  text-align: center;
  box-sizing: border-box;
}
.nd-apply-btn:hover { background: #fde8e6; }
.nd-apply-btn:disabled, .nd-apply-btn.disabled {
  background: rgba(255,255,255,.4);
  color: rgba(255,255,255,.7);
  cursor: not-allowed;
}
/* 신청 취소 버튼 변형 */
.nd-apply-cancel {
  background: rgba(255,255,255,.25);
  color: #fff;
}
.nd-apply-cancel:hover { background: rgba(255,255,255,.4); }

/* 카카오 공유 버튼 */
.nd-share-kakao { color: #3b1e08; border-color: #fee500; }
.nd-share-kakao:hover { background: #fff9c4; border-color: #f5c200; color: #3b1e08; }

/* 모달 신청 버튼 아이콘 색상 */
.nd-modal-title i { color: var(--nm-red); }

/* ── 신청 폼 ────────────────────────────────────────── */
.nd-form-group { margin-bottom: 14px; }
.nd-form-label { font-size: var(--nm-fs-base); font-weight: 600; color: var(--nm-sub); margin-bottom: 6px; display: block; }
.nd-form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--nm-border);
  border-radius: 8px;
  font-size: var(--nm-fs-base);
  color: var(--nm-text);
  box-sizing: border-box;
  transition: border .2s;
}
.nd-form-input:focus { outline: none; border-color: var(--nm-red); }
textarea.nd-form-input { resize: vertical; min-height: 90px; }

/* ── 리뷰 섹션 ──────────────────────────────────────── */
.nd-review-list { margin-top: 8px; }
.nd-review-item {
  padding: 16px 0;
  border-bottom: 1px solid #f1f5f9;
}
.nd-review-item:last-child { border-bottom: none; }
.nd-review-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.nd-review-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--nm-red);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--nm-fs-sm); font-weight: 700; flex-shrink: 0;
  overflow: hidden;
}
.nd-review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nd-review-name { font-size: var(--nm-fs-base); font-weight: 700; color: var(--nm-text); }
.nd-review-date { font-size: var(--nm-fs-sm); color: var(--nm-gray); margin-left: auto; }
.nd-review-stars { color: #f59e0b; font-size: var(--nm-fs-sm); margin-bottom: 6px; }
.nd-review-body { font-size: var(--nm-fs-base); color: var(--nm-sub); line-height: 1.6; }

/* ── 빈 리뷰 ────────────────────────────────────────── */
.nd-empty-review {
  text-align: center;
  padding: 28px 0;
  color: var(--nm-gray);
  font-size: var(--nm-fs-base);
}
.nd-empty-review i { font-size: var(--nm-fs-icon-lg); margin-bottom: 10px; display: block; opacity: .4; }

/* ── 신청 모달 ──────────────────────────────────────── */
.nd-modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.nd-modal-overlay.open { display: flex; }
.nd-modal {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: ndModalIn .2s ease;
}
@keyframes ndModalIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
.nd-modal-title {
  font-size: var(--nm-fs-xl);
  font-weight: 800;
  color: var(--nm-text);
  margin: 0 0 6px;
}
.nd-modal-desc { font-size: var(--nm-fs-base); color: var(--nm-gray); margin-bottom: 20px; }
.nd-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  font-size: var(--nm-fs-xl); color: var(--nm-gray);
  cursor: pointer; line-height: 1;
}
.nd-modal-inner { position: relative; }

/* ── 공유 버튼 ──────────────────────────────────────── */
.nd-share-bar {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.nd-share-btn {
  flex: 1;
  min-width: 80px;
  padding: 8px 0;
  border: 1px solid var(--nm-border);
  border-radius: 8px;
  background: #fff;
  font-size: var(--nm-fs-sm);
  color: var(--nm-sub);
  cursor: pointer;
  text-align: center;
  transition: all .15s;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nd-share-btn:hover { background: #f8fafc; border-color: var(--nm-red); color: var(--nm-red); }

/* ── 배지 여백 유틸리티 ─────────────────────────────── */
.nm-badge-ml { margin-left: 6px; }

/* ── 목록 돌아가기 ──────────────────────────────────── */
.nd-back-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--nm-border);
}
/* 뒤로가기 바 내 수정 버튼 */
.nd-back-edit { margin-left: auto; }
.nd-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--nm-fs-sm);
  color: var(--nm-gray);
  text-decoration: none;
  transition: color .15s;
}
.nd-back-link:hover { color: var(--nm-red); }

/* =====================================================
 * 상세페이지 추가 스타일 (detail.php)
 * ===================================================== */

/* ── 브레드크럼 네비게이션 ────────────────────────── */
.nd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: var(--nm-fs-sm);
  color: var(--nm-sub);
}
.nd-breadcrumb a {
  color: var(--nm-sub);
  text-decoration: none;
  transition: color .2s;
}
.nd-breadcrumb a:hover {
  color: var(--nm-red);
}
.nd-breadcrumb i {
  font-size: var(--nm-fs-xs);   /* 12px — 구분자 아이콘 */
  color: var(--nm-border);
}

/* ── 뱃지 그룹 ─────────────────────────────────────── */
.nd-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.nd-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--nm-red);
  color: #fff;
  border-radius: 20px;
  font-size: var(--nm-fs-sm);
  font-weight: 600;
}
.nd-badge-cat {
  background: var(--nm-purple);
}
.nd-badge-closed {
  background: var(--nm-gray);
}

/* ── 제목 ──────────────────────────────────────────── */
.nd-title {
  font-size: var(--nm-fs-2xl);
  font-weight: 800;
  color: var(--nm-text);
  margin-bottom: 20px;
  line-height: 1.4;
}

/* ── 메타 정보 행 ──────────────────────────────────── */
.nd-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--nm-border);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ── 작성자 정보 ───────────────────────────────────── */
.nd-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nd-author-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.nd-author-img-default {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nm-bg);
  color: var(--nm-sub);
  font-size: var(--nm-fs-md);
}
.nd-author-name {
  font-size: var(--nm-fs-md);
  font-weight: 600;
  color: var(--nm-text);
}

/* ── 메타 정보 (날짜, 조회수 등) ──────────────────── */
.nd-meta-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: var(--nm-fs-sm);
  color: var(--nm-sub);
  flex-wrap: wrap;
}
.nd-meta-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nd-meta-info i {
  color: var(--nm-gray);
}

/* ── 위치 정보 ─────────────────────────────────────── */
.nd-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--nm-bg);
  border-radius: 8px;
  font-size: var(--nm-fs-sm);
  color: var(--nm-text);
  margin-bottom: 16px;
}
.nd-location i {
  color: var(--nm-red);
}

/* ── 본문 ──────────────────────────────────────────── */
.nd-body {
  padding: 24px 0;
  font-size: var(--nm-fs-base);
  color: var(--nm-text);
  line-height: 1.8;
  min-height: 200px;
}
.nd-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--nm-radius);
  margin: 16px 0;
}
.nd-body p {
  margin-bottom: 16px;
}
.nd-body ul, .nd-body ol {
  margin: 16px 0;
  padding-left: 24px;
}
.nd-body li {
  margin-bottom: 8px;
}

/* ── 푸터 버튼 영역 ────────────────────────────────── */
.nd-footer {
  display: flex;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--nm-border);
  flex-wrap: wrap;
}
.nd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--nm-radius);
  font-size: var(--nm-fs-md);
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
}
.nd-btn-list {
  background: #fff;
  color: var(--nm-text);
  border: 1px solid var(--nm-border);
}
.nd-btn-list:hover {
  background: var(--nm-bg);
}
.nd-btn-primary {
  background: var(--nm-red);
  color: #fff;
  border: 1px solid var(--nm-red);
}
.nd-btn-primary:hover {
  background: #c0392b;
  border-color: #c0392b;
}
.nd-btn-write {
  background: var(--nm-blue);
  color: #fff;
  border: 1px solid var(--nm-blue);
}
.nd-btn-write:hover {
  background: #2471a3;
  border-color: #2471a3;
}

/* ── 이전/다음 글 ──────────────────────────────────── */
.nd-prevnext {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 24px;
  border-top: 1px solid var(--nm-border);
  border-bottom: 1px solid var(--nm-border);
}
.nd-pn-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  text-decoration: none;
  transition: background .2s;
  border-bottom: 1px solid var(--nm-border);
}
.nd-pn-item:last-child {
  border-bottom: none;
}
.nd-pn-item:hover {
  background: var(--nm-bg);
}
.nd-pn-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--nm-fs-sm);
  color: var(--nm-sub);
  min-width: 80px;
}
.nd-pn-title {
  font-size: var(--nm-fs-md);
  color: var(--nm-text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 사이드바 관련 글 ──────────────────────────────── */
.nm-side-box {
  background: #fff;
  border-radius: var(--nm-radius);
  padding: 20px;
  box-shadow: var(--nm-shadow);
  margin-bottom: 20px;
}
.nm-side-box-hd {
  font-size: var(--nm-fs-lg);
  font-weight: 700;
  color: var(--nm-text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nm-side-box-hd i {
  color: var(--nm-red);
}
.nm-side-rel-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nm-side-rel-list li {
  border-bottom: 1px solid var(--nm-border);
}
.nm-side-rel-list li:last-child {
  border-bottom: none;
}
.nm-side-rel-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  text-decoration: none;
  transition: all .2s;
}
.nm-side-rel-list a:hover {
  padding-left: 8px;
}
.nm-side-rel-list a:hover .nm-side-rel-title {
  color: var(--nm-red);
}
.nm-side-rel-title {
  font-size: var(--nm-fs-sm);
  color: var(--nm-text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nm-side-rel-date {
  font-size: var(--nm-fs-xs);
  color: var(--nm-sub);
  min-width: 40px;
  text-align: right;
}

/* ── 사이드바 안내 정보 ────────────────────────────── */
.nm-side-info {
  font-size: var(--nm-fs-sm);
  color: var(--nm-text);
  line-height: 1.7;
}
.nm-side-info p {
  margin-bottom: 12px;
  font-weight: 600;
}
.nm-side-info ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}
.nm-side-info li {
  margin-bottom: 8px;
  color: var(--nm-sub);
}

/* ── 서브 네비게이션 (목록페이지와 공유) ────────────── */
.nm-subnav {
  background: #fff;
  border-bottom: 1px solid var(--nm-border);
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.nm-subnav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 12px 16px;
}
.nm-snav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: var(--nm-fs-sm);
  font-weight: 600;
  color: var(--nm-sub);
  text-decoration: none;
  white-space: nowrap;
  transition: all .2s;
}
.nm-snav-item:hover {
  background: var(--nm-bg);
  color: var(--nm-text);
}
.nm-snav-item.active {
  background: var(--ac, var(--nm-red));
  color: #fff;
}
.nm-snav-write {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--nm-red);
  color: #fff;
  font-size: var(--nm-fs-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  margin-left: auto;
  transition: background .2s;
}
.nm-snav-write:hover {
  background: #c0392b;
}

/* ── 상세페이지 바디 레이아웃 ─────────────────────── */
.nm-body {
  display: flex;
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 48px;
  align-items: flex-start;
}
.nm-main {
  flex: 1;
  min-width: 0;
}
.nm-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
}

/* ── 사이드바 글쓰기 버튼 ──────────────────────────── */
.nm-write-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: var(--nm-red);
  color: #fff;
  border-radius: var(--nm-radius);
  text-decoration: none;
  font-size: var(--nm-fs-md);
  font-weight: 700;
  margin-bottom: 20px;
  transition: background .2s;
}
.nm-write-btn:hover {
  background: #c0392b;
}

/* ── 반응형 (모바일) ───────────────────────────────── */
@media (max-width: 768px) {
  .nm-body {
    flex-direction: column;
    padding: 0 12px 32px;
  }
  .nm-sidebar {
    width: 100%;
    position: static;
  }
  .nd-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .nd-footer {
    flex-direction: column;
  }
  .nd-btn {
    width: 100%;
    justify-content: center;
  }
  .nm-side-box {
    margin-bottom: 16px;
  }
}
