/* ===== Header (iOS glass bar) =====
 * position: fixed로 모바일 + 데스크톱 모두 안정적 상단 고정.
 * body에 padding-top으로 본문 여백 확보 (layout.css).
 * backdrop-filter는 ::before로 분리 — iOS Safari 일부 버전 호환성 확보.
 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--separator);
  isolation: isolate;
}
.site-header::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: var(--bg-elevated);
  backdrop-filter: var(--blur-strong);
  -webkit-backdrop-filter: var(--blur-strong);
  z-index: -1;
  pointer-events: none;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header::before { background: rgba(255, 255, 255, 0.96); }
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 12px;
}
.logo a {
  font-size: var(--t-headline-size);
  font-weight: 700;
  color: var(--label);
  letter-spacing: -0.02em;
}
.main-nav { position: relative; }
.nav-menu li a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-size: var(--t-subhead-size);
  font-weight: 500;
  color: var(--label);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), color var(--transition-fast);
}
@media (hover: hover) {
  .nav-menu li a:hover {
    background: var(--bg-tertiary);
    color: var(--ios-blue);
  }
}

/* ===== Quick link chip ===== */
.quick-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: var(--bg-secondary);
  color: var(--ios-blue);
  border: 1px solid var(--separator);
  border-radius: var(--radius-full);
  font-size: var(--t-subhead-size);
  font-weight: 500;
  min-height: 36px;
  transition: all var(--transition-fast);
}
@media (hover: hover) {
  .quick-link-btn:hover {
    background: var(--ios-blue);
    color: #fff;
    border-color: var(--ios-blue);
    box-shadow: var(--shadow-md);
  }
}
.quick-link-btn:active {
  transform: scale(0.96);
}

/* ===== Filter links ===== */
.filter-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  color: var(--label);
  border-radius: var(--radius-md);
  font-size: var(--t-footnote-size);
  font-weight: 500;
  min-height: 40px;
  transition: all var(--transition-fast);
}
@media (hover: hover) {
  .filter-links a:hover {
    background: var(--ios-blue);
    color: #fff;
  }
}
.filter-links a:active { transform: scale(0.97); }

/* ===== Wedding post card (iOS 26) ===== */
.wedding-post {
  position: relative;          /* share-btn(absolute)의 containing block 보장 */
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--separator);
  transition: transform var(--transition-default), box-shadow var(--transition-default);
  display: flex;
  flex-direction: column;
}
@media (hover: hover) {
  .wedding-post:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }
  .wedding-post:hover .post-image { transform: scale(1.04); }
}

.wedding-post__thumb {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;            /* 실측: 광고 이미지 100%가 정사각형 → 짤림 방지 */
  overflow: hidden;
  background: var(--bg-tertiary);
}
.post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-default);
}

/* 공유 버튼 — 이미지 우상단 overlay
 * 모바일(hover 불가): 상시 노출 (기본값)
 * PC(hover 가능): 카드 hover시에만 페이드인
 */
.share-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  backdrop-filter: var(--blur-strong);
  -webkit-backdrop-filter: var(--blur-strong);
  color: var(--label);
  border: 1px solid var(--separator);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10), 0 1px 2px rgba(0, 0, 0, 0.06);
  opacity: 1;                                  /* 모바일 기본: 상시 노출 */
  transition: opacity 0.2s ease, transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .share-btn { background: rgba(255, 255, 255, 0.96); }
}

/* PC (마우스 + hover 가능 환경)에서만 평소 숨김, 카드 hover시 노출.
 * pointer: fine 조건으로 모바일 터치 디바이스(pointer: coarse)를 명확히 제외.
 * (일부 삼성 인터넷/모바일 크롬이 hover: hover를 잘못 보고하는 케이스 대응)
 */
@media (hover: hover) and (pointer: fine) {
  .share-btn { opacity: 0; }
  .wedding-post:hover .share-btn,
  .share-btn:focus-visible { opacity: 1; }
  .share-btn:hover {
    background: var(--ios-blue);
    color: #fff;
    border-color: var(--ios-blue);
  }
}
.share-btn:active { transform: scale(0.92); }
.share-btn .icon { width: 16px; height: 16px; }

/* 토스트 알림 (링크 복사 시) */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 2000;
  padding: 12px 20px;
  background: var(--label);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: var(--t-callout-size);
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.20);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.card-content {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
/* 정보 영역이 가용 공간을 채워서 invitation-link는 항상 카드 바닥에 위치 */
.card-content__top {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.fair-title {
  font-size: var(--t-headline-size);
  font-weight: var(--t-headline-weight);
  color: var(--label);
  line-height: 1.35;
  margin-block: 4px 2px;
  letter-spacing: -0.02em;
}

.info-item {
  display: flex;
  align-items: flex-start;     /* 핀 아이콘이 텍스트 첫 줄과 정렬 */
  gap: 6px;
  color: var(--secondary-label);
  font-size: var(--t-footnote-size);
}
.info-item .icon {
  color: var(--ios-green);
  flex-shrink: 0;              /* 텍스트가 길어져도 아이콘 크기 유지 */
  margin-top: 2px;             /* 텍스트 첫 줄 baseline에 시각 정렬 */
}
.info-text {
  color: var(--secondary-label);
  font-size: var(--t-footnote-size);
  line-height: 1.4;
  min-width: 0;                /* 자식이 부모 너비 초과해 grid 깨지는 것 방지 */
  flex: 1;
}
.info-item .badge {
  flex-shrink: 0;              /* 배지도 줄어들지 않게 */
}

/* iOS capsule badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
}
.badge--open {
  background: var(--ios-green-soft);
  color: #0E7A2C;
}
.badge--closed {
  background: var(--quaternary-label);
  color: var(--secondary-label);
}

/* iOS blue capsule CTA */
.invitation-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  background: var(--ios-blue);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: var(--t-subhead-size);
  font-weight: 600;
  min-height: var(--touch-target);
  text-align: center;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
@media (hover: hover) {
  .invitation-link:hover {
    background: var(--ios-blue-pressed);
    box-shadow: var(--shadow-md);
  }
}
.invitation-link:active {
  transform: scale(0.97);
  background: var(--ios-blue-pressed);
}

/* Generic buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: var(--t-subhead-size);
  font-weight: 500;
  min-height: 36px;
  transition: all var(--transition-fast);
}
.btn--primary { background: var(--ios-blue); color: #fff; }
.btn--ghost {
  background: var(--bg-tertiary);
  color: var(--ios-blue);
  border: 1px solid var(--separator);
}
@media (hover: hover) {
  .btn--ghost:hover { background: var(--ios-blue); color: #fff; border-color: var(--ios-blue); }
}
.btn:active { transform: scale(0.97); }

/* ===== Calendar ===== */
.calendar-container {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: clamp(12px, 3vw, 28px);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--separator);
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--separator);
  gap: 8px;
  flex-wrap: wrap;
}
.calendar-header h2 {
  font-size: var(--t-title-size);
  font-weight: 600;
}
.calendar-nav {
  display: flex;
  gap: 6px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar-day-header {
  text-align: center;
  font-weight: 600;
  padding: 8px 2px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: var(--t-footnote-size);
  color: var(--secondary-label);
}
.calendar-day {
  aspect-ratio: 1 / 1;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 56px;
  font-size: var(--t-footnote-size);
  position: relative;
  overflow: hidden;
}
.calendar-day .date {
  font-weight: 500;
  font-size: var(--t-footnote-size);
}
.calendar-day.today {
  background: var(--ios-blue-soft);
  color: var(--ios-blue);
  font-weight: 600;
}
.calendar-day.today .date { font-weight: 700; }
.calendar-day.empty,
.calendar-day.other-month {
  background: transparent;
  color: var(--tertiary-label);
}
.calendar-day.has-event {
  background: var(--ios-green-soft);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.calendar-day.has-event:active { transform: scale(0.96); }

/* PC: 셀에 이벤트 제목 표시 */
.calendar-day .events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.calendar-day .event-title {
  font-size: 11px;
  line-height: 1.2;
  color: var(--ios-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-day .more-link {
  font-size: 10px;
  color: var(--secondary-label);
  text-decoration: underline;
  cursor: pointer;
  margin-top: auto;
}
.calendar-day .event-dots {
  display: none;
  gap: 3px;
  margin-top: auto;
  flex-wrap: wrap;
}
.calendar-day .event-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ios-green);
}

/* 모바일: 셀 안 텍스트 숨기고 점만 표시 */
@media (max-width: 767px) {
  .calendar-day { padding: 4px 3px; min-height: 44px; gap: 3px; }
  .calendar-day .date { font-size: 12px; text-align: center; }
  .calendar-day .events,
  .calendar-day .event-title,
  .calendar-day .more-link { display: none; }
  .calendar-day .event-dots { display: flex; justify-content: center; }
  .calendar-day-header { padding: 6px 2px; font-size: 11px; }
  .calendar-grid { gap: 3px; }
}

/* 달력 클릭 시 떠오르는 오버레이 (이벤트 자세히 보기) */
.calendar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: var(--bg-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.calendar-overlay.active {
  display: flex;
  opacity: 1;
}
.calendar-popup {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.20);
  position: relative;
}
.calendar-popup h3 {
  font-size: var(--t-title2-size);
  font-weight: 600;
  margin: 0 0 16px;
  padding-right: 32px;
}
.calendar-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: none;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--label);
  cursor: pointer;
}
.calendar-popup-close:active { transform: scale(0.95); }
.calendar-event-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.calendar-event-item {
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}
.calendar-event-item a {
  display: block;
  color: var(--label);
  text-decoration: none;
}
.calendar-event-item h4 {
  font-size: var(--t-callout-size);
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--label);
}
.calendar-event-item p {
  font-size: var(--t-footnote-size);
  color: var(--secondary-label);
  margin: 2px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.calendar-event-item .icon { color: var(--ios-green); flex-shrink: 0; }


/* ===== Board (info page list) ===== */
.board-container {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: clamp(12px, 2.4vw, 20px);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--separator);
}
.board-list {
  display: flex;
  flex-direction: column;
}
.board-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  border-bottom: 1px solid var(--separator);
  gap: 12px;
  transition: background var(--transition-fast);
  min-height: var(--touch-target);
}
.board-item:last-child { border-bottom: none; }
@media (hover: hover) {
  .board-item:hover { background: var(--bg-tertiary); }
}
.board-item a {
  flex: 1;
  color: var(--label);
  font-size: var(--t-callout-size);
  font-weight: 500;
}
.board-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: var(--t-footnote-size);
  color: var(--secondary-label);
}

