/* ============ MOOMOO Chants — modern editorial theme ============ */
:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --ink: #17171c;
  --ink-soft: #75757e;
  --hairline: #e6e6e0;
  --brand: #0da678;          /* radish green — brand accent */
  --chant: #e63368;          /* fan chant lines — the one loud color */
  --all-color: #0da678;      /* everyone sings together */
  --moo-color: #c3c3cb;      /* quiet marker for sung lines */
  --fans-color: var(--chant);
  --radius: 14px;
  --display: 'Archivo', 'Noto Sans KR', 'Noto Sans JP', -apple-system, sans-serif;
  --body: 'Archivo', 'Noto Sans KR', 'Noto Sans JP', -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 720px; margin: 0 auto; padding: 0 1.25rem 3rem; }

h1, h2, h3 { font-family: var(--display); }

/* ---------- header ---------- */
.site-header { max-width: 720px; margin: 0 auto; padding: 2.6rem 1.25rem 0.5rem; }
.brand-row { display: flex; align-items: center; gap: 0.6rem; }
.brand-tag {
  font-size: 0.68rem; font-weight: 600; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.16em;
}
.site-header h1 {
  margin: 0.9rem 0 0;
  font-size: clamp(2.8rem, 11vw, 4.2rem);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.site-header h1 .accent { color: var(--brand); }
.tagline {
  color: var(--ink-soft); margin: 1rem 0 0;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
}

/* ---------- search ---------- */
.search-wrap { margin: 1.8rem 0 0.6rem; }
#search {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
#search::placeholder { color: var(--ink-soft); }
#search:focus { border-color: var(--ink); }

/* ---------- song list (tracklist rows) ---------- */
.song-grid { display: flex; flex-direction: column; }
.song-card {
  display: flex; align-items: center; gap: 0.9rem;
  width: 100%; text-align: left;
  padding: 1.05rem 0.25rem;
  background: none; border: none; border-bottom: 1px solid var(--hairline);
  text-decoration: none; color: inherit;
  font-family: inherit; font-size: 1rem; cursor: pointer;
  transition: background 0.15s, padding-left 0.15s;
}
.song-card:hover, .song-card:focus-visible {
  background: color-mix(in srgb, var(--accent, var(--brand)) 5%, transparent);
  padding-left: 0.7rem;
}
.song-card:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.sc-dot {
  flex: none; width: 10px; height: 10px; border-radius: 3px;
  background: var(--accent, var(--brand));
}
.sc-main { flex: 1; min-width: 0; }
.song-card h2 {
  margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.015em;
  display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap;
}
.song-card .kr-title { color: var(--ink-soft); font-size: 0.85rem; font-weight: 500; }
.song-card .meta { font-size: 0.75rem; color: var(--ink-soft); margin: 0.1rem 0 0; }
.badge {
  flex: none; font-size: 0.62rem; font-weight: 700;
  padding: 0.28rem 0.6rem; border-radius: 999px; border: 1px solid;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.badge.ready { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.badge.soon { color: var(--ink-soft); border-color: var(--hairline); }

.no-results { text-align: center; color: var(--ink-soft); padding: 2.5rem 0; }

/* ---------- footer ---------- */
.site-footer {
  max-width: 720px; margin: 0 auto; padding: 2.5rem 1.25rem 3rem;
  color: var(--ink-soft); font-size: 0.78rem;
}

/* ---------- song page ---------- */
.top-nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 1.25rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.back-link {
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.9rem;
  background: none; border: none; padding: 0.3rem 0; cursor: pointer; font-family: inherit;
}
.back-link:hover { color: var(--brand); }
.concert-btn {
  font-family: inherit; font-weight: 700; font-size: 0.78rem;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink);
  padding: 0.4rem 0.85rem; border-radius: 999px; cursor: pointer;
  transition: border-color 0.15s;
}
.concert-btn:hover { border-color: var(--ink); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 0.4rem; }
.lang-select {
  font-family: inherit; font-weight: 700; font-size: 0.78rem;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink);
  padding: 0.38rem 0.5rem; border-radius: 999px; cursor: pointer;
}
.lang-select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.back-link:focus-visible, .concert-btn:focus-visible,
.lang-pill:focus-visible, .mp-toggle:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 2px;
}

.song-header { display: flex; flex-direction: column; padding: 1.8rem 0 1.2rem; }
.song-header .meta {
  order: -1; /* album · year becomes the eyebrow above the title */
  color: var(--ink-soft); font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em; margin: 0 0 0.4rem;
}
.song-header h1 {
  margin: 0;
  font-size: clamp(2.6rem, 12vw, 3.8rem);
  font-weight: 900; line-height: 1; letter-spacing: -0.03em;
  color: var(--accent, var(--ink));
}
.song-header .kr-title { color: var(--ink-soft); margin: 0.35rem 0 0; font-size: 1rem; }

