:root {
  color-scheme: light;
  --accent: #ec4899;
  --ink: #5b1237;
  --ink-soft: #8f3a67;
  --line: #ffd9e9;
  --card: #fffafc;
  --blush: #fff0f7;
  --petal: #ffe1ee;
  --title-font: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --bg: #ffe4f0;
  --bg-glow: #fff3f9;
  --bg-a: #ffc6df;
  --bg-b: #ffd3e6;
  --bg-end: #ffeef6;
  --title: #d4186f;
  --title-deep: #6d0f43;
  --strong: #c2185b;
  --focus: #e11d74;
  --head-a: #ff8ec2;
  --head-b: #f968ad;
  --ring: #ffc1dc;
  --empty-a: #ffb3d4;
  --empty-b: #ff7fb8;
  --mark: #f472b6;
  --shadow: 219 39 119;
  --head-shadow: 160 20 90;
  --flag-line: 91 18 55;
}

/* 보이그룹: 하늘하늘 */
:root[data-side="boy"] {
  --accent: #0ea5e9;
  --ink: #0c3a5e;
  --ink-soft: #33698f;
  --line: #cfeafb;
  --card: #fbfeff;
  --blush: #eef9ff;
  --petal: #dcf3ff;
  --bg: #e0f4ff;
  --bg-glow: #f3fbff;
  --bg-a: #bfe9ff;
  --bg-b: #cdeeff;
  --bg-end: #eef9ff;
  --title: #0284c7;
  --title-deep: #0c4a6e;
  --strong: #0369a1;
  --focus: #0284c7;
  --head-a: #7dd3fc;
  --head-b: #38bdf8;
  --ring: #bae6fd;
  --empty-a: #bae6fd;
  --empty-b: #60c8f8;
  --mark: #38bdf8;
  --shadow: 2 132 199;
  --head-shadow: 7 89 133;
  --flag-line: 12 58 94;
}

/* 밴드: 보랏빛 */
:root[data-side="band"] {
  --accent: #7c3aed;
  --ink: #2e1065;
  --ink-soft: #5b3f8f;
  --line: #e2d9f7;
  --card: #fdfbff;
  --blush: #f5f0ff;
  --petal: #ece3ff;
  --bg: #ece4ff;
  --bg-glow: #f8f4ff;
  --bg-a: #d9c9ff;
  --bg-b: #e4d8ff;
  --bg-end: #f4eeff;
  --title: #6d28d9;
  --title-deep: #3b0f8a;
  --strong: #5b21b6;
  --focus: #6d28d9;
  --head-a: #b794f6;
  --head-b: #8b5cf6;
  --ring: #d6c4fb;
  --empty-a: #d6c4fb;
  --empty-b: #a78bfa;
  --mark: #8b5cf6;
  --shadow: 109 40 217;
  --head-shadow: 76 29 149;
  --flag-line: 46 16 101;
}

/* 솔로: 노란빛 */
:root[data-side="solo"] {
  --accent: #d97706;
  --ink: #4a2c05;
  --ink-soft: #7c5414;
  --line: #f6e3b4;
  --card: #fffdf7;
  --blush: #fff7e0;
  --petal: #ffefc2;
  --bg: #fff0c9;
  --bg-glow: #fffaf0;
  --bg-a: #ffe39e;
  --bg-b: #ffeab3;
  --bg-end: #fff7e3;
  --title: #b45309;
  --title-deep: #713f12;
  --strong: #92400e;
  --focus: #b45309;
  --head-a: #fbbf4d;
  --head-b: #e8930c;
  --ring: #fcd98a;
  --empty-a: #fcd98a;
  --empty-b: #f5b13c;
  --mark: #e8930c;
  --shadow: 180 83 9;
  --head-shadow: 120 53 15;
  --flag-line: 74 44 5;
}

/* 혼성: 초록빛 */
:root[data-side="mixed"] {
  --accent: #16a34a;
  --ink: #14401f;
  --ink-soft: #3d6b49;
  --line: #d2eedb;
  --card: #fbfefb;
  --blush: #effaf1;
  --petal: #dcf5e3;
  --bg: #dcf5e3;
  --bg-glow: #f3fcf5;
  --bg-a: #bdeccb;
  --bg-b: #cdf1d7;
  --bg-end: #eefaf1;
  --title: #15803d;
  --title-deep: #14532d;
  --strong: #166534;
  --focus: #15803d;
  --head-a: #6fd38e;
  --head-b: #34b35f;
  --ring: #b6e8c5;
  --empty-a: #b6e8c5;
  --empty-b: #5fc982;
  --mark: #34b35f;
  --shadow: 21 128 61;
  --head-shadow: 20 83 45;
  --flag-line: 20 64 31;
}

* { box-sizing: border-box; }

html {
  overflow-y: scroll;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, var(--bg-glow) 0, transparent 34%),
    radial-gradient(circle at 88% 2%, var(--bg-a) 0, transparent 38%),
    radial-gradient(circle at 80% 72%, var(--bg-b) 0, transparent 40%),
    linear-gradient(180deg, var(--bg), var(--bg-end));
  background-attachment: fixed;
}

a { color: inherit; }

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- 머리말 ---- */
.hero {
  position: relative;
  padding: 44px 8px 26px;
  text-align: center;
}

.hero[hidden] { display: none; }

.hero h1 {
  margin: 0;
  font-family: var(--title-font);
  font-size: clamp(2.1rem, 7vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--title);
  outline: none;
}

.side-menu {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  max-width: 640px;
  margin: 16px auto 0;
  padding: 5px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 6px 18px rgb(var(--shadow) / 0.14);
}

.side-menu a {
  padding: 9px 4px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s ease;
}

.side-menu a:hover { background: var(--blush); }