/* ===== View counter =====
 * SVG가 base.css에서 display: block이라 텍스트와 줄바꿈됨 → inline-flex로 정렬
 */
.view-count-wrapper,
.view-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--secondary-label);
  font-size: var(--t-footnote-size);
}
.view-count-wrapper .icon,
.view-count .icon { width: 14px; height: 14px; }
.board-meta .view-count { margin-left: 8px; }

/* board-meta 안의 모든 span (날짜/조회수 등): 아이콘 + 텍스트 정렬 */
.board-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.board-meta .icon { width: 14px; height: 14px; }

.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.post-meta > * { display: inline-flex; align-items: center; gap: 4px; }

/* ===== Post page (info article) ===== */
.post-main {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 3vw, 36px);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--separator);
}
.post-title {
  font-size: var(--t-largeTitle-size);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}
.post-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--secondary-label);
  font-size: var(--t-footnote-size);
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--separator);
}
.post-content {
  font-size: var(--t-body-size);
  line-height: 1.75;
  color: var(--label);
}
.post-content p { margin-bottom: 14px; }
.post-content h2, .post-content h3, .post-content h4 {
  margin-block: 24px 12px;
}
.post-content img { border-radius: var(--radius-md); margin-block: 16px; }
.back-to-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  color: var(--ios-blue);
  border-radius: var(--radius-full);
  font-size: var(--t-subhead-size);
  font-weight: 500;
}
@media (hover: hover) {
  .back-to-list:hover { background: var(--ios-blue); color: #fff; }
}

/* ===== Post page layout (article + sticky sidebar) ===== */
.post-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 968px) {
  .post-container { grid-template-columns: 1fr; }
}

