/*
 * snackspace V54 · 생카정보 (생일카페 정보)
 * renewal.css 색 변수(--bg, --surface, --accent …)를 그대로 써서 라이트/다크 자동 전환
 */

.bc-page .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bc-page { padding: 32px 0 48px; }
.bc-wrap { display: flex; flex-direction: column; gap: 18px; }

/* 머리 */
.bc-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 16px 4px 4px; }
.bc-head-copy { display: flex; flex-direction: column; gap: 14px; }
.bc-head h1 { margin: 0; font-size: clamp(34px, 4.6vw, 52px); line-height: 1.1; letter-spacing: -0.04em; font-weight: 700; }
.bc-head-copy p:last-child { margin: 0; color: var(--muted); font-size: 16px; }
.bc-report-open { border: 0; cursor: pointer; font-family: inherit; }
.bc-report-open svg { width: 18px; height: 18px; }

/* 도구 줄 */
.bc-toolbar { position: sticky; top: calc(var(--header-h) + 6px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--glass-line); border-radius: 20px; background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
.bc-segment { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--chip); }
.bc-segment button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.bc-segment button.is-active { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }
.bc-search { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 14px; background: var(--chip); color: var(--muted); }
.bc-search svg { width: 18px; height: 18px; flex: none; }
.bc-search input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; outline: none; }

.bc-members { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.bc-members::-webkit-scrollbar { display: none; }
.bc-members button { flex: none; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.bc-members button.is-active { border-color: transparent; background: var(--text); color: var(--bg); font-weight: 700; }

.bc-state { margin: 0; padding: 48px 16px; border: 1px dashed var(--line); border-radius: var(--radius-lg); color: var(--muted); font-size: 15px; text-align: center; }
.bc-state.is-error { color: var(--danger); }

/* 카드 */
.bc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.bc-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: inherit; text-decoration: none; transition: transform 200ms ease, box-shadow 200ms ease; }
.bc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.bc-card.is-ended { opacity: 0.72; }
.bc-card.is-ended .bc-card-media img { filter: grayscale(0.6); }
.bc-card-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ph); }
.bc-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bc-card-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent-text); background: linear-gradient(160deg, var(--chip), var(--ph)); }
.bc-card-ph svg { width: 44px; height: 44px; opacity: 0.8; }
.bc-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.bc-card-media .bc-badge { position: absolute; top: 12px; left: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); }
.bc-badge.is-ongoing { background: var(--accent); color: #fff; }
.bc-badge.is-upcoming { background: var(--surface); color: var(--accent-text); }
.bc-badge.is-ended { background: var(--chip); color: var(--muted); }
.bc-count { position: absolute; right: 12px; bottom: 12px; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.5); color: #fff; font-size: 12px; font-weight: 500; }
.bc-card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.bc-member { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--chip); color: var(--accent-text); font-size: 12px; font-weight: 700; }
.bc-card-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 16px; font-weight: 700; line-height: 1.4; letter-spacing: -0.02em; }
.bc-card-meta { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }
.bc-card-meta span { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-card-meta svg { width: 14px; height: 14px; flex: none; }
.bc-card-meta span:last-child { align-items: flex-start; white-space: normal; }
.bc-card-meta span:last-child svg { margin-top: 2px; }

/* 시트 (상세 · 제보) */
.bc-sheet { width: min(640px, calc(100% - 32px)); max-width: none; max-height: min(88vh, 900px); margin: auto; padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28); }
.bc-sheet::backdrop { background: rgba(10, 12, 18, 0.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.bc-sheet[open] { display: flex; animation: bc-pop 220ms ease; }
.bc-sheet-inner { display: flex; flex-direction: column; width: 100%; max-height: inherit; min-height: 0; }
.bc-sheet-bar { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 60px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--line); }
.bc-sheet-title { margin-right: auto; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.bc-sheet-handle { display: none; }
.bc-icon-button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--chip); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.bc-close { width: 40px; padding: 0; font-size: 22px; line-height: 1; }
.bc-detail-body, .bc-form { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.bc-detail-body { display: flex; flex-direction: column; gap: 20px; padding: 0 0 24px; }
@keyframes bc-pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }

/* 상세 */
.bc-gallery { position: relative; background: #000; }
.bc-gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.bc-gallery-track::-webkit-scrollbar { display: none; }
.bc-gallery-item { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; aspect-ratio: 4 / 5; max-height: 62vh; }
.bc-gallery-item img { width: 100%; height: 100%; object-fit: contain; }
.bc-gallery-nav { position: absolute; top: 50%; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--glass); color: var(--text); font-size: 24px; line-height: 1; transform: translateY(-50%); cursor: pointer; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.bc-gallery-nav.is-prev { left: 12px; }
.bc-gallery-nav.is-next { right: 12px; }
.bc-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.bc-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.5); cursor: pointer; transition: width 160ms ease; }
.bc-dots button.is-active { width: 20px; background: #fff; }
.bc-detail-head { display: flex; flex-direction: column; gap: 10px; padding: 4px 24px 0; }
.bc-gallery + .bc-detail-head { padding-top: 0; }
.bc-detail-body > .bc-detail-head:first-child { padding-top: 20px; }
.bc-detail-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bc-detail-tags .bc-badge.is-upcoming { background: var(--chip); }
.bc-detail-head h2 { margin: 0; font-size: 24px; line-height: 1.3; letter-spacing: -0.03em; font-weight: 700; }
.bc-info { display: flex; flex-direction: column; gap: 4px; margin: 0 16px; padding: 8px; border-radius: 20px; background: var(--bg); }
.bc-info-row { display: flex; gap: 12px; padding: 10px; }
.bc-info-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 12px; background: var(--surface); color: var(--accent-text); }
.bc-info-icon svg { width: 18px; height: 18px; }
.bc-info-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 15px; line-height: 1.5; }
.bc-info-text > small { color: var(--muted); font-size: 12px; }
.bc-place { display: flex; flex-direction: column; gap: 2px; }
.bc-place > span { color: var(--muted); word-break: keep-all; }
.bc-map-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bc-chip-link { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.bc-chip-link:hover { background: var(--chip); }
.bc-inline-link { color: var(--accent-text); font-weight: 700; text-decoration: none; word-break: break-all; }
.bc-section { display: flex; flex-direction: column; gap: 10px; padding: 0 24px; }
.bc-section h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.bc-section h3 svg { width: 18px; height: 18px; color: var(--accent-text); }
.bc-text { display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 15px; line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere; }
.bc-text p { margin: 0; }
.bc-detail-foot { margin: 0 24px; padding: 12px 14px; border-radius: 14px; background: var(--bg); color: var(--muted); font-size: 13px; line-height: 1.6; }

/* 제보 폼 */
.bc-form { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 24px; }
.bc-form .field { margin: 0; }
.bc-form .field label b { color: var(--danger); font-weight: 700; }
.bc-form-note { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--bg); color: var(--muted); font-size: 14px; line-height: 1.6; }
.bc-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bc-form-grid > .field { min-width: 0; }
.bc-form input, .bc-form select { box-sizing: border-box; max-width: 100%; }
.bc-form input[type="date"] { min-height: 48px; }
.bc-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.bc-thumbs:empty { display: none; }
.bc-thumb { position: relative; width: 76px; height: 76px; overflow: hidden; border-radius: 14px; background: var(--ph); }
.bc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bc-thumb-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.bc-captcha { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bc-captcha-image { display: grid; place-items: center; width: 200px; height: 70px; overflow: hidden; border-radius: 12px; background: #f5f5f1; color: #4e5968; font-size: 13px; }
.bc-captcha-image img { width: 200px; height: 70px; display: block; }
.bc-agree { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; font-size: 14px; line-height: 1.55; cursor: pointer; }
.bc-agree input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.bc-submit { width: 100%; margin: 4px 0 0; }

/* 모바일 */
@media (max-width: 1100px) {
  .bc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .bc-page { padding-top: 20px; }
  .bc-head { align-items: stretch; flex-direction: column; }
  .bc-report-open { justify-content: center; }
  .bc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .bc-card { border-radius: 20px; }
  .bc-card-body { padding: 12px 12px 14px; }
  .bc-card-title { font-size: 15px; }
  .bc-segment { flex: 1 1 100%; }
  .bc-segment button { flex: 1; padding: 0 6px; }

  /* 아래에서 올라오는 시트 */
  .bc-sheet { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 28px 28px 0 0; }
  .bc-sheet[open] { animation: bc-up 260ms cubic-bezier(0.2, 0.8, 0.2, 1); }
  .bc-sheet-handle { display: block; position: absolute; top: 6px; left: 50%; width: 40px; height: 5px; border-radius: 999px; background: var(--line); transform: translateX(-50%); }
  .bc-detail-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .bc-form { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .bc-form-grid { grid-template-columns: 1fr; }
  .bc-gallery-nav { display: none; }
  @keyframes bc-up { from { transform: translateY(100%); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .bc-sheet[open] { animation: none; }
  .bc-card { transition: none; }
}

/* ---------- 관리자 > 생카정보 관리 ---------- */
.bca-tab-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.bca-switch { display: inline-flex; gap: 4px; margin-bottom: 16px; padding: 4px; border-radius: 14px; background: var(--chip); }
.bca-switch button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.bca-switch button.is-active { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }
.bca-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.bca-form-grid > .field { min-width: 0; }
.bca-form-grid input, .bca-form-grid select { width: 100%; min-width: 0; box-sizing: border-box; }
/* .admin-grid 의 display:grid 가 hidden 을 덮지 않게 */
#birthday-cafe-panel [hidden] { display: none !important; }
#bca-edit-banner .small-button { flex: none; white-space: nowrap; }
.bca-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin-top: 10px; }
.bca-images:empty { display: none; }
.bca-image { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.bca-image img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--ph); }
.bca-image-cover { position: absolute; top: 6px; left: 6px; padding: 3px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.bca-image-actions { display: flex; justify-content: space-between; gap: 2px; padding: 4px; }
.bca-image-actions button { flex: 1; min-height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.bca-image-actions button:hover:not(:disabled) { background: var(--chip); }
.bca-image-actions button:disabled { opacity: 0.3; cursor: default; }
.bca-image-actions .is-danger { color: var(--danger); }
.bca-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.bca-row { display: flex; gap: 12px; align-items: flex-start; }
.bca-row-thumb { width: 64px; height: 80px; flex: none; overflow: hidden; border-radius: 12px; background: var(--ph); }
.bca-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bca-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bca-row-body strong { font-size: 15px; }
.bca-row-body small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.bca-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 11px; font-weight: 700; }
.bca-pill.is-pending { background: var(--accent); color: #fff; }
.bca-pill.is-accepted { color: var(--ok); }
.bca-pill.is-rejected { color: var(--danger); }
.bca-pill.is-hidden { color: var(--danger); }
.bca-report-text { margin: 6px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); color: var(--text); font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.bca-report-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bca-report-photos a { width: 72px; height: 72px; overflow: hidden; border-radius: 10px; background: var(--ph); }
.bca-report-photos img { width: 100%; height: 100%; object-fit: cover; }
.bca-memo { display: flex; gap: 6px; margin-top: 6px; }
.bca-memo input { flex: 1; min-width: 0; min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.bca-row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
@media (max-width: 700px) {
  .bca-form-grid { grid-template-columns: 1fr; }
}