.side-menu a[aria-current="page"] {
  background: linear-gradient(135deg, var(--head-a), var(--head-b));
  color: #fff;
}

.side-menu a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

:root[data-side="boy"] .hero-group h1 { color: var(--title); }

.hero-sub {
  margin: 10px 0 0;
  font-weight: 500;
  color: var(--ink-soft);
}

.back {
  display: inline-block;
  margin-bottom: 14px;
  padding: 7px 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--strong);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgb(var(--shadow) / 0.18);
  transition: transform 0.15s ease, background 0.15s ease;
}

.back:hover { background: var(--blush); transform: translateX(-2px); }

/* ---- 단체 사진 ---- */
.flow {
  --face-w: min(44vw, 420px);
  --face-h: calc(var(--face-w) / 2);
  --slot: calc(var(--face-w) * 0.34);
  margin-top: 18px;
}

.gallery {
  position: relative;
  display: flex;
  align-items: center;
  height: calc(var(--face-h) + 76px);
  margin-bottom: -16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  cursor: grab;
  outline: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.gallery::-webkit-scrollbar { display: none; }
.gallery::before,
.gallery::after { content: ""; flex: 0 0 calc(50% - var(--slot) / 2); }
.gallery.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.gallery:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: 16px; }

.group-card {
  position: relative;
  flex: 0 0 var(--slot);
  height: var(--face-h);
  scroll-snap-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.card-face {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--face-w);
  height: var(--face-h);
  margin-left: calc(var(--face-w) / -2);
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--card-color), var(--head-b));
  box-shadow: 0 10px 26px rgb(var(--shadow) / 0.28);
  will-change: transform;
}

.group-card:focus-visible .card-face {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.card-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--petal);
  pointer-events: none;
}

.card-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.card-title-only {
  display: grid;
  place-items: center;
  inset: 0;
  width: auto;
  height: auto;
  padding: 10px;
  clip-path: none;
  font-family: var(--title-font);
  font-size: 1.2rem;
  color: #fff;
  text-align: center;
}

.flow-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 2px 10px;
  min-height: 1.7em;
  margin: 2px 0 0;
  font-family: var(--title-font);
  color: var(--title-deep);
}

.flow-caption strong { font-size: 1.15rem; font-weight: 400; }
.flow-caption span { font-family: inherit; font-size: 0.8rem; color: var(--ink-soft); }

.group-banner {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 18px;
  border-radius: 20px;
  background: var(--petal);
  box-shadow: 0 12px 28px rgb(var(--shadow) / 0.18);
}

/* ---- 표 ---- */
.board {
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 18px 44px rgb(var(--shadow) / 0.14);
  overflow: clip;
}

table { width: 100%; border-collapse: collapse; }

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 12px;
  background: linear-gradient(180deg, var(--head-a), var(--head-b));
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgb(var(--head-shadow) / 0.45);
}

.members thead th:first-child { padding-left: 20px; }

.members tbody tr {
  cursor: pointer;
  background: var(--card);
  border-top: 1px solid var(--line);
  transition: background 0.15s ease;
}

.members tbody tr:hover { background: var(--petal); }

.members tbody td {
  padding: 8px 12px;
  vertical-align: middle;
  font-size: 0.95rem;
}

.c-photo { width: 84px; padding-left: 20px !important; }

.avatar {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--petal);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ring);
  transition: transform 0.2s ease;
}

tr:hover .avatar { transform: scale(1.08) rotate(-3deg); }

.avatar-empty {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--empty-a), var(--empty-b));
  color: #fff;
  font-family: var(--title-font);
  font-size: 1.35rem;
  text-shadow: 0 1px 2px rgb(var(--head-shadow) / 0.5);
}

.mbti {
  margin-left: 1px;
  font-size: 0.78em;
  font-weight: 500;
  color: var(--ink-soft);
}

.row-link {
  white-space: nowrap;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.row-link:focus-visible,
.back:focus-visible,
.footer a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px 3px 8px;
  border-radius: 999px;
  background: var(--blush);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

.chip i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.c-birth { white-space: nowrap; font-variant-numeric: tabular-nums; }
.age { color: var(--strong); font-weight: 700; }
.c-height { white-space: nowrap; font-variant-numeric: tabular-nums; }
.unknown { color: var(--ink-soft); font-size: 0.85rem; }

.c-nation { white-space: nowrap; }

.flag {
  display: inline-block;
  width: 32px;
  height: 24px;
  margin-right: 6px;
  border-radius: 4px;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgb(var(--flag-line) / 0.14);
}

.c-agency { width: 104px; }

.agency-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 88px;
  max-height: 30px;
}

.agency-text {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink-soft);
  word-break: keep-all;
}

/* 그룹 보기: 사진을 크게 */
body:not([data-active=""]) .members tbody tr { cursor: default; }
body:not([data-active=""]) .avatar { width: 84px; height: 84px; }
body:not([data-active=""]) .c-photo { width: 116px; }
body:not([data-active=""]) .members tbody td { padding-top: 12px; padding-bottom: 12px; }
body:not([data-active=""]) .row-link { font-size: 1.2rem; cursor: default; }

/* 영상이 있는 멤버 */
body:not([data-active=""]) .members tbody tr[data-video-member],
body:not([data-active=""]) tr[data-video-member] .row-link { cursor: pointer; }

body:not([data-active=""]) tr[data-video-member] .row-link::after {
  content: " ▶";
  font-size: 0.7em;
  color: var(--focus);
  vertical-align: 1px;
}

/* 멤버 화면 */
body .avatar.member-avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
  font-size: 2.4rem;
}