.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 88px;
  height: fit-content;
}
@media (max-width: 968px) {
  .post-sidebar { position: static; top: auto; }
}

.local-fairs {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--separator);
}
.local-fairs-title {
  font-size: var(--t-headline-size);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--label);
}
.local-fairs-title .icon { width: 18px; height: 18px; color: var(--ios-blue); }
.local-fairs-list { display: flex; flex-direction: column; gap: 10px; }
.local-fairs-loading {
  color: var(--secondary-label);
  font-size: var(--t-footnote-size);
  margin: 0;
}

.fair-banner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--separator);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  text-decoration: none;
  color: var(--label);
  transition: border-color var(--transition-default), box-shadow var(--transition-default), transform var(--transition-default);
}
@media (hover: hover) and (pointer: fine) {
  .fair-banner:hover {
    border-color: var(--ios-blue);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.12);
    transform: translateY(-1px);
  }
}
.fair-banner-title {
  font-size: var(--t-callout-size, 15px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--label);
}
.fair-banner-info {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--t-footnote-size);
  color: var(--secondary-label);
}
.fair-banner-info .icon { width: 13px; height: 13px; }
.fair-banner-btn {
  display: inline-block;
  align-self: flex-start;
  margin-top: 6px;
  padding: 7px 14px;
  background: var(--ios-blue);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: var(--t-footnote-size);
  font-weight: 600;
}

/* ===== Location consent modal ===== */
.location-consent-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.location-consent-overlay.show { display: flex; }
.location-consent-overlay[hidden] { display: none !important; }

.location-consent-modal {
  background: var(--bg-secondary, #fff);
  border-radius: var(--radius-xl, 20px);
  padding: 32px 28px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: lcSlideIn 0.28s ease-out;
  border: 1px solid var(--separator);
}
@keyframes lcSlideIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.location-consent-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--ios-blue) 0%, #0d47a1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin: 0 auto 16px;
}
.location-consent-icon .icon { width: 28px; height: 28px; color: #fff; }

.location-consent-title {
  font-size: var(--t-title2-size, 22px);
  font-weight: 700;
  text-align: center;
  margin: 0 0 10px;
  color: var(--label);
  letter-spacing: -0.02em;
}
.location-consent-description {
  font-size: var(--t-subhead-size);
  text-align: center;
  color: var(--secondary-label);
  line-height: 1.55;
  margin: 0 0 18px;
}

.location-consent-benefits {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.location-consent-benefit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.location-consent-benefit-dot {
  flex: 0 0 20px;
  width: 20px; height: 20px;
  border-radius: var(--radius-full);
  background: var(--ios-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}
.location-consent-benefit-text {
  font-size: var(--t-subhead-size);
  color: var(--label);
  line-height: 1.5;
}
.location-consent-benefit-text strong { font-weight: 600; }

.location-consent-buttons {
  display: flex;
  gap: 10px;
}
.location-consent-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--t-body-size);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-default), transform var(--transition-default);
  font-family: inherit;
}
.location-consent-allow { background: var(--ios-blue); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .location-consent-allow:hover { background: #0064d2; transform: translateY(-1px); }
}
.location-consent-deny { background: var(--bg-tertiary); color: var(--secondary-label); }
@media (hover: hover) and (pointer: fine) {
  .location-consent-deny:hover { background: var(--separator); color: var(--label); }
}
.location-consent-privacy {
  text-align: center;
  font-size: var(--t-caption2-size, 11px);
  color: var(--tertiary-label, #9ca3af);
  margin: 12px 0 0;
}
@media (max-width: 480px) {
  .location-consent-modal { padding: 26px 20px; }
  .location-consent-buttons { flex-direction: column-reverse; }
}

/* Backdrop for mobile menu */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-default);
  z-index: 998;
}
.menu-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ===== SEO Block (페이지 하단 정보 섹션) ===== */
.seo-block {
  margin-top: clamp(40px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 64px);
}

.seo-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.seo-section > h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--ios-blue);
  margin-bottom: var(--space-2);
}

.seo-lede {
  color: var(--secondary-label);
  font-size: var(--t-body-size);
  line-height: 1.7;
}

/* ===== Tip Grid (방문 꿀팁 카드) ===== */
.tip-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.tip-card {
  padding: var(--space-5);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--separator);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: box-shadow var(--transition-default), transform var(--transition-default);
}
@media (hover: hover) {
  .tip-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }
}
.tip-card h3 {
  font-size: var(--t-headline-size);
  font-weight: 600;
  color: var(--ios-blue);
  margin: 0;
}
.tip-card p {
  font-size: var(--t-footnote-size);
  color: var(--secondary-label);
  line-height: 1.6;
  margin: 0;
}

/* ===== Venue List (박람회장 리스트) ===== */
.venue-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.venue-item {
  padding: var(--space-5);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--separator);
  border-left: 4px solid var(--ios-green);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.venue-item h3 {
  font-size: var(--t-headline-size);
  font-weight: 600;
  margin: 0;
}
.venue-location {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--t-footnote-size);
  color: var(--ios-green);
  font-weight: 500;
  margin: 0;
}
.venue-location .icon {
  width: 14px;
  height: 14px;
}
.venue-desc {
  font-size: var(--t-callout-size);
  color: var(--label);
  line-height: 1.6;
  margin: 0;
}

/* ===== Districts (인기 지역 칩 그룹) ===== */
.districts-block {
  margin-top: var(--space-4);
  padding: var(--space-5);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
}
.districts-block h3 {
  font-size: var(--t-callout-size);
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--label);
}
.nearby-block {
  margin-top: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--ios-blue-soft);
  border-radius: var(--radius-lg);
}
.nearby-block h3 {
  font-size: var(--t-callout-size);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--ios-blue-pressed);
}
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--bg-secondary);
  color: var(--label);
  border-radius: var(--radius-full);
  font-size: var(--t-footnote-size);
  font-weight: 500;
  border: 1px solid var(--separator);
}
.chip--soft {
  background: var(--bg-secondary);
  color: var(--ios-blue);
  border-color: var(--ios-blue-soft);
}

/* ===== Checklist (체크리스트 단계 카드) ===== */
.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.check-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--separator);
  align-items: start;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--ios-blue);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--t-callout-size);
  flex-shrink: 0;
}
.step-body h3 {
  font-size: var(--t-headline-size);
  font-weight: 600;
  margin: 0 0 4px 0;
}
.step-body p {
  font-size: var(--t-footnote-size);
  color: var(--secondary-label);
  line-height: 1.6;
  margin: 0;
}

