/* =========================================================
   style.css — 순수 CSS, 외부 라이브러리 없음
   - CSS 변수로 색상 관리 (라이트/다크 모드 대응)
   - 모바일 우선 반응형
   ========================================================= */

/* ---------- 색상 / 토큰 (다크 모드 고정) ---------- */
:root {
  --bg: #11151c;
  --surface: #1a2029;
  --surface-2: #232b36;
  --text: #e8edf4;
  --text-muted: #9aa6b8;
  --border: #2c3542;

  /* Morfonica 계열 포인트 컬러 (블루/틸) */
  --accent: #4fc0e3;
  --accent-strong: #7ad3ef;
  --accent-soft: #16313b;

  --warn-bg: #3a2e16;
  --warn-text: #ffd98a;
  --warn-border: #6b5414;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, .55);
  --maxw: 980px;
  --header-h: 60px;
}

/* ---------- 리셋 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans KR", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ---------- 레이아웃 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 18px;
  padding-right: 18px;
}

main { padding: 44px 0 72px; }

section { margin-bottom: 48px; }

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: .02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: .92rem;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* ---------- 헤더 / 네비게이션 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: var(--text);
  white-space: nowrap;
}
.nav-brand:hover { text-decoration: none; color: var(--accent-strong); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .92rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--surface-2); text-decoration: none; }

.nav-links a.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

/* 햄버거 버튼 (모바일 전용) */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 38px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 420px; }
  .nav-links a { padding: 14px 18px; border-top: 1px solid var(--border); }
}

/* ---------- 홈 ---------- */
.home-hero {
  text-align: center;
  padding: 56px 0 52px;
  background: radial-gradient(ellipse 120% 80% at 50% -10%, var(--accent-soft), transparent 65%);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.home-hero-eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 4px 16px;
  margin-bottom: 20px;
}
.home-hero-title {
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin-bottom: 16px;
}
.home-hero-accent { color: var(--accent); }
.home-hero-meta {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 28px;
}
.home-hero-btns { justify-content: center; }

.home-about {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.home-about-item { display: flex; flex-direction: column; gap: 6px; padding: 16px 0; }
.home-about-item:first-child { padding-top: 4px; }
.home-about-item:last-child  { padding-bottom: 4px; }
.home-about-divider { height: 1px; background: var(--border); }
.home-about-label {
  display: inline-block;
  font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 4px; padding: 2px 8px; align-self: flex-start;
}
.home-about p { color: var(--text-muted); font-size: .93rem; line-height: 1.7; margin: 0; }
.home-about strong { color: var(--text); }

.home-poster-section { text-align: center; }
.home-poster {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
}

/* ---------- 히어로 ---------- */
.hero {
  text-align: center;
  padding: 56px 18px 40px;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--accent-soft), transparent 60%);
}
.hero h1 {
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.25;
}
.hero .hero-meta {
  margin-top: 14px;
  font-size: 1.05rem;
  color: var(--text-muted);
}
.hero .hero-meta strong { color: var(--text); }
.hero .hero-summary { margin-top: 12px; color: var(--text-muted); }

/* ---------- 배지 ---------- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  background: var(--warn-bg);
  color: var(--warn-text);
  border: 1px solid var(--warn-border);
}
.badge.info {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: transparent;
}
.badge.tbd {
  background: var(--surface-2);
  color: var(--text-muted);
  border-color: var(--border);
}

/* ---------- 카드 그리드 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.card p { color: var(--text-muted); font-size: .92rem; }

/* 이동용 카드형 버튼 (홈) */
a.nav-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text);
}
a.nav-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
a.nav-card .nav-card-title { font-weight: 700; font-size: 1.05rem; }
a.nav-card .nav-card-desc { color: var(--text-muted); font-size: .88rem; }
a.nav-card .nav-card-arrow { color: var(--accent); font-weight: 700; }

/* 미발표 플레이스홀더 카드 */
.card.placeholder {
  border-style: dashed;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  min-height: 110px;
  box-shadow: none;
}