/* ---------- controls ---------- */
.controls {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1rem 1.1rem; margin-bottom: 1.8rem;
}
.controls-label {
  margin: 0 0 0.6rem; font-weight: 700; font-size: 0.66rem; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.lang-toggles { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.lang-pill {
  font-family: inherit; font-size: 0.82rem; font-weight: 600;
  padding: 0.32rem 0.8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink-soft);
  transition: all 0.15s ease;
}
.lang-pill:hover { border-color: var(--ink-soft); }
.lang-pill.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.legend {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: 0.9rem;
  font-size: 0.72rem; color: var(--ink-soft);
}
.legend-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.dot-moo { background: var(--moo-color); }
.dot-fans { background: var(--chant); }
.dot-all { background: var(--all-color); }

/* ---------- chant body ---------- */
.chant-section { margin-bottom: 1.1rem; }
.chant-section h3 {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 0.68rem; font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin: 0 0 0.4rem;
}
.chant-section h3::after { content: ""; height: 1px; flex: 1; background: var(--hairline); }

.line {
  border-left: 2px solid var(--moo-color);
  padding: 0.06rem 0 0.06rem 0.95rem;
  margin-bottom: 0.12rem;
}
.line.fans {
  border-left: 3px solid var(--chant);
  background: color-mix(in srgb, var(--chant) 4%, transparent);
  border-radius: 0 10px 10px 0;
  padding-block: 0.28rem;
}
.line.all {
  border-left: 3px solid var(--all-color);
  background: color-mix(in srgb, var(--all-color) 4%, transparent);
  border-radius: 0 10px 10px 0;
  padding-block: 0.28rem;
}

.line .kr { font-size: 1.05rem; font-weight: 600; margin: 0; letter-spacing: -0.01em; line-height: 1.35; }
.line.fans > .kr { color: var(--chant); font-weight: 900; font-size: 1.15rem; }
.line.fans > .kr::before { content: "📣 "; }
.line.all > .kr { color: var(--all-color); font-weight: 800; }
.line .rom, .line .en, .line .zh, .line .zhs, .line .py, .line .zy, .line .kana, .line .ja {
  margin: 0.06rem 0 0; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.4;
}
.line .py { font-style: italic; }
/* shout-along words/lines are green: fans shout them WITH the members;
   pink stays reserved for parts fans chant alone. */
.shout { color: var(--all-color); font-weight: 900; }
/* a line containing a shout word gets a green rail too, so every line
   where fans participate is scannable down the left edge */
.line.has-shout { border-left: 3px solid var(--all-color); }
.layer-hidden { display: none; }

.member-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.35rem; }
.chip {
  font-size: 0.62rem; font-weight: 700;
  padding: 0.12rem 0.5rem; border-radius: 999px;
  border: 1px solid transparent;
  text-transform: uppercase; letter-spacing: 0.08em;
}

.same-time {
  margin-top: 0.5rem;
  border: 1.5px dashed var(--chant);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  background: color-mix(in srgb, var(--chant) 5%, transparent);
}
.same-time .st-label {
  display: block; font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--chant); margin-bottom: 0.2rem;
}
.same-time .kr { color: var(--chant); font-weight: 900; }

.line .note { margin: 0.3rem 0 0; font-size: 0.75rem; color: var(--ink-soft); font-style: italic; }

.placeholder-note {
  border: 1.5px dashed var(--hairline);
  border-radius: var(--radius); padding: 1rem 1.2rem;
  font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 1.6rem;
}
.coming-soon { text-align: center; padding: 3.5rem 1rem; color: var(--ink-soft); }
.coming-soon .big { font-size: 2.6rem; }

/* ---------- mini player ---------- */
body.has-miniplayer { padding-bottom: 100px; }
body.has-miniplayer.mp-open { padding-bottom: 280px; }

.miniplayer {
  position: fixed; left: auto; right: 12px; bottom: 12px; z-index: 50;
  width: min(380px, calc(100vw - 24px)); margin: 0;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(10, 10, 14, 0.12);
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom) / 2);
  display: flex; flex-direction: column; gap: 0.5rem;
}
.mp-toggle {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  width: 46px; height: 26px; border-radius: 999px;
  border: none; background: var(--ink); color: var(--bg);
  font-size: 0.7rem; cursor: pointer;
}
.mp-info { display: flex; align-items: center; gap: 0.7rem; }
.mp-emoji { font-size: 1.4rem; }
.mp-title { margin: 0; font-size: 0.95rem; font-weight: 800; letter-spacing: -0.01em; }
.mp-sub {
  margin: 0; font-size: 0.62rem; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600;
}
.mp-video { display: none; }
.mp-open .mp-video { display: block; }
.mp-video iframe, .mp-video .mp-placeholder {
  width: 100%; aspect-ratio: 16 / 9; border: none; border-radius: 10px;
}
.mp-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  color: var(--ink-soft); font-size: 0.82rem; padding: 1rem;
}

/* ---------- concert mode 🔦 ----------
   Applied to <html> (not body) so a head inline script can restore it
   pre-paint on every page — no white flash between pages in the dark. */
html.concert {
  --bg: #0b0b0e;
  --surface: #15151a;
  --ink: #f4f4f6;
  --ink-soft: #9a9aa6;
  --hairline: #26262e;
  --brand: #2fd39a;
  --chant: #ff5c8a;
  --all-color: #2fd39a;
  --moo-color: #3a3a44;
  background: #0b0b0e;
}
html.concert .line .kr { font-size: 1.3rem; }
html.concert .line.fans > .kr { font-size: 1.55rem; }
html.concert .same-time .kr { font-size: 1.35rem; }
html.concert .concert-btn { background: var(--ink); color: #0b0b0e; border-color: var(--ink); }
html.concert .miniplayer { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); }