/* ===== FAQ List (아코디언) ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.faq-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--separator);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}
.faq-item[open] {
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  font-weight: 600;
  color: var(--label);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 {
  font-size: var(--t-callout-size);
  font-weight: 600;
  margin: 0;
  flex: 1;
}
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--secondary-label);
  font-weight: 300;
  line-height: 1;
  transition: transform var(--transition-default);
}
.faq-item[open] summary::after {
  content: "−";
  color: var(--ios-blue);
}
@media (hover: hover) {
  .faq-item summary:hover { background: var(--bg-tertiary); }
}
.faq-answer {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--secondary-label);
  font-size: var(--t-callout-size);
  line-height: 1.75;
}

/* ===== Timeline (결혼 준비 타임라인) ===== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
}
.timeline-step {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--separator);
  border-left: 4px solid var(--accent, var(--ios-blue));
  align-items: start;
}
.timeline-step .period {
  font-weight: 700;
  color: var(--accent, var(--ios-blue));
  font-size: var(--t-headline-size);
  letter-spacing: -0.02em;
}
.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.task-list li {
  position: relative;
  padding-left: 16px;
  font-size: var(--t-callout-size);
  color: var(--label);
  line-height: 1.6;
}
.task-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, var(--ios-blue));
}

@media (max-width: 480px) {
  .timeline-step { grid-template-columns: 1fr; gap: var(--space-2); }
  .check-step    { grid-template-columns: 36px 1fr; gap: var(--space-3); padding: var(--space-4); }
}

/* ===== Mobile Category Bar v2 — Floating Pills (모바일 전용) =====
 * 디자인:
 *   - 떠있는 캡슐(pill) 3개가 가운데 정렬
 *   - 배경은 투명, 본문이 pill 아래로 비치며 스크롤됨
 *   - 활성 상태(현재 페이지에 해당) = iOS blue 음영 + 흰 텍스트
 *   - 경기/지방 sub 페이지에서는 메인 텍스트가 sub 이름으로 교체 (JS)
 */

/* PC(>=768px)에서는 완전 숨김 */
.mobile-category-bar { display: none; }

/* 카테고리 바를 노출하지 않는 페이지들 — 모바일에서도 숨김 */
html[data-page="services"] .mobile-category-bar,
html[data-page="calendar"] .mobile-category-bar,
html[data-page="info"] .mobile-category-bar,
html[data-page="post"] .mobile-category-bar {
  display: none !important;
}

@media (max-width: 767px) {
  /* 모바일에서 PC용 페이지 헤더 / 퀵 링크 / 세부지역 필터 모두 숨김 */
  /* (모바일은 최상단 floating bar로만 카테고리 제어) */
  .page-header,
  .quick-links,
  .region-filters { display: none; }

  /* 카테고리 바 — site-header 바로 아래에 fixed (sticky보다 모바일 호환성 우월) */
  .mobile-category-bar {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 998;
    background: transparent;         /* ★ 투명: 헤더 프레임에서 분리, 본문 비침 */
    padding: 10px 0 6px;
    pointer-events: none;            /* 컨테이너는 클릭 안 받음 */
  }

  /* pill 그룹 — 가운데 정렬 */
  .cat-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-inline: var(--container-px);
    pointer-events: none;
  }

  /* 떠있는 pill */
  .cat-btn {
    pointer-events: auto;
    flex: 0 0 auto;
    min-width: 70px;
    min-height: 36px;
    padding: 7px 18px;
    border-radius: 9999px;                              /* ★ 완전 캡슐 */
    background: var(--bg-elevated);                     /* 반투명 */
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    color: var(--label);
    border: 1px solid var(--separator);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  }
  /* 폴백: backdrop-filter 미지원 시 불투명 흰색 */
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .cat-btn { background: rgba(255, 255, 255, 0.96); }
  }
  .cat-btn:active { transform: scale(0.95); }

  /* 펼침 상태 (펼친 토글 표시 - 살짝 진한 회색) */
  .cat-btn[aria-expanded="true"]:not(.is-active) {
    background: rgba(0, 0, 0, 0.06);
    color: var(--label);
    border-color: rgba(0, 0, 0, 0.10);
  }

  /* ★ 활성 상태 (현재 페이지에 해당) — iOS blue 음영. .is-active가 항상 우선 */
  .cat-btn.is-active {
    background: var(--ios-blue);
    color: #fff;
    border-color: var(--ios-blue);
    box-shadow: 0 4px 14px rgba(0, 122, 255, 0.30), 0 2px 4px rgba(0, 122, 255, 0.18);
  }

  /* caret(▾) — chevron-right 90도 회전 */
  .cat-btn .caret {
    width: 11px;
    height: 11px;
    opacity: 0.7;
    transform: rotate(90deg);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .cat-btn[aria-expanded="true"] .caret {
    transform: rotate(-90deg);
    opacity: 1;
  }

  /* 서브탭 컨테이너 — 완전 투명. 4열 그리드만 형성, 배경/그림자 없음 */
  .cat-subtabs {
    position: absolute;
    top: calc(100% + 4px);
    left: var(--container-px);
    right: var(--container-px);
    z-index: 997;
    display: grid;
    grid-template-columns: repeat(4, 1fr);   /* ★ 4열 */
    gap: 8px;
    padding: 0;                              /* ★ 패딩 0 */
    background: transparent;                 /* ★ 투명: 흰 패널 없음 */
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;                    /* 컨테이너는 클릭 안 받음 */
    animation: catSubtabsIn 0.22s ease-out;
  }
  .cat-subtabs[hidden] { display: none; }

  /* ★ 각 sub 버튼 = 독립된 floating pill (불투명 흰색으로 가독성 보장) */
  .subtab-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 6px;
    min-height: 38px;
    background: #FFFFFF;                     /* ★ 불투명 흰색 (배경 안 비침) */
    color: var(--label);
    border: 1px solid var(--separator);
    border-radius: 9999px;                   /* ★ 캡슐 모양 */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
  }
  .subtab-item:active {
    transform: scale(0.95);
    background: var(--ios-blue-soft);
    color: var(--ios-blue-pressed);
  }
  /* 현재 페이지에 해당하는 sub — iOS blue 음영 */
  .subtab-item.is-active {
    background: var(--ios-blue);
    color: #fff;
    border-color: var(--ios-blue);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.30);
    font-weight: 600;
  }

  @keyframes catSubtabsIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* 모바일에서 motion 줄이기 옵션 적용 */
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .cat-subtabs { animation: none; }
  .cat-btn .caret { transition: none; }
  .cat-btn { transition: none; }
}