/* ---------- 출연진 카드 (사진 + 곡 목록) ---------- */
.member-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.member-card {
  display: flex;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s ease;
  align-items: flex-start;
}
.member-card:hover { box-shadow: var(--shadow-hover); }

.member-photo-wrap {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-photo-wrap.member-photo-fallback {
  color: var(--text-muted);
  font-size: 2rem;
  font-weight: 700;
}
.member-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.member-info { flex: 1; min-width: 0; }

.member-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.3;
}
.member-name-ja {
  display: block;
  font-size: .83rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.member-desc {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.55;
  margin-bottom: 12px;
}
.songs-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent-strong);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

@media (max-width: 560px) {
  .member-card { flex-direction: column; gap: 16px; }
  .member-photo-wrap { width: 100%; height: auto; aspect-ratio: 1 / 1; }
}

/* ---------- 곡 목록 ---------- */
.song-list { list-style: none; margin-top: 10px; }
.song-list li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 0;
  border-top: 1px solid var(--border);
  font-size: .92rem;
}
.song-list li:first-child { border-top: none; }
.song-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.song-note {
  font-size: .74rem;
  font-weight: 400;
  color: var(--text-muted, #999);
  opacity: .75;
  line-height: 1.3;
}
.yt-link {
  flex: none;
  font-size: .82rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.yt-link:hover { text-decoration: none; background: var(--accent); color: #fff; }

/* ---------- 테이블 ---------- */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}
th { background: var(--surface-2); font-weight: 700; }
tr:last-child td { border-bottom: none; }

/* ---------- 정보 리스트 (오시는 길 등) ---------- */
.info-list { list-style: none; }
.info-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.info-list li:first-child { border-top: none; }
.info-list .label {
  flex: none;
  width: 92px;
  font-weight: 700;
  color: var(--accent-strong);
}

/* ---------- 지도 임베드 ---------- */
.map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* ---------- 외부 링크 버튼 ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: .92rem;
  border: 1px solid var(--accent);
}
.btn:hover { text-decoration: none; background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.ghost { background: transparent; color: var(--accent-strong); }
.btn.ghost:hover { background: var(--accent-soft); }

/* ---------- 모르포니카 곡 테이블 ---------- */
.morf-table { border-spacing: 0 6px; border-collapse: separate; background: transparent; border: none; }
.morf-table thead th { background: transparent; color: var(--text-muted); font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; padding: 4px 14px 10px; border-bottom: 1px solid var(--border); }
.morf-table tbody tr td { background: var(--surface); border: none; padding: 10px 14px; }
.morf-table tbody tr td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.morf-table tbody tr td:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.morf-table tbody tr:hover td { background: var(--surface-2); }

.morf-song-wrap { display: flex; align-items: center; gap: 12px; min-width: 180px; }
.morf-thumb { width: 46px; height: 46px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.morf-text { display: flex; flex-direction: column; gap: 2px; }
.morf-title-ja { font-size: .95rem; font-weight: 700; line-height: 1.3; }
.morf-title-ko { font-size: .78rem; color: var(--text-muted); }

.morf-date { display: block; font-family: monospace; font-size: .82rem; color: var(--text-muted); margin-top: 3px; }
.morf-artist { display: block; font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.morf-badge { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.badge-original { background: var(--accent-soft); color: var(--accent-strong); }
.badge-tieup { background: #1e3a1e; color: #7ccc7c; }

.morf-links { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-yt   { background: var(--accent); color: #fff; font-size: .78rem; padding: 5px 11px; border-radius: 6px; font-weight: 700; }
.btn-yt:hover { background: var(--accent-strong); text-decoration: none; }
.btn-namu { background: var(--surface-2); color: var(--text-muted); font-size: .78rem; padding: 5px 11px; border-radius: 6px; font-weight: 600; border: 1px solid var(--border); }
.btn-namu:hover { background: var(--border); color: var(--text); text-decoration: none; }

.morf-clickable { cursor: pointer; border-radius: var(--radius-sm); transition: background .15s; }
.morf-clickable:hover { background: var(--accent-soft); }
.morf-lyrics-hint {
  font-size: .7rem; color: var(--accent); font-weight: 600;
  margin-top: 3px; letter-spacing: .03em;
}

/* ---------- 가사 모달 ---------- */
.lyrics-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.lyrics-overlay.open { display: flex; }

.lyrics-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 90%;
  max-width: 520px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}

.lyrics-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.lyrics-title    { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.lyrics-title-ko { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }
.lyrics-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.3rem; line-height: 1;
  padding: 2px 4px; flex-shrink: 0; margin-left: 12px;
}
.lyrics-close:hover { color: var(--text); }

.lyrics-body {
  overflow-y: auto;
  padding: 18px 22px 24px;
  line-height: 1.7;
}
.lyrics-block { margin-bottom: 16px; }
.lyrics-block:last-child { margin-bottom: 0; }
.ly-ja  { font-size: .92rem; color: var(--text); }
.ly-rom { font-size: .82rem; color: var(--text-muted); }
.ly-ko  { font-size: .88rem; color: var(--accent-strong); font-weight: 500; }
.lyrics-none { color: var(--text-muted); text-align: center; padding: 20px 0; }

/* ---------- 상태 메시지 ---------- */
.loading, .error {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: .92rem;
}
.error { color: #c0392b; }

/* ---------- 제단/나눔존 ---------- */
.fan-section-heading {
  font-size: 1rem; font-weight: 700;
  color: var(--text-muted); letter-spacing: .04em;
  margin-bottom: 12px;
}
.fan-placeholder {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.fan-placeholder-label {
  font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 12px;
}
.fan-placeholder p { margin: 0; font-size: .9rem; }

/* ---------- 푸터 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.site-credit {
  font-size: .78rem;
  color: var(--border);
  letter-spacing: .04em;
}

/* ---------- 플로팅 버튼 ---------- */
.float-btns {
  position: fixed;
  bottom: 24px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}
.float-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  color: var(--text);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.float-btn:hover {
  text-decoration: none;
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.float-btn-icon { font-size: 1rem; line-height: 1; }

@media (max-width: 480px) {
  .float-btns { bottom: 16px; right: 12px; gap: 6px; }
  .float-btn  { padding: 8px 11px; font-size: .78rem; }
  .float-btn-label { display: none; }
  .float-btn-icon  { font-size: 1.2rem; }
}

/* ---------- 티켓팅 체크리스트 ---------- */
.checklist-mascot {
  position: absolute;
  top: -10px;
  right: 0;
  width: 96px;
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4));
  z-index: 1;
}
@media (max-width: 600px) {
  .checklist-mascot { width: 64px; top: -4px; opacity: .9; }
}
.checklist li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s, background .15s;
}
.checklist li:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.checklist label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 4px 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.checklist input[type="checkbox"] {
  grid-row: 1 / span 2;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.checklist .ck-title {
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.4;
}
.checklist input:checked ~ .ck-title {
  text-decoration: line-through;
  color: var(--text-muted);
}
.checklist .ck-help {
  grid-column: 2;
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.checklist .ck-help a { color: var(--accent-strong); }

/* ---------- 하단 미니 플레이어 (유튜브 임베드) ---------- */
.mini-player {
  display: none;
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 340px;
  max-width: calc(100vw - 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  z-index: 1500;
  animation: miniPlayerUp .25s ease;
}
.mini-player.open { display: block; }
@keyframes miniPlayerUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.mini-player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.mini-player-title {
  flex: 1;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-player-close {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.mini-player-close:hover { color: var(--text); }
.mini-player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.mini-player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 600px) {
  .mini-player { left: 10px; bottom: 10px; width: calc(100vw - 20px); }
}

/* ---------- 접근성 ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