.video-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.video-card {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 8px 22px rgb(var(--shadow) / 0.14);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: rise 0.42s cubic-bezier(.22, 1.2, .36, 1) backwards;
  animation-delay: calc(var(--i) * 45ms);
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgb(var(--shadow) / 0.24);
}

.video-card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.video-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--petal);
}

.video-text { padding: 11px 14px 14px; }

.video-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-channel,
.video-meta {
  margin: 5px 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.video-views { color: var(--strong); font-weight: 700; }

.video-with {
  display: inline-block;
  margin-top: 7px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--blush);
  border: 1px solid var(--line);
  font-size: 0.75rem;
}

.mv-section { margin-top: 30px; }

.video-tabs {
  display: grid;
  grid-template-columns: repeat(var(--tabs, 4), minmax(0, 1fr));
  gap: 6px;
  margin: 0 auto 16px;
  max-width: 620px;
  padding: 5px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 6px 18px rgb(var(--shadow) / 0.12);
}

.video-tab {
  min-height: 42px;
  padding: 6px 4px;
  border: 0;
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.video-tab span {
  margin-left: 3px;
  font-size: 0.75rem;
  font-weight: 500;
}

.video-tab:hover { background: var(--blush); }

.video-tab[aria-selected="true"] {
  background: var(--strong);
  color: #fff;
}

.video-tab:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.member-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 14px;
}

.member-chip {
  min-height: 36px;
  padding: 4px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}

.member-chip[aria-pressed="true"] {
  border-color: transparent;
  background: var(--strong);
  color: #fff;
}

.member-chip:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.mv-list li[hidden] { display: none; }

.mv-list { grid-template-columns: repeat(3, 1fr); }
.mv-list .video-card { animation-delay: calc(min(var(--i), 9) * 35ms); }

.video-empty {
  padding: 42px 16px;
  border-radius: 20px;
  background: var(--card);
  text-align: center;
  color: var(--ink-soft);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
}

/* 하트 */
.heart {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  font-size: 18px;
  line-height: 1;
  color: var(--mark);
}

/* 사진 출처 */
.credits th { position: static; }
.credits td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

/* 소개·개인정보처리방침·연락처 */
.doc { max-width: 760px; margin: 0 auto; padding: 8px 32px 28px; line-height: 1.75; color: var(--ink); }
.doc section + section { border-top: 1px solid var(--line); }
.doc h2 { margin: 26px 0 8px; font-family: var(--title-font); font-size: 1.35rem; font-weight: 400; color: var(--strong); }
.doc p, .doc ul, .doc dl { margin: 10px 0; }
.doc section:first-child > p:first-child { margin-top: 22px; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc dt { margin-top: 14px; font-weight: 700; }
.doc dd { margin: 2px 0 0; color: var(--ink-soft); }
.doc a { color: var(--strong); text-underline-offset: 3px; }
.doc .doc-counts { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; list-style: none; }
.doc .doc-counts li { margin-top: 0; }
.doc-contact { font-size: 1.05rem; font-weight: 700; }
.doc-contact a { overflow-wrap: anywhere; }
.mail-pending { color: var(--ink-soft); font-weight: 500; }
@media (max-width: 680px) { .doc { padding: 4px 18px 22px; } }

/* ---- 꼬리말 ---- */
.footer {
  padding: 26px 8px 40px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.footer p { margin: 4px 0; }

/* ---- 모바일: 표 한 줄을 카드 한 장으로 ---- */
/* ---- 통계 ---- */
.stats-side { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 380px; margin-top: 10px; }

.stats-periods { margin: 14px 0 0; }

a.member-chip {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(var(--tiles, 3), minmax(0, 1fr));
  gap: 14px;
}

.stat-tile {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 28px rgb(var(--shadow) / 0.12);
}

.stat-tile figcaption { font-size: 0.88rem; font-weight: 700; color: var(--ink-soft); }

.stat-value {
  margin: 4px 0 0;
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-value small { margin-left: 2px; font-size: 0.95rem; font-weight: 500; }

.stat-readout { margin: 12px 0 6px; font-size: 0.8rem; color: var(--ink-soft); }

.day-bars {
  display: flex;
  align-items: flex-end;
  height: 72px;
  border-bottom: 1px solid var(--line);
}

.day-bars i {
  flex: 1;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding: 0 1px;
}

.day-bars i::before {
  content: "";
  width: 100%;
  height: var(--h);
  min-height: 1px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}

.day-bars i:hover::before { background: var(--title-deep); }

.day-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.rankings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.ranking {
  min-width: 0;
  padding: 18px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 28px rgb(var(--shadow) / 0.12);
}

.ranking h2 { margin: 0 0 10px; font-size: 1rem; }

.rank-list { margin: 0; padding: 0; list-style: none; }

.rank-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: baseline;
  padding: 6px 4px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.rank-row:hover { background: var(--blush); }

.rank-row:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.rank-no { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); text-align: right; font-variant-numeric: tabular-nums; }

.rank-name {
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-name small { margin-left: 5px; font-size: 0.76rem; color: var(--ink-soft); }

.rank-count { font-size: 0.88rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.rank-bar {
  grid-column: 2 / -1;
  height: 6px;
  border-radius: 3px;
  background: var(--blush);
}

.rank-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

.ranking-empty { margin: 14px 0 8px; font-size: 0.9rem; color: var(--ink-soft); text-align: center; }

.stats-note { margin: 16px 8px 0; font-size: 0.8rem; color: var(--ink-soft); text-align: center; }

@media (max-width: 680px) {
  .stat-tiles { grid-template-columns: 1fr; }
  .rankings { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .hero { padding: 30px 4px 20px; }

  .board { border-radius: 20px; }

  /* 표가 너무 밀리지 않도록 모바일에서는 옆으로 넘겨 본다 */
  .flow { --face-w: 68vw; --slot: calc(var(--face-w) * 0.36); }
  .video-list { grid-template-columns: 1fr; }
  .mv-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .side-menu { gap: 1px; padding: 4px; }
  .side-menu { gap: 1px; padding: 4px; }
  .side-menu a { padding: 9px 0; font-size: 0.78rem; letter-spacing: -0.04em; }
  .video-tabs { gap: 2px; padding: 4px; }
  .video-tab { font-size: 0.8rem; letter-spacing: -0.03em; }
  .video-tab span { display: block; margin: -2px 0 0; font-size: 0.68rem; }
  .mv-list .video-text { padding: 8px 10px 11px; }
  .mv-list .video-title { font-size: 0.82rem; }
  .mv-list .video-meta { font-size: 0.66rem; letter-spacing: -0.02em; white-space: nowrap; }
  .group-banner { border-radius: 16px; margin-top: 14px; }

  .members thead,
  .credits thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .members tbody tr {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    grid-template-areas:
      "photo name   chip"
      "photo birth  birth"
      "photo detail detail";
    align-items: center;
    column-gap: 12px;
    row-gap: 1px;
    padding: 12px 14px;
  }

  .members tbody tr[hidden] { display: none; }

  .members tbody td {
    padding: 0 !important;
    font-size: 0.875rem;
  }

  .c-photo { grid-area: photo; width: auto; }
  .avatar { width: 60px; height: 60px; margin-left: 4px; }
  .c-name { grid-area: name; }
  .c-group { grid-area: chip; justify-self: end; }
  .c-birth { grid-area: birth; }

  /* 소속사는 오른쪽 아래 */
  .members tbody .c-agency {
    grid-column: 3;
    grid-row: 2 / span 2;
    align-self: end;
    justify-self: end;
    width: auto;
    max-width: 96px;
    text-align: right;
  }

  .agency-logo { max-width: 74px; max-height: 26px; margin-left: auto; }

  /* 키와 국적은 같은 줄에 */
  .members tbody .c-height { grid-area: detail; justify-self: start; }
  .members tbody .c-nation { grid-area: detail; padding-left: 68px !important; color: var(--ink-soft); }

  .chip { font-size: 0.75rem; }
  .flag { width: 24px; height: 18px; margin-right: 4px; border-radius: 3px; }

  body:not([data-active=""]) .avatar { width: 64px; height: 64px; }
  body:not([data-active=""]) .c-photo { width: auto; }

  .credits tr { display: block; padding: 12px 14px; border-top: 1px solid var(--line); }
  .credits td { display: block; padding: 1px 0; border: 0; }
}

@media (max-width: 360px) {
  .mv-list .video-meta { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---- 2026-11-03 디자인 정리: Pretendard, 무채색 글자, 분야 색은 강조에만 ---- */

/* 글자는 무채색, 분야 색은 강조에만 */
:root,
:root[data-side] {
  --ink: #1d1d22;
  --ink-soft: #70707b;
  --line: #ececf1;
  --card: #ffffff;
}

body {
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* 제목 */
.hero h1 {
  font-size: clamp(1.9rem, 6.4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.hero-sub { color: var(--ink-soft); }

/* 메뉴 */
.side-menu {
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 14px rgb(0 0 0 / 0.06);
}

.side-menu a {
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.side-menu a:hover { background: #f4f4f7; color: var(--ink); }

.side-menu a[aria-current="page"] {
  background: var(--strong);
  color: #fff;
}

/* 커버 플로우 이름 */
.flow-caption { font-family: inherit; color: var(--ink); }
.flow-caption strong { font-weight: 700; letter-spacing: -0.02em; }
.flow-caption span { font-family: inherit; }
.card-title-only { font-weight: 700; }

/* 표 */
.board {
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 10px 30px rgb(0 0 0 / 0.05);
}

thead th {
  padding: 12px;
  background: #fafafc;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  text-shadow: none;
}

.members tbody tr:hover { background: #f7f7fa; }

.row-link { font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.mbti { font-weight: 500; color: var(--ink-soft); }

.avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ring); }
.avatar-empty { font-family: inherit; font-weight: 700; text-shadow: none; }

.chip {
  background: #f5f5f8;
  border-color: transparent;
  font-weight: 600;
  color: var(--ink);
}

.c-birth, .c-height { font-feature-settings: "tnum"; color: var(--ink); }
.age { margin-left: 2px; color: var(--strong); font-weight: 600; }

/* 소속사: 높이를 맞추고 무채색으로 */
.agency-logo {
  max-width: 84px;
  max-height: 28px;
  filter: grayscale(1) contrast(1.15);
}

.agency-text { font-size: 0.75rem; font-weight: 600; color: var(--ink-soft); }

.footer { color: var(--ink-soft); }
.doc h2 { font-weight: 700; color: var(--ink); }

@media (max-width: 680px) {
  .agency-logo { max-width: 74px; max-height: 26px; }
}

/* ---- 게시판 ---- */
.board-intro { max-width: 560px; margin: 14px auto 0; font-size: 0.92rem; line-height: 1.6; }
.board-page { display: grid; gap: 16px; max-width: 760px; margin: 0 auto; }
.board-notice, .board-error { margin: 0; padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.board-notice { background: var(--card); border: 1px solid var(--line); }
.board-error { background: #fff1f1; border: 1px solid #f5c2c2; color: #a11d1d; }
.board-write, .board-pending, .post, .board-empty {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 10px 30px rgb(0 0 0 / 0.05);
}
.board-write { padding: 0 20px; }
.board-write > summary { padding: 16px 0; font-weight: 700; cursor: pointer; }
.board-write[open] > summary { border-bottom: 1px solid var(--line); }
.board-write form { display: grid; gap: 14px; padding: 16px 0 20px; }
.board-write label { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.board-write label[hidden] { display: none; }
.board-write small { font-weight: 500; color: var(--ink-soft); }
.board-write input, .board-write select, .board-write textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #dcdce3;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
}
.board-write textarea { resize: vertical; min-height: 96px; }
.board-write input:focus, .board-write select:focus, .board-write textarea:focus { outline: 2px solid var(--strong); outline-offset: 0; border-color: transparent; }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.field-end { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.board-page button {
  padding: 10px 22px;
  border: 0;
  border-radius: 10px;
  background: var(--strong);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.board-page button:disabled { opacity: 0.5; cursor: default; }
.board-page button:focus-visible, .board-write summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.board-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.board-rules { margin: 0; padding-left: 1.1em; font-size: 0.78rem; line-height: 1.6; color: var(--ink-soft); }
.board-rules a { color: inherit; }
.board-pending { padding: 14px 20px; }
.board-pending h2 { margin: 0 0 6px; font-size: 0.95rem; }
.board-pending ul { margin: 0; padding: 0; list-style: none; }
.board-pending li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--ink-soft); }
.board-pending li span { font-feature-settings: "tnum"; }
.board-list { display: grid; gap: 12px; }
.post { padding: 16px 20px; }
.post header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.post header time { margin-left: auto; font-size: 0.78rem; color: var(--ink-soft); font-feature-settings: "tnum"; }
.post-status { padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: #f0f0f4; color: var(--ink-soft); }
.s-applied { background: #e3f6e9; color: #17663a; }
.s-approved { background: #e6f0ff; color: #1d4f9c; }
.s-held { background: #fff3d6; color: #7a5300; }
.s-rejected { background: #f0f0f4; color: #5c5c66; }
.post-kind { font-size: 0.82rem; color: var(--ink-soft); }
.post-video { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 0.82rem; color: var(--ink-soft); text-decoration: none; }
.post-video img { width: 120px; height: auto; border-radius: 8px; background: #eee; }
.post-body { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.post-reply { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: #f7f7fa; }
.post-reply b { font-size: 0.78rem; color: var(--strong); }
.post-reply p { margin: 2px 0 0; white-space: pre-wrap; line-height: 1.6; font-size: 0.92rem; }
.post-delete { margin-top: 8px; font-size: 0.75rem; color: var(--ink-soft); }
.board-pending .post-delete { margin: 0 0 0 auto; }
.post-delete summary { cursor: pointer; }
.post-delete form { display: flex; gap: 6px; margin-top: 6px; }
.post-delete input { padding: 6px 10px; border: 1px solid #dcdce3; border-radius: 8px; font: inherit; }
.post-delete button { padding: 6px 12px; font-size: 0.78rem; }
.board-empty { margin: 0; padding: 28px; text-align: center; color: var(--ink-soft); }
@media (max-width: 680px) {
  .field-row { grid-template-columns: 1fr; }
  .field-end { grid-template-columns: 1fr; }
  .board-write, .board-pending, .post { padding-left: 16px; padding-right: 16px; }
  .post header time { margin-left: 0; width: 100%; }
}

/* ---- 다국어 (2026-11-03) ---- */
/* 일본어·중국어: Pretendard 에 없는 가나·한자는 각 언어 시스템 글꼴로 */
:root:lang(ja) {
  --title-font: "Pretendard Variable", Pretendard, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
}
:root:lang(zh) {
  --title-font: "Pretendard Variable", Pretendard, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
}
:root:lang(ja) body, :root:lang(zh) body { font-family: var(--title-font); }

/* 맨 위 얇은 언어 바 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgb(255 255 255 / 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 980px;
  height: 34px;
  margin: 0 auto;
  padding: 0 16px;
}
.topbar-home {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}
.lang-menu { display: flex; gap: 2px; }
.lang-menu a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.lang-menu a:hover { background: var(--blush); }
.lang-menu a[aria-current] { background: var(--strong); color: #fff; }
.lang-menu img {
  width: 18px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.1);
}
.lang-menu a:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.lang-short { display: none; }
@media (max-width: 560px) {
  .lang-long { display: none; }
  .lang-short { display: inline; }
  .lang-menu a { padding: 3px 7px; }
}
/* 표 머리줄이 언어 바 아래에 붙도록 */
thead th { top: calc(35px + env(safe-area-inset-top, 0px)); }
/* 영어·일본어·중국어는 생년월일이 길어서, 휴대폰에서 가운데 칸이 줄어들고 줄을 바꿀 수 있게 */
@media (max-width: 680px) {
  .members tbody tr { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .members tbody .c-birth { white-space: normal; }
}
@media (max-width: 680px) {
  .members tbody .row-link { white-space: normal; overflow-wrap: anywhere; }
  .members tbody .mbti { white-space: nowrap; }
}
/* 그룹 화면에서는 모든 줄이 같은 그룹이라, 휴대폰에서는 그룹 칩을 빼고 이름 칸을 넓힌다 */
@media (max-width: 680px) {
  body:not([data-active=""]) .members tbody .c-group { display: none; }
  body:not([data-active=""]) .members tbody tr {
    grid-template-areas:
      "photo name   name"
      "photo birth  birth"
      "photo detail detail";
  }
}

/* ---- 인기순 (2026-11-03) ---- */
.card-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.92);
  color: var(--strong);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 28px;
  text-align: center;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.18);
  font-variant-numeric: tabular-nums;
}
.gallery[data-order="debut"] .card-rank { display: none; }

.order-chips { margin: 10px 0 0; }
.order-chips .member-chip { min-height: 30px; padding: 2px 12px; font-size: 0.82rem; }

.table-tools { margin: 0 0 12px; text-align: center; }
.table-tools .order-chips { margin: 0 0 6px; }
.rank-note { margin: 0; font-size: 0.75rem; color: var(--ink-soft); }
body:not([data-active=""]) .table-tools { display: none; }

.rank-count-text { white-space: nowrap; }
.popular-note { margin: 8px 2px 0; font-size: 0.75rem; color: var(--ink-soft); }
.popular-ranking { margin-top: 14px; }

/* ---- 소개 페이지 /about (2026-11-03) ---- */
.intro { --gap: 18px; margin-bottom: 30px; color: var(--ink); line-height: 1.7; }
.intro-top { padding-bottom: 6px; }
.intro h2, .intro h3 { font-family: var(--title-font); }

.ab-hero {
  position: relative;
  overflow: hidden;
  margin: 10px 0 var(--gap);
  padding: 38px clamp(20px, 5vw, 56px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 0%, rgb(255 255 255 / 0.55) 0, transparent 40%),
    linear-gradient(135deg, var(--head-a), var(--head-b) 55%, var(--strong));
  color: #fff;
  box-shadow: 0 18px 44px rgb(var(--shadow) / 0.25);
}
.ab-hero::after {
  content: "3 · 4 · 5";
  position: absolute;
  right: -10px;
  bottom: -38px;
  font-size: clamp(5rem, 16vw, 9.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: rgb(255 255 255 / 0.13);
  pointer-events: none;
}
.ab-eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.22);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ab-headline { margin: 0; font-size: clamp(1.6rem, 4.6vw, 2.5rem); font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; }
.ab-lead { position: relative; z-index: 1; max-width: 640px; margin: 14px 0 0; font-size: 1.02rem; color: rgb(255 255 255 / 0.95); }
.ab-cta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.ab-btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--card);
  color: var(--strong);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgb(var(--shadow) / 0.16);
  transition: transform 0.15s ease;
}
.ab-btn:hover { transform: translateY(-1px); }
.ab-btn-main { background: var(--strong); color: #fff; }
.ab-hero .ab-btn-main { background: #fff; color: var(--strong); }
.ab-hero .ab-btn:not(.ab-btn-main) { background: rgb(255 255 255 / 0.18); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.5); }

.ab-jump {
  position: sticky;
  top: calc(35px + env(safe-area-inset-top, 0px));
  z-index: 20;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 0 var(--gap);
  padding: 8px 4px;
  background: linear-gradient(var(--bg) 70%, transparent);
  scrollbar-width: none;
}
.ab-jump::-webkit-scrollbar { display: none; }
.ab-jump a {
  flex: none;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgb(var(--shadow) / 0.1);
}
.ab-jump a:hover { color: var(--strong); }

.ab-section { margin: 0 0 34px; scroll-margin-top: 96px; }
.ab-title { margin: 0 0 6px; font-size: clamp(1.3rem, 3.4vw, 1.65rem); font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.ab-sub { margin: 0 0 16px; color: var(--ink-soft); }
.ab-small { margin: 10px 0 0; font-size: 0.82rem; color: var(--ink-soft); }
.ab-card {
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 28px rgb(var(--shadow) / 0.1);
}
.ab-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.ab-card p { margin: 0; }
.ab-card p + p { margin-top: 8px; }
.ab-link { display: inline-block; margin-top: 10px; color: var(--strong); font-weight: 700; text-decoration: none; }
.ab-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

/* 큰 숫자 */
.ab-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.ab-num {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 16px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 28px rgb(var(--shadow) / 0.1);
}
.ab-num strong { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 800; line-height: 1.1; color: var(--strong); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ab-num span { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }

/* 분야 카드: 분야마다 고유 색 */
.ab-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.ab-side {
  --tone: #c2185b; --tone-soft: #ffe1ee; --tone-mid: #f968ad;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--tone-soft), #fff 60%);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 10px 26px rgb(0 0 0 / 0.07), inset 0 0 0 1px rgb(255 255 255 / 0.6);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ab-side:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgb(0 0 0 / 0.12); }
.ab-side[data-tone="boy"] { --tone: #0369a1; --tone-soft: #dcf3ff; --tone-mid: #38bdf8; }
.ab-side[data-tone="band"] { --tone: #5b21b6; --tone-soft: #ece3ff; --tone-mid: #8b5cf6; }
.ab-side[data-tone="solo"] { --tone: #92400e; --tone-soft: #ffefc2; --tone-mid: #e8930c; }
.ab-side[data-tone="mixed"] { --tone: #166534; --tone-soft: #dcf5e3; --tone-mid: #34b35f; }
.ab-side-head { display: flex; align-items: center; gap: 8px; }
.ab-side-head strong { font-size: 1.25rem; font-weight: 800; color: var(--tone); }
.ab-side-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tone-mid);
  color: #fff;
  font-size: 0.95rem;
}
.ab-side-desc { margin: 8px 0 0; font-size: 0.82rem; color: var(--ink-soft); line-height: 1.45; }
.ab-side-count { margin: 6px 0 0; font-size: 1rem; font-weight: 800; color: var(--tone); }
.ab-side-label { margin: 12px 0 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; color: var(--ink-soft); }
.ab-side-top { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ab-side-top li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ab-rank-no { flex: none; width: 18px; font-size: 0.8rem; font-weight: 800; color: var(--tone); text-align: center; }
.ab-side-top img, .ab-thumb { flex: none; width: 48px; height: 24px; border-radius: 6px; object-fit: cover; }
.ab-side-name { overflow: hidden; font-size: 0.86rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.ab-side-go { margin-top: auto; padding-top: 12px; font-size: 0.82rem; font-weight: 800; color: var(--tone); }

/* 재미있는 숫자 */
.ab-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ab-fact {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 28px rgb(var(--shadow) / 0.1);
}
.ab-fact-label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; color: var(--strong); }
.ab-fact strong { margin-top: 4px; font-size: 1.35rem; font-weight: 800; line-height: 1.25; }
.ab-fact-note { margin-top: 4px; font-size: 0.8rem; color: var(--ink-soft); line-height: 1.45; }

.ab-nations ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin: 10px 0 0; padding: 0; list-style: none; }
.ab-nations li { display: grid; grid-template-columns: 24px 7.5em minmax(0, 1fr) 2.5em; align-items: center; gap: 8px; font-size: 0.86rem; }
.ab-nations img { border-radius: 2px; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08); }
.ab-nation-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ab-bar { height: 8px; border-radius: 999px; background: var(--petal); overflow: hidden; }
.ab-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--head-a), var(--strong)); }
.ab-nation-count { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }

/* 단계 */
.ab-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; padding: 0; list-style: none; counter-reset: none; }
.ab-steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ab-step {
  position: relative;
  padding: 18px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 28px rgb(var(--shadow) / 0.1);
}
.ab-step + .ab-step::before {
  content: "→";
  position: absolute;
  top: 24px;
  left: -12px;
  transform: translateX(-50%);
  color: var(--strong);
  font-weight: 800;
}
.ab-step-no {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--strong);
  color: #fff;
  font-weight: 800;
}
.ab-step strong { display: block; font-size: 1.02rem; }
.ab-step p { margin: 4px 0 0; font-size: 0.88rem; color: var(--ink-soft); }

.ab-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0 0 14px;
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
}
.ab-formula code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(0.9rem, 2.6vw, 1.1rem); font-weight: 700; }
.ab-formula span { font-size: 0.8rem; opacity: 0.75; }

.ab-callout {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-left: 4px solid var(--strong);
  border-radius: 12px;
  background: var(--blush);
  font-size: 0.92rem;
}
.ab-callout-strong strong { display: block; color: var(--strong); }
.ab-callout-strong p { margin: 4px 0 0; }

/* 기능 */
.ab-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ab-feature {
  padding: 18px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 28px rgb(var(--shadow) / 0.1);
}
.ab-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--petal);
  color: var(--strong);
  font-size: 1.2rem;
}
.ab-feature h3 { margin: 0 0 4px; font-size: 1.02rem; }
.ab-feature p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.ab-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.ab-kinds li { padding: 2px 10px; border-radius: 999px; background: var(--blush); font-size: 0.78rem; }
.ab-kinds b { color: var(--strong); }

/* 영상 기준 */
.ab-rules { display: grid; gap: 10px; margin: 0 0 14px; }
.ab-rules > div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 18px; border-radius: 18px; background: var(--card); box-shadow: 0 8px 22px rgb(var(--shadow) / 0.08); }
.ab-rules dt { margin: 0; }
.ab-rules dd { margin: 0; font-size: 0.9rem; }
.ab-chip { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--strong); color: #fff; font-size: 0.8rem; font-weight: 700; }

/* 타임라인 */
.ab-timeline { position: relative; margin: 0; padding: 0 0 0 26px; list-style: none; }
.ab-timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 8px; width: 2px; background: var(--line); }
.ab-timeline li { position: relative; margin: 0 0 12px; padding: 14px 18px; border-radius: 18px; background: var(--card); box-shadow: 0 8px 22px rgb(var(--shadow) / 0.08); }
.ab-timeline li::before {
  content: "";
  position: absolute;
  top: 20px;
  left: -24px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: var(--strong);
  box-shadow: 0 0 0 2px var(--strong);
}
.ab-timeline strong { color: var(--strong); }
.ab-timeline p { margin: 4px 0 0; font-size: 0.9rem; }

.ab-big { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.ab-big span { font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); }
.ab-big strong { font-size: clamp(2.2rem, 7vw, 3.2rem); font-weight: 900; line-height: 1.1; color: var(--strong); font-variant-numeric: tabular-nums; }

.ab-defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0; }
.ab-defs dt { margin: 0 0 4px; font-weight: 800; color: var(--strong); }
.ab-defs dd { margin: 0; font-size: 0.9rem; }
.ab-defs a { color: var(--strong); font-weight: 700; text-decoration: none; white-space: nowrap; }

.ab-notice { padding: 22px; border-radius: 22px; background: var(--card); box-shadow: 0 10px 28px rgb(var(--shadow) / 0.1); }
.ab-notice p { margin: 6px 0 0; color: var(--ink-soft); }

@media (max-width: 760px) {
  .ab-steps, .ab-steps-4 { grid-template-columns: 1fr; }
  .ab-step + .ab-step::before { content: "↓"; top: -15px; left: 50%; }
  .ab-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-two { grid-template-columns: 1fr; }
  .ab-nations ul { grid-template-columns: 1fr; }
  .ab-rules > div { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 480px) {
  .ab-features { grid-template-columns: 1fr; }
  .ab-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-sides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 메뉴 8칸 (소개 추가) */
.side-menu { grid-template-columns: repeat(8, minmax(0, 1fr)); max-width: 720px; }
@media (max-width: 480px) {
  .side-menu { gap: 2px; padding: 4px; }
  .side-menu a { padding: 8px 2px; font-size: 0.8rem; letter-spacing: -0.02em; }
}
/* 소개 페이지 배치 보정 */
.ab-numbers { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ab-num strong { white-space: nowrap; font-size: clamp(1.4rem, 3.2vw, 2rem); }
.ab-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ab-defs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ab-defs > div { grid-column: span 2; }
.ab-defs > div:nth-child(n + 4) { grid-column: span 3; }
#board .ab-small { margin-bottom: 14px; }
@media (max-width: 760px) {
  .ab-numbers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ab-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-defs { grid-template-columns: 1fr; }
  .ab-defs > div, .ab-defs > div:nth-child(n + 4) { grid-column: auto; }
}
@media (max-width: 480px) {
  .ab-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-facts { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .ab-side-top img, .ab-thumb { display: none; }
  .ab-side { padding: 14px; }
}

/* ---- 게시판 목록 불빛·공개 여부 (2026-11-03) ---- */
.light {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: 0;
}
.light-wait { background: #f5b800; box-shadow: 0 0 0 3px rgb(245 184 0 / 0.22), 0 0 8px rgb(245 184 0 / 0.7); animation: light-pulse 1.8s ease-in-out infinite; }
.light-done { background: #1fb35a; box-shadow: 0 0 0 3px rgb(31 179 90 / 0.2), 0 0 8px rgb(31 179 90 / 0.6); }
.light-no { background: #a3a3ad; box-shadow: 0 0 0 3px rgb(163 163 173 / 0.2); }
@keyframes light-pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .light-wait { animation: none; } }

.board-list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 4px 4px 0; }
.board-list-head h2 { margin: 0; font-size: 1.1rem; }
.board-list-head h2 small { margin-left: 4px; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.light-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 0.82rem; color: var(--ink-soft); }
.light-legend li { display: inline-flex; align-items: center; }

.post { border-left: 5px solid #f5b800; }
.post-done { border-left-color: #1fb35a; }
.post-no { border-left-color: #c9c9d1; }
.post-opened { box-shadow: 0 0 0 3px var(--strong); }
.post .post-status { display: inline-flex; align-items: center; background: #fff7d6; color: #7a5300; }
.post-done .post-status { background: #e3f6e9; color: #17663a; }
.post-no .post-status { background: #f0f0f4; color: #5c5c66; }
.post-lock { padding: 2px 8px; border-radius: 999px; background: #f0f0f4; font-size: 0.75rem; font-weight: 700; color: #5c5c66; }
.post-body { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.post-evidence { margin: 8px 0 0; font-size: 0.8rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.post-evidence a { color: var(--strong); }
.post-waiting, .post-hidden { margin: 10px 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.post-reply { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--blush); }
.post-reply b { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--strong); }
.post-reply b::before { content: "✦"; }
.post-reply p { margin: 4px 0 0; line-height: 1.6; }
.post-unlock { margin-top: 10px; font-size: 0.85rem; }
.post-unlock summary { cursor: pointer; color: var(--strong); font-weight: 700; }
.post-unlock form { display: flex; gap: 8px; margin-top: 8px; }
.post-unlock input { min-width: 0; flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }

.visibility { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.visibility legend { margin-bottom: 6px; padding: 0; font-size: 0.85rem; font-weight: 600; }
.board-write .visibility-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}
.board-write .visibility-option input { width: auto; margin: 3px 0 0; accent-color: var(--strong); }
.visibility-option span { display: grid; gap: 2px; }
.visibility-option b { font-size: 0.92rem; }
.visibility-option small { font-size: 0.78rem; line-height: 1.45; }
.visibility-option:has(input:checked) { border-color: var(--strong); box-shadow: 0 0 0 2px var(--strong) inset; background: var(--blush); }
@media (max-width: 560px) { .visibility { grid-template-columns: 1fr; } }

/* ---- 그룹 소개 글 (2026-11-03) ---- */
.group-intro {
  margin: 18px 0 0;
  padding: 20px 24px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 10px 28px rgb(var(--shadow) / 0.1);
  line-height: 1.8;
  color: var(--ink);
}
.group-intro h2 { margin: 0 0 6px; font-size: 1.15rem; font-weight: 800; color: var(--strong); }
.group-intro p { margin: 8px 0 0; font-size: 0.95rem; overflow-wrap: anywhere; }
.group-intro p:first-of-type { font-weight: 600; }
@media (max-width: 680px) { .group-intro { padding: 16px 18px; } .group-intro p { font-size: 0.9rem; } }
.not-found { max-width: 560px; margin: 10px auto 40px; padding: 30px 24px; border-radius: 26px; background: var(--card); text-align: center; box-shadow: 0 12px 30px rgb(var(--shadow) / 0.12); }
.not-found-code { margin: 0; font-size: clamp(4rem, 18vw, 6.5rem); font-weight: 900; line-height: 1; letter-spacing: -0.04em; background: linear-gradient(135deg, var(--head-a), var(--strong)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.not-found h2 { margin: 10px 0 6px; font-size: 1.35rem; }
.not-found p { color: var(--ink-soft); }
.not-found-links { justify-content: center; }
.not-found .not-found-code { color: transparent; }
/* 소개 글 위치: 단체 사진과 멤버 표 사이 */
#intro-slot .group-intro { margin: 0 0 18px; }

/* ---- 그룹 화면 단체 사진: 흐린 띠 빼고 낮게 (2026-11-03) ---- */
.group-banner-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ratio, 2.5);
  margin-top: 18px;
  border-radius: 20px;
  background: var(--petal);
  box-shadow: 0 12px 28px rgb(var(--shadow) / 0.18);
}
.group-banner-frame .group-banner {
  position: absolute;
  top: var(--shift, 0%);
  left: 50%;
  width: auto;
  max-width: none;
  height: var(--scale, 100%);
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  transform: translateX(-50%);
}

/* MBTI 거르기 (2026-11-03) */
.mbti-filter { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat; }
.mbti-filter.is-on { border-color: transparent; background-color: var(--strong); color: #fff; }
.mbti-filter option { color: var(--ink); background: var(--card); }
body[data-active=""] .members tbody tr.mbti-out { display: none; }