/* ===== Post Search (info 페이지 검색창) ===== */
.post-search {
  position: relative;
  margin: 24px 0 8px;
  width: 100%;        /* 게시글 목록 폭과 일치 (max-width 제거) */
}

/* hidden 속성이 .board-list { display: flex } 보다 specificity 낮아 무시되는 것 방지 */
.board-list[hidden],
.search-results[hidden] { display: none !important; }
.post-search__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--secondary-label);
  pointer-events: none;
}
.post-search__input {
  width: 100%;
  padding: 12px 44px 12px 44px;
  background: var(--bg-secondary);
  color: var(--label);
  border: 1px solid var(--separator);
  border-radius: 9999px;
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.post-search__input::placeholder {
  color: var(--tertiary-label);
}
.post-search__input:focus {
  border-color: var(--ios-blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}
/* 일부 브라우저의 기본 search 클리어 버튼 숨김 */
.post-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.post-search__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  color: var(--secondary-label);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.post-search__clear:active { transform: translateY(-50%) scale(0.9); }
.post-search__clear .icon { width: 14px; height: 14px; }

.search-stats {
  margin: 6px 4px 16px;
  color: var(--secondary-label);
  font-size: var(--t-footnote-size);
}

.search-results.is-empty::before {
  content: "검색 결과가 없습니다.";
  display: block;
  text-align: center;
  padding: 40px 20px;
  color: var(--secondary-label);
  font-size: var(--t-body-size);
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 32px 0 8px;
}
.page-btn {
  min-width: 40px;
  min-height: 40px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--label);
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  font-size: var(--t-callout-size);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .page-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--separator-opaque);
  }
}
.page-btn:active { transform: scale(0.95); }
.page-btn.is-active {
  background: var(--ios-blue);
  color: #fff;
  border-color: var(--ios-blue);
  cursor: default;
}
.page-btn.is-disabled {
  color: var(--tertiary-label);
  background: var(--bg-tertiary);
  cursor: not-allowed;
  pointer-events: none;
}
