/* =========================================
   BOYNEXTDOOR 성호 2026 아카이브 - 맑은 하늘색 (모바일 최적화)
   ========================================= */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
  --bg: #f2f7fc;
  --surface: #ffffff;
  --surface-hover: #f7fbff;
  --surface-sub: #eaf2fa;
  --border: #d8e6f3;
  --text: #1e2d3d;
  --muted: #647b91;

  --sky: #5b9bd5;
  --sky-dark: #4382bc;
  --sky-soft: #e3f0fc;
  --rose: #d97398;
  --rose-soft: #fbeaf0;
  --mint: #4aa88c;
  --mint-soft: #e6f5f0;
  --lavender: #7c83d1;
  --lavender-soft: #eceefa;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  padding: 20px 14px 48px;
}

body.home-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 14px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

body.home-body .container {
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 공통 네비게이션 및 헤더 */
.home-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(91, 155, 213, 0.05);
  transition: all 0.18s ease;
}

.home-btn:hover {
  background: var(--sky-soft);
  border-color: var(--sky);
  color: var(--sky-dark);
}

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

body.home-body header {
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.badge {
  display: inline-block;
  background: var(--sky-soft);
  color: var(--sky-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

body.home-body h1 {
  font-size: 23px;
}

.subtitle {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 3px;
}

/* 공통 버튼 및 컨트롤 바 */
.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn:hover {
  background: var(--surface-hover);
  border-color: var(--sky);
  color: var(--sky-dark);
}

.btn-red {
  background: var(--sky);
  border-color: var(--sky);
  color: #fff;
}

.btn-api.connected,
.btn.copied {
  background: var(--mint-soft);
  border-color: rgba(74, 168, 140, 0.45);
  color: #2f7d66;
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 18px;
  background: var(--surface);
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 3px 10px rgba(91, 155, 213, 0.05);
}

.filter-group,
.chips {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* 파이어폭스 스크롤바 숨김 */
}

.filter-group::-webkit-scrollbar,
.chips::-webkit-scrollbar {
  display: none; /* 크롬/사파리 스크롤바 숨김 */
}

.filter-label,
.chips > span,
.chips > label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--sky-dark);
  background: var(--sky-soft);
  padding: 4px 9px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-right: 2px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  background: var(--surface-sub);
  color: var(--muted);
  border: 1px solid transparent;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.chip.active {
  background: var(--sky);
  border-color: var(--sky);
  color: #fff;
}

.search-box {
  display: flex;
  gap: 6px;
  width: 100%;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

/* 서브 필터 */
.sub-filters {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.sub-filters.open { display: flex; }

.sub-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-right: 3px;
}

.sub-chip {
  background: var(--surface-sub);
  color: var(--muted);
  border: 1px solid transparent;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.sub-chip.active {
  background: var(--sky-dark);
  color: #fff;
}


.search-input, .sort-select {
  background: var(--surface-sub);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  outline: none;
}

.search-input { flex: 1; min-width: 0; }
.sort-select { cursor: pointer; flex-shrink: 0; }

/* =========================================
   카드 그리드 (모바일 2열 컴팩트 / PC 4~5열)
   ========================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 11px;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 16px;
  }
}
/* =========================================
   직캠(fancam.html) 전용 클래스 및 가로 썸네일 보정
   ========================================= */
/* a.card 자체가 링크인 구조의 파란색·밑줄 완전 제거 */
a.card,
.card a {
  text-decoration: none !important;
  color: inherit !important;
}

/* 직캠 필터 줄 정렬 */
.filter-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.search-sort-row {
  display: flex;
  gap: 6px;
  width: 100%;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

/* 직캠 썸네일은 가로(16:9) 비율 유지 */
.card:has(.badge-show) .thumb-wrap,
.card:has(.meta-top) .thumb-wrap {
  aspect-ratio: 16 / 9;
}

/* 방송사 배지 (상단 왼쪽) */
.badge-show {
  position: absolute;
  top: 7px;
  left: 7px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  color: #fff;
  background: rgba(30, 45, 61, 0.82);
  backdrop-filter: blur(4px);
}

.badge-show[data-show="엠카운트다운"] { background: #e05286; }
.badge-show[data-show="뮤직뱅크"] { background: #4382bc; }
.badge-show[data-show="쇼! 음악중심"] { background: #7c83d1; }
.badge-show[data-show="인기가요"] { background: #3fa3b5; }

/* 직캠 종류 배지 (하단 오른쪽) */
/* .badge-type {
  position: absolute;
  bottom: 7px;
  right: 7px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border: 1px solid var(--border);
} */

/* 상단 활동곡 태그 & 날짜 줄 */
.meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.song-tag {
  color: var(--sky-dark);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 직캠 카드 그리드 (가로 썸네일이 너무 작아지지 않게 조정) */
.grid:has(.meta-top) {
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 12px;
}

@media (min-width: 768px) {
  .grid:has(.meta-top) {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
  }
}
.card a,
.short-link {
  text-decoration: none !important;
  color: inherit !important;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card, .photo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 3px 8px rgba(91, 155, 213, 0.05);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.card:active, .photo-card:active {
  transform: scale(0.98);
}

.photo-card {
  cursor: pointer;
  aspect-ratio: 3 / 4;
}

.short-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 15;
  background: var(--surface-sub);
  overflow: hidden;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface-sub);
  display: block;
}

.badge-duration, .date-badge {
  position: absolute;
  bottom: 7px;
  right: 7px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.cat-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  background: rgba(255, 255, 255, 0.94);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.cat-badge[data-cat="위버스"] { color: #2f8f72; background: #eef9f5; }
.cat-badge[data-cat="DM"] { color: #5b63b7; background: #f0f1fc; }
.cat-badge[data-cat="트위터"] { color: #3678b5; background: #eaf4fc; }
.cat-badge[data-cat="인스타"] { color: #b8577b; background: #fcf0f5; }

.card-body {
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}


.meta,
.card-body h3,
.card-body .tag,
.card-body .fancam-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--sky-dark);
  margin: 0;
}

.meta span:last-child {
  color: var(--muted);
  font-weight: 600;
}

.cat-label {
  color: var(--sky-dark);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-title,
.card-body p,
.card-body .fancam-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}

.video-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 14px;
  font-size: 13px;
  color: var(--muted);
}

/* 모달 및 라이트박스 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 45, 61, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal h2 { font-size: 16px; font-weight: 800; }
.modal-desc { font-size: 12.5px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; }
.status-text { font-size: 11px; font-weight: 600; color: var(--sky-dark); }
.status-text.error { color: #c95656; }
.status-text.success { color: #2f8f72; }
.field input, .field select {
  background: var(--surface-sub);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 13.5px;
  outline: none;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* 셀카 라이트박스 */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(235, 244, 252, 0.96);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  max-width: 94vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.lightbox-inner img {
  max-width: 92vw;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(30, 45, 61, 0.14);
}
.lightbox-info { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.lb-btn {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(30, 45, 61, 0.1);
}
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* =========================================
   홈 화면(index.html) 전용 스타일 - 모바일 컴팩트
   ========================================= */
.pick-trigger-wrap { margin-top: 4px; display: flex; gap: 8px; justify-content: center; }
.pick-main-btn {
  background: var(--sky);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(91, 155, 213, 0.25);
}

/* 홈 카테고리 메뉴: 모바일에서 슬림한 가로형 카드 */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 720px) {
  .menu-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .nav-card {
    flex-direction: row !important;
    align-items: center;
    padding: 14px 16px !important;
    gap: 12px !important;
  }
  .nav-card .card-top {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex: 1;
  }
  .nav-card .card-desc {
    display: none;
  }
  .nav-card .card-footer {
    border-top: none !important;
    padding-top: 0 !important;
  }
  .nav-card .enter-text {
    display: none;
  }
}

.nav-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 3px 10px rgba(91, 155, 213, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.card-top { display: flex; flex-direction: column; gap: 8px; }
.icon-box { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.fancam .icon-box { background: var(--sky-soft); }
.selfie .icon-box { background: var(--rose-soft); }
.shorts .icon-box { background: var(--lavender-soft); }

.card-tag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; }
.fancam .card-tag { color: var(--sky-dark); }
.selfie .card-tag { color: #b8577b; }
.shorts .card-tag { color: #5b63b7; }

.card-title { font-size: 16px; font-weight: 800; }
.card-desc { font-size: 12.5px; color: var(--muted); }
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
}
.fancam .enter-text { color: var(--sky-dark); }
.selfie .enter-text { color: #b8577b; }
.shorts .enter-text { color: #5b63b7; }

/* 고르기 결과 영역: 모바일에서도 3열(셀카·릴스·직캠) 한눈에 보기 유지 */
.showcase-section {
  display: none;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(91, 155, 213, 0.07);
}
.showcase-section.active { display: flex; }
.showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.showcase-header h2 { font-size: 15px; font-weight: 800; }
.showcase-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-btn {
  background: var(--surface-sub);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.mini-btn.save-img { background: var(--mint-soft); border-color: rgba(74, 168, 140, 0.4); color: #2f7d66; }

.capture-area {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.capture-title-bar { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.capture-title-bar h3 { font-size: 14px; font-weight: 800; color: var(--sky-dark); }
.capture-sub { font-size: 11px; color: var(--muted); font-weight: 600; }

/* 셀카 · 릴스 · 직캠 3열 유지 (좁은 폰에서도 3개 나란히 한눈에) */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  align-items: stretch;
}

@media (min-width: 720px) {
  .showcase-grid {
    gap: 14px;
  }
}

.picked-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.picked-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.picked-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
}
.card-mini-btns { display: flex; gap: 3px; }
.repick-btn {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 9.5px;
  cursor: pointer;
}
.picked-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; }
.picked-media { width: 100%; aspect-ratio: 3 / 4; background: var(--surface-sub); overflow: hidden; }
.picked-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.picked-body { padding: 7px 8px; display: flex; flex-direction: column; gap: 2px; }
.picked-meta { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picked-title { font-size: 11px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.reason-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.reason-box-label { font-size: 9.5px; font-weight: 700; color: var(--sky-dark); margin-bottom: 3px; display: block; }
.capturing .hide-on-capture { display: none !important; }

/* 선택 팝업 및 메모 오버레이 */
.picker-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 45, 61, 0.45);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px;
  z-index: 100;
}
.picker-backdrop.open { display: flex; }
.picker-modal {
  width: 100%;
  max-width: 1060px;
  height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.picker-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-sub);
  border-bottom: 1px solid var(--border);
}
.step-pills { display: flex; gap: 5px; align-items: center; }
.step-pill {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
}
.step-pill.active { background: var(--sky); border-color: var(--sky); color: #fff; }
.step-pill.done { background: var(--mint-soft); border-color: rgba(74, 168, 140, 0.45); color: #2f7d66; }
.picker-guide { font-size: 12px; font-weight: 700; color: var(--sky-dark); }
.picker-frame { flex: 1; width: 100%; border: none; background: var(--bg); }

.memo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(242, 247, 252, 0.94);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 20;
}
.memo-overlay.open { display: flex; }
.memo-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.memo-preview { display: flex; gap: 10px; align-items: center; background: var(--surface-sub); padding: 10px; border-radius: 10px; border: 1px solid var(--border); }
.memo-preview img { width: 46px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.memo-preview-info { display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.memo-preview-badge { font-size: 11px; font-weight: 700; color: var(--sky-dark); }
.memo-preview-title { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.memo-textarea-wrap { display: flex; flex-direction: column; gap: 5px; }
.memo-label-row { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.memo-textarea {
  width: 100%;
  height: 120px;
  resize: none;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  outline: none;
}
.memo-textarea:focus { border-color: var(--sky); background: #fff; }
.memo-actions { display: flex; justify-content: flex-end; gap: 6px; }
.btn-skip {
  background: var(--surface-sub);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.btn-save-memo {
  background: var(--sky);
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

footer { text-align: center; font-size: 11.5px; color: var(--muted); }

/* =========================================
   위버스 라이브(live.html) & 4개 카테고리 홈 그리드 확장
   ========================================= */
.live .icon-box { background: var(--mint-soft); }
.live .card-tag,
.live .enter-text { color: #2f7d66; }
.nav-card.live:hover { border-color: var(--mint); }

/* 라이브 카드 가로(16:9) 썸네일 및 배지 */
.card.live-card .thumb-wrap {
  aspect-ratio: 16 / 9;
}

.badge-live {
  position: absolute;
  top: 7px;
  left: 7px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  color: #fff;
  background: var(--mint);
}

.badge-live[data-cat="유닛"] {
  background: var(--lavender);
}

/* 홈 카테고리 바로가기 메뉴: PC 4열 / 모바일 1열 슬림 바 */
.menu-grid {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 820px) {
  .menu-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* 고르기 결과 4종 세트: PC 4열 나란히 / 모바일 2x2 깔끔한 2열 */
.showcase-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 820px) {
  .showcase-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}
.badge-live[data-cat="단체"] {
  background: var(--sky);
}