/* ================================================================
   백단송 방송 페이지 — 디자인(스타일) 파일

   색상을 바꾸고 싶으면 아래 :root 맨 위 "원본 색상표"의 -light/-dark
   값만 고치면 됩니다. (실제로 쓰이는 --bg, --ink 같은 이름들은 이
   원본 색상표를 그대로 가져다 쓰는 것뿐이라 따로 손댈 필요 없어요)

   ★ 다크 모드는 자동 + 오른쪽 위 버튼으로 직접 선택도 가능합니다.
     - 버튼을 누른 적이 없으면: 방문자 기기 설정을 따라갑니다.
     - 버튼을 누르면: 그 선택을 기억해서 다음 방문에도 유지됩니다.
   ================================================================ */

:root {
  color-scheme: light dark; /* 브라우저 기본 UI(스크롤바 등)도 테마에 맞춤 */

  /* ---- 원본 색상표 (밝을 때 / 어두울 때) — "소나무·새벽·금" 팔레트 ---- */
  --bg-light: #f4f2ea;             --bg-dark: #0f120c;
  --bg-alt-light: #ebe7db;         --bg-alt-dark: #141810;
  --bg-panel-light: #ffffff;       --bg-panel-dark: #1a1e15;
  --panel2-light: #f7f5ee;         --panel2-dark: #20261b;
  --bg-nav-light: rgba(244, 242, 234, 0.8); --bg-nav-dark: rgba(15, 18, 12, 0.82);
  --hero-glow-light: #efe7d6;      --hero-glow-dark: #202717;

  --ink-light: #161309;            --ink-dark: #f0eee2;
  --ink-soft-light: #6c6555;       --ink-soft-dark: #9ea08f;

  --green-light: #6f8a5f;          --green-dark: #a3bf88;     /* 소나무(pine) */
  --green-mid-light: #7f976a;      --green-mid-dark: #8ba077;
  --green-label-light: #41573a;    --green-label-dark: #7f9a6a; /* 짙은 솔(pine-deep) */
  --green-line-light: #ddd7c6;     --green-line-dark: #333929;
  --green-tint-light: #eae4d3;     --green-tint-dark: #20261b;

  --border-soft-light: #e3ddcd;    --border-soft-dark: #2a3122;
  --text-muted-light: #a49d8b;     --text-muted-dark: #70765f;
  --dashed-border-light: #c4bda6;  --dashed-border-dark: #465238;

  --gold-c-light: #a9823f;         --gold-c-dark: #d5ac66;    /* 금 (테마별) */
  --dawn-light: #e7c69c;           --dawn-dark: #efd4ad;      /* 새벽빛 */

  --shadow-soft-light: rgba(70, 60, 30, 0.13); --shadow-soft-dark: rgba(0, 0, 0, 0.5);
  --shadow-hero-light: rgba(50, 45, 20, 0.2);  --shadow-hero-dark: rgba(0, 0, 0, 0.55);
  --select-bg-light: #cdd8bb;      --select-bg-dark: #3a4a30;

  /* ---- 실제로 쓰이는 색상 (기본값 = 밝은 화면) ---- */
  --bg: var(--bg-light);
  --bg-alt: var(--bg-alt-light);
  --bg-panel: var(--bg-panel-light);
  --panel2: var(--panel2-light);
  --bg-nav: var(--bg-nav-light);
  --hero-glow: var(--hero-glow-light);
  --ink: var(--ink-light);
  --ink-soft: var(--ink-soft-light);
  --green: var(--green-light);
  --green-mid: var(--green-mid-light);
  --green-label: var(--green-label-light);
  --green-line: var(--green-line-light);
  --green-tint: var(--green-tint-light);
  --border-soft: var(--border-soft-light);
  --text-muted: var(--text-muted-light);
  --dashed-border: var(--dashed-border-light);
  --gold: var(--gold-c-light);
  --dawn: var(--dawn-light);
  --shadow-soft: var(--shadow-soft-light);
  --shadow-hero: var(--shadow-hero-light);
  --select-bg: var(--select-bg-light);

  /* ---- 새 디자인용 별칭 (위 색을 그대로 다른 이름으로 씁니다) ---- */
  --pine: var(--green);
  --pine-deep: var(--green-label);
  --sub: var(--ink-soft);
  --line: var(--green-line);
  --panel: var(--bg-panel);
  --bg2: var(--bg-alt);

  /* ---- 고정 색상 (다크 모드에서도 바뀌지 않음) ---- */
  --green-deep: #41573a;     /* 버튼/이벤트/후원 등 항상 짙은 솔 배경 */
  --brand-dark: #1b2213;     /* 치지직 등 항상 짙은 카드 */
  --discord: #5865F2;        /* 디스코드 브랜드 색 */
  --x-black: #14100a;        /* X(트위터) 브랜드 색 */
  --shadow-strong: rgba(0, 0, 0, 0.35);

  --on-dark: #f1efe3;        /* 짙은 배경 위 텍스트 (항상 밝게) */
  --on-dark-soft: #cdd6c1;   /* 짙은 배경 위 보조 텍스트 */
  --on-dark-faint: #99a288;  /* 짙은 배경 위 옅은 텍스트 */

  --youtube: #ff3b30;        /* 유튜브 브랜드 색 */
  --cafe-brand: #03c75a;     /* 네이버 브랜드 색 */
  --fancim: #d9536f;         /* 팬심 (선물 서비스 — 따뜻한 장미빛) */
  --toonation: #1aa7a0;      /* 투네이션 (후원 서비스 — 청록) */
}

/* 색상 이름 하나를 한번에 다크값으로 바꾸기 위한 목록 (아래 두 곳에서 재사용) */
@media (prefers-color-scheme: dark) {
  /* 버튼으로 라이트 모드를 직접 선택했다면 기기 설정보다 그 선택이 우선 */
  :root:not([data-theme="light"]) {
    --bg: var(--bg-dark);
    --bg-alt: var(--bg-alt-dark);
    --bg-panel: var(--bg-panel-dark);
    --panel2: var(--panel2-dark);
    --bg-nav: var(--bg-nav-dark);
    --hero-glow: var(--hero-glow-dark);
    --ink: var(--ink-dark);
    --ink-soft: var(--ink-soft-dark);
    --green: var(--green-dark);
    --green-mid: var(--green-mid-dark);
    --green-label: var(--green-label-dark);
    --green-line: var(--green-line-dark);
    --green-tint: var(--green-tint-dark);
    --border-soft: var(--border-soft-dark);
    --text-muted: var(--text-muted-dark);
    --dashed-border: var(--dashed-border-dark);
    --gold: var(--gold-c-dark);
    --dawn: var(--dawn-dark);
    --shadow-soft: var(--shadow-soft-dark);
    --shadow-hero: var(--shadow-hero-dark);
    --select-bg: var(--select-bg-dark);
    color-scheme: dark;
  }
}

/* 버튼으로 다크 모드를 직접 선택 — 기기 설정과 무관하게 항상 적용 */
:root[data-theme="dark"] {
  --bg: var(--bg-dark);
  --bg-alt: var(--bg-alt-dark);
  --bg-panel: var(--bg-panel-dark);
  --panel2: var(--panel2-dark);
  --bg-nav: var(--bg-nav-dark);
  --hero-glow: var(--hero-glow-dark);
  --ink: var(--ink-dark);
  --ink-soft: var(--ink-soft-dark);
  --green: var(--green-dark);
  --green-mid: var(--green-mid-dark);
  --green-label: var(--green-label-dark);
  --green-line: var(--green-line-dark);
  --green-tint: var(--green-tint-dark);
  --border-soft: var(--border-soft-dark);
  --text-muted: var(--text-muted-dark);
  --dashed-border: var(--dashed-border-dark);
  --gold: var(--gold-c-dark);
  --dawn: var(--dawn-dark);
  --shadow-soft: var(--shadow-soft-dark);
  --shadow-hero: var(--shadow-hero-dark);
  --select-bg: var(--select-bg-dark);
  color-scheme: dark;
}

/* 버튼으로 라이트 모드를 직접 선택 — 기기가 다크 모드여도 항상 밝게 */
:root[data-theme="light"] {
  --bg: var(--bg-light);
  --bg-alt: var(--bg-alt-light);
  --bg-panel: var(--bg-panel-light);
  --panel2: var(--panel2-light);
  --bg-nav: var(--bg-nav-light);
  --hero-glow: var(--hero-glow-light);
  --ink: var(--ink-light);
  --ink-soft: var(--ink-soft-light);
  --green: var(--green-light);
  --green-mid: var(--green-mid-light);
  --green-label: var(--green-label-light);
  --green-line: var(--green-line-light);
  --green-tint: var(--green-tint-light);
  --border-soft: var(--border-soft-light);
  --text-muted: var(--text-muted-light);
  --dashed-border: var(--dashed-border-light);
  --gold: var(--gold-c-light);
  --dawn: var(--dawn-light);
  --shadow-soft: var(--shadow-soft-light);
  --shadow-hero: var(--shadow-hero-light);
  --select-bg: var(--select-bg-light);
  color-scheme: light;
}

* {
  box-sizing: border-box;
  /* 모바일에서 터치할 때 나타나는 파란 하이라이트 박스 제거
     (키보드 포커스 표시와는 별개라 접근성에는 영향 없음) */
  -webkit-tap-highlight-color: transparent;
  /* 글자·이미지 드래그 선택 방지 */
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}
/* 입력창(명령어 검색 등)에서는 글자 선택/입력이 되도록 예외 */
input, textarea { -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text; }
/* 이미지는 끌어당겨 옮길 수 없게 */
img { -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; user-drag: none; }

/* hidden 속성이 붙은 요소는 무조건 숨깁니다.
   (display: flex 같은 CSS 지정이 hidden의 기본 숨김을 덮어쓰는 것 방지 —
    이게 없으면 명령어 검색 필터처럼 hidden으로 숨기는 기능이 동작하지 않습니다) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

/* "동작 줄이기(reduce motion)"를 켠 방문자에게는 페이지가 부드럽게 스크롤되는
   것만 끕니다. (나뭇잎·룰렛·솔잎 등 이 사이트의 핵심 효과는 그대로 보이게 두어야
   "다른 컴퓨터에서 효과가 안 나온다"는 문제가 생기지 않습니다) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

section[id], .hero { scroll-margin-top: 76px; }

body {
  margin: 0;
  font-family: 'IBM Plex Sans KR', 'Gothic A1', sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
}

/* 새 디자인 글꼴 역할 — 편의 클래스 */
.font-display { font-family: 'Gothic A1', sans-serif; font-weight: 900; }
.font-serif   { font-family: 'Nanum Myeongjo', serif; }
.font-mono    { font-family: 'Space Mono', monospace; }
.font-latin   { font-family: 'Archivo Black', sans-serif; }

::selection { background: var(--select-bg); color: var(--ink); }

/* ---------- 스크롤바 (전체 페이지 + 팝업 안쪽 모두 적용) ---------- */
html {
  scrollbar-width: thin; /* 파이어폭스 */
  scrollbar-color: var(--green-mid) transparent;
}
::-webkit-scrollbar { width: 11px; height: 11px; } /* 크롬/사파리/엣지 */
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: var(--green-mid);
  border-radius: 999px;
  border: 3px solid var(--bg);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--green-label); }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

.modal {
  scrollbar-width: thin;
  scrollbar-color: var(--green-mid) transparent;
}

img { max-width: 100%; }

/* ---------- 애니메이션 ---------- */
@keyframes needleFall {
  0%   { transform: translateY(-6vh) translateX(0) rotate(var(--r0)); opacity: 0; }
  8%   { opacity: .85; }
  92%  { opacity: .6; }
  100% { transform: translateY(106vh) translateX(var(--dx)) rotate(var(--r1)); opacity: 0; }
}
@keyframes softFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--gold); }
  50%      { box-shadow: 0 0 0 7px rgba(201, 168, 106, 0); }
}
/* 새 디자인 — 시네마틱 히어로 / 마퀴 / HUD */
@keyframes bds-marq { to { transform: translateX(-50%); } }
@keyframes bds-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes bds-dawn { 0%, 100% { opacity: .45; } 50% { opacity: .85; } }
@keyframes bds-blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes bds-in { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes bds-glitch {
  0%, 92%, 100% { transform: translate(0); opacity: .9; }
  93% { transform: translate(-3px, 1px); opacity: .6; }
  95% { transform: translate(3px, -1px); opacity: 1; }
  97% { transform: translate(-2px, 0); }
}
@keyframes bds-spin { to { transform: rotate(360deg); } }

/* ---------- 스크롤 진행률 바 ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--green-mid), var(--green));
  z-index: 200; pointer-events: none;
}

/* ---------- 스크롤하면 나타나는 요소 ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- 떨어지는 솔잎 ---------- */
.needles {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 40; overflow: hidden;
}
.needle {
  position: absolute; top: 0;
  background: linear-gradient(180deg, #9fae8f, var(--green));
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: needleFall linear infinite;
  opacity: .7;
}

/* ---------- 내비게이션 (기술적 · 미니멀) ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 13px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none;
}
.nav-logo .seal {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border: 1.5px solid var(--pine); color: var(--pine-deep);
  font-family: 'Nanum Myeongjo', serif; font-weight: 800; font-size: 17px; border-radius: 3px;
}
.nav-logo .logo-ko {
  font-family: 'Gothic A1', sans-serif; font-weight: 900; font-size: 18px; letter-spacing: 0.02em;
}
.nav-logo .logo-en {
  font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 0.24em; color: var(--sub);
  border-left: 1px solid var(--line); padding-left: 12px;
}
.nav-links { display: flex; gap: clamp(14px, 2vw, 28px); align-items: center; }
.nav-links a {
  position: relative;
  color: var(--sub); text-decoration: none;
  font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: 0.13em;
  transition: color .2s ease;
}
.nav-links a .idx { color: var(--pine); margin-right: 5px; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1.5px;
  background: var(--pine); border-radius: 2px;
  transition: right .28s ease;
}
.nav-links a:hover { color: var(--pine-deep); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-links a.active { color: var(--ink); }

/* ---------- 내비게이션 드롭다운 (비슷한 메뉴끼리 묶은 큰 항목) ---------- */
.nav-group { position: relative; }
.nav-group-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: 0.13em;
  color: var(--sub);
  transition: color .2s ease;
}
.nav-group-btn .idx { color: var(--pine); margin-right: 5px; }
/* 링크와 같은 밑줄 효과 */
.nav-group-btn::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1.5px;
  background: var(--pine); border-radius: 2px;
  transition: right .28s ease;
}
.nav-group-btn:hover, .nav-group-btn.active,
.nav-group:hover .nav-group-btn { color: var(--ink); }
.nav-group-btn:hover::after, .nav-group-btn.active::after,
.nav-group:hover .nav-group-btn::after { right: 0; }
.nav-group-btn .chevron {
  width: 13px; height: 13px; margin-top: 1px;
  transition: transform .25s ease;
}
.nav-group:hover .chevron, .nav-group.is-open .chevron { transform: rotate(180deg); }

/* 버튼과 펼침 목록 사이 틈에서 마우스가 벗어나도 닫히지 않게 다리를 놓습니다 */
.nav-group:hover::before {
  content: ""; position: absolute; top: 100%; left: -12px; right: -12px; height: 18px;
}
.nav-dropdown {
  position: absolute; top: calc(100% + 16px); left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 178px; padding: 7px; z-index: 60;
  display: flex; flex-direction: column;
  background: var(--bg-nav);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 18px 40px var(--shadow-soft);
  opacity: 0; visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown,
.nav-group.is-open .nav-dropdown {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-links .nav-dropdown a {
  padding: 10px 13px; border-radius: 4px; font-size: 12.5px; letter-spacing: 0.04em;
  color: var(--sub);
  transition: background-color .18s ease, color .18s ease;
}
.nav-links .nav-dropdown a::after { display: none; }
.nav-links .nav-dropdown a:hover { background: var(--panel2); color: var(--pine-deep); }
.nav-links .nav-dropdown a.active { background: var(--panel2); color: var(--pine-deep); }
.nav-cta {
  font-family: 'Space Mono', monospace; font-size: 11.5px; letter-spacing: 0.1em;
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 3px;
  color: var(--ink); text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease;
}
.nav-cta:hover { background: var(--panel2); border-color: var(--pine); color: var(--pine-deep); }

/* ---------- 라이트/다크 모드 토글 버튼 (기술적 라벨 스타일) ---------- */
.nav-right { display: flex; align-items: center; gap: clamp(10px, 1.4vw, 16px); }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: 3px;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink); cursor: pointer;
  font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: 0.14em;
  transition: background-color .2s ease, border-color .2s ease;
}
.theme-toggle:hover { border-color: var(--pine); background: var(--panel2); }
.theme-toggle .tt-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; flex: none;
}
.theme-toggle svg { display: none; } /* 예전 아이콘은 숨김 (라벨 방식) */

/* ---------- 모바일 메뉴 버튼 ---------- */
.menu-toggle {
  display: none; width: 36px; height: 34px; border-radius: 3px; padding: 0;
  border: 1px solid var(--line); background: transparent;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
  cursor: pointer;
}
.menu-toggle span {
  display: block; width: 15px; height: 1.5px; background: var(--ink);
  transition: transform .25s ease, opacity .25s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- 히어로 (항상 어두운 시네마틱 무대) ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: flex-end;
  background: radial-gradient(120% 90% at 78% 8%, #243019 0%, #141a0f 42%, #0b0d08 100%);
  color: #f1efe3; overflow: hidden;
}
/* 스캔라인 */
.hero-scanlines {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.028) 0 1px, transparent 1px 3px);
}
/* 새벽빛 */
.hero-glow {
  position: absolute; top: -10%; right: 6%; z-index: 1;
  width: 60vw; height: 60vw; max-width: 780px; max-height: 780px; border-radius: 50%;
  background: radial-gradient(circle, rgba(231,198,156,.28), transparent 62%);
  filter: blur(10px); animation: bds-dawn 6s ease-in-out infinite;
}
/* 뒤에 크게 깔린 라틴 문자 (BAEK DAN SONG) — 스크림 위로 올려 또렷하게 */
.hero-latin {
  position: absolute; left: -1.5vw; top: 14vh; z-index: 3; user-select: none; pointer-events: none;
  font-family: 'Archivo Black', sans-serif; font-size: clamp(60px, 13vw, 210px); line-height: .9;
  color: transparent; -webkit-text-stroke: 2px rgba(190,214,163,.2); letter-spacing: -.01em;
  text-shadow: 0 0 40px rgba(0,0,0,.5);
}
/* 회전하는 인장 */
.hero-seal {
  position: absolute; top: 118px; right: clamp(16px, 5vw, 80px); z-index: 4;
  width: 132px; height: 132px; opacity: .85; pointer-events: none;
}
.hero-seal .ring-out { position: absolute; inset: 0; border: 1px solid rgba(213,172,102,.5); border-radius: 50%; animation: bds-spin 34s linear infinite; }
.hero-seal .ring-in { position: absolute; inset: 16px; border: 1px dashed rgba(163,191,136,.4); border-radius: 50%; }
.hero-seal .glyph { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Nanum Myeongjo', serif; font-size: 34px; color: #e7c69c; }
/* HUD 브래킷 + 좌표 */
.hero-hud { position: absolute; z-index: 4; pointer-events: none; }
.hud-tl { top: 84px; left: 28px; width: 26px; height: 26px; border-top: 2px solid rgba(163,191,136,.6); border-left: 2px solid rgba(163,191,136,.6); }
.hud-br { bottom: 92px; right: 28px; width: 26px; height: 26px; border-bottom: 2px solid rgba(213,172,102,.6); border-right: 2px solid rgba(213,172,102,.6); }
.hero-coords {
  position: absolute; top: 92px; right: 36px; z-index: 4; text-align: right; pointer-events: none;
  font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: .2em; line-height: 1.5;
  color: rgba(241,239,227,.45);
}

/* 히어로 캐릭터 스플래시 (장식용 — 클릭 없음, 마우스를 살짝 따라옵니다) */
/* 바깥 래퍼: 마우스 시차(패럴랙스) 담당 / 안쪽 이미지: 둥실 떠다니는 애니메이션 담당
   (둘을 나눠야 transform 애니메이션과 JS 이동이 서로 안 부딪힙니다) */
.hero-art-wrap {
  position: absolute; right: -9vw; bottom: 0; z-index: 2;
  height: 86vh; max-height: 920px;
  pointer-events: none; will-change: transform;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.hero-art {
  height: 100%; width: auto; object-fit: contain; display: block;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.5));
  animation: bds-float 7s ease-in-out infinite;
}
/* 글이 캐릭터 위에서도 잘 보이도록 왼쪽을 어둡게 깔아줍니다 */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(100deg, rgba(11,13,8,.94) 0%, rgba(11,13,8,.66) 44%, rgba(11,13,8,0) 78%);
}

/* 프로필 옆 말풍선 캐릭터 (클릭하면 인사 — 이스터에그) */
.hero-image.profile-char {
  position: relative; z-index: 1;
  display: flex; justify-content: center; align-items: center;
  flex: 1 1 auto; min-height: 300px;
  width: 100%; margin-top: 16px; height: auto; max-height: none; right: auto; bottom: auto;
}
.hero-image.profile-char img {
  /* 창 크기에 따라 캐릭터가 커집니다 (작은 화면 420px ~ 큰 화면 660px) */
  width: auto; max-width: 100%; max-height: clamp(420px, 42vw, 660px); height: auto;
  object-fit: contain; display: block; cursor: pointer;
  filter: drop-shadow(0 22px 40px var(--shadow-hero));
  animation: bds-float 7s ease-in-out infinite;
}

/* 콘텐츠 (왼쪽 아래) */
.hero-inner {
  position: relative; z-index: 5; width: 100%; max-width: 1000px;
  padding: 0 clamp(16px, 5vw, 72px) clamp(96px, 12vh, 120px);
}
.hero-text { text-align: left; }
.hero-eyebrow-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: clamp(28px, 5vh, 52px); animation: bds-in .8s .05s both; }
.hero-live {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: .2em; color: #e7c69c;
  border: 1px solid rgba(231,198,156,.4); border-radius: 2px; padding: 6px 12px;
}
.hero-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff5a4d; display: inline-block; animation: bds-blink 1.4s infinite; box-shadow: 0 0 10px #ff5a4d; }
.hero-eyebrow { margin: 0; font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: .2em; color: rgba(241,239,227,.55); }
.hero-title {
  margin: 0; font-family: 'Gothic A1', sans-serif; font-weight: 900;
  font-size: clamp(72px, 15vw, 210px); line-height: .86; letter-spacing: -.01em;
  color: #fbfaf4; text-shadow: 0 6px 40px rgba(0,0,0,.4); animation: bds-in .9s .12s both;
}
.hero-title .hanja {
  display: block; font-family: 'Nanum Myeongjo', serif; font-weight: 800;
  font-size: .3em; letter-spacing: .3em; color: #e7c69c; margin-top: .15em; animation: bds-glitch 5s infinite;
}
.hero-intro { max-width: 640px; margin: 26px 0 0; font-size: clamp(15px, 1.5vw, 19px); line-height: 1.75; color: rgba(241,239,227,.82); animation: bds-in 1s .22s both; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; animation: bds-in 1s .32s both; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #9cc07a, #6f8f52); color: #0d1109;
  font-family: 'Gothic A1', sans-serif; font-weight: 800; font-size: 16px;
  padding: 16px 30px; border-radius: 4px; text-decoration: none;
  box-shadow: 0 10px 30px rgba(90,120,60,.35);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 42px rgba(90,120,60,.5); color: #0d1109; }
.btn-primary .arrow { font-family: 'Space Mono', monospace; font-weight: 700; font-size: 18px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  color: #f1efe3; border: 1px solid rgba(241,239,227,.4);
  font-family: 'Gothic A1', sans-serif; font-weight: 600; font-size: 15px;
  padding: 16px 30px; border-radius: 4px; text-decoration: none;
  transition: background .25s, border-color .25s, transform .25s;
}
.btn-ghost:hover { background: rgba(241,239,227,.1); border-color: rgba(241,239,227,.75); transform: translateY(-3px); color: #f1efe3; }

/* 스탯 행 (AGE / DEBUT / COLOR + D+일수) */
.hero-stats { display: flex; flex-wrap: wrap; align-items: stretch; margin-top: 44px; border-top: 1px solid rgba(241,239,227,.14); padding-top: 18px; animation: bds-in 1s .42s both; }
.hero-stat { padding: 0 28px; border-right: 1px solid rgba(241,239,227,.14); }
.hero-stat:first-child { padding-left: 0; }
.hero-stat:last-child { border-right: none; }
.hero-stat .k { font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: .18em; color: rgba(241,239,227,.55); }
.hero-stat .v { margin-top: 5px; font-size: 16.5px; color: #fbfaf4; }
.hero-stat .v.gold { font-family: 'Nanum Myeongjo', serif; font-size: 19px; color: #e7c69c; }
.hero-stat .v.mono { font-family: 'Space Mono', monospace; font-size: 17px; }
/* D+ 뱃지 — 클릭하면 함께한 시간 표시 (이스터에그) */
.hero-days {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  margin: 22px 0 0; padding: 7px 14px; border-radius: 2px;
  background: rgba(231,198,156,.08); color: #e7c69c;
  border: 1px solid rgba(231,198,156,.3);
  font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: .08em;
  animation: bds-in 1s .5s both;
}
.hero-days.is-birthday { border-color: #e7c69c; box-shadow: 0 0 0 1px #e7c69c; }

/* ---------- 캐릭터 클릭 이스터에그 ---------- */
.hero-image.is-poked   { animation: squish .45s ease; transform-origin: 50% 100%; }
.hero-image.is-tickled { animation: wiggle .5s ease; transform-origin: 50% 100%; }
@keyframes squish {
  0%   { transform: scale(1, 1); }
  30%  { transform: scale(1.04, .95); }
  60%  { transform: scale(.98, 1.03); }
  100% { transform: scale(1, 1); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-2.4deg); }
  40% { transform: rotate(2.4deg); }
  60% { transform: rotate(-1.8deg); }
  80% { transform: rotate(1.8deg); }
}
/* 말풍선 — 캐릭터 머리 위쪽에 뜹니다 (캐릭터 래퍼 기준) */
.speech-bubble {
  position: absolute; bottom: 74%; left: 50%; transform: translateX(-50%);
  background: #fbfaf4; color: #161309;
  border: 1px solid rgba(231,198,156,.6); border-radius: 14px;
  padding: 12px 18px; font-size: 15px; line-height: 1.5;
  font-family: 'IBM Plex Sans KR', sans-serif;
  max-width: 240px; width: max-content; text-align: center;
  box-shadow: 0 14px 34px rgba(0,0,0,.4);
  z-index: 6; pointer-events: none;
}
.speech-bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 8px solid transparent; border-top-color: #fbfaf4;
}
.speech-bubble.pop { animation: bubblePop .3s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes bubblePop {
  from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.85); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.burst-needle {
  position: absolute; width: 5px; height: 18px;
  pointer-events: none; z-index: 4;
  background: linear-gradient(180deg, #cbb98a, #a3bf88);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: burstFly .7s ease-out forwards;
}
@keyframes burstFly {
  from { opacity: .9; transform: translate(0, 0) rotate(0); }
  to   { opacity: 0; transform: translate(var(--bx), var(--by)) rotate(var(--br)); }
}

/* ---------- 채널 링크 (대표 카드 1개 + 조용한 타일 6개) ----------
   링크가 7개라 전부 브랜드색 카드로 만들면 번잡해서,
   가장 중요한 치지직만 크게 두고 나머지는 아이콘에만 색을 남긴
   차분한 타일로 정리했습니다. */
.banners {
  padding: clamp(64px, 10vh, 120px) clamp(16px, 5vw, 72px);
  background: radial-gradient(120% 100% at 50% 0%, #1c2413 0%, #12160e 50%, #0b0d08 100%);
  color: #f1efe3;
}
.banners-inner { max-width: 1320px; margin: 0 auto; }
.banners .section-eyebrow { color: #a3bf88; }
.banners .section-title { color: #fbfaf4; }
.banners-grid { display: flex; flex-direction: column; gap: 16px; }

/* 대표 카드 — 치지직 */
.banner-featured {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: clamp(24px, 3vw, 40px); border-radius: 8px;
  background: linear-gradient(120deg, #7ea862, #4f6b3d); color: #0d1109;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.banner-featured::after {
  content: "CHZZK"; position: absolute; right: -10px; bottom: -40px;
  font-family: 'Archivo Black', sans-serif; font-size: 200px; line-height: 1; color: rgba(255,255,255,.12);
  pointer-events: none;
}
.banner-featured:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(0,0,0,.4); color: #0d1109; }
.featured-main { position: relative; z-index: 1; }
.featured-live { display: flex; align-items: center; gap: 8px; font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: .2em; }
.featured-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff5a4d; display: inline-block; animation: bds-blink 1.4s infinite; }
.featured-title { display: block; font-family: 'Gothic A1', sans-serif; font-weight: 900; font-size: clamp(28px, 4vw, 44px); margin-top: 8px; }
.featured-sub { display: block; font-size: 14px; opacity: .8; margin-top: 4px; letter-spacing: 0; }
.featured-arrow {
  position: relative; z-index: 1;
  font-family: 'Space Mono', monospace; font-weight: 700; font-size: 14px; letter-spacing: .05em;
  background: #0d1109; color: #eef0e6; border-radius: 4px; padding: 14px 24px;
  transition: transform .25s ease;
}
.banner-featured:hover .featured-arrow { transform: translateX(4px); }
/* 옛 재생 삼각형 아이콘은 대표 카드에선 안 씁니다 */
.featured-icon, .banner-featured .icon-play { display: none; }

/* 나머지 링크 타일 — 어두운 유리 카드 */
.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.link-tile {
  display: block; padding: 24px; border-radius: 6px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(241,239,227,.16); color: #f1efe3;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.link-tile:hover { transform: translateY(-4px); border-color: rgba(163,191,136,.5); background: rgba(255,255,255,.07); color: #f1efe3; }
.tile-code { font-family: 'Archivo Black', sans-serif; font-size: 15px; letter-spacing: .04em; color: #a3bf88; }
.link-tile.support .tile-code { color: #d5ac66; }
.tile-name { display: block; font-size: 15.5px; font-weight: 600; margin-top: 8px; color: #f1efe3; white-space: nowrap; }
.tile-sub { display: block; font-size: 12.5px; color: rgba(241,239,227,.55); margin-top: 5px; letter-spacing: .03em; }
/* 옛 아이콘 칩은 새 타일에선 숨김 */
.tile-icon { display: none; }

/* 주소가 아직 비어 있는 링크는 살짝 흐리게 (클릭해도 이동하지 않음) */
.banner-featured.is-empty, .link-tile.is-empty { opacity: .5; cursor: default; }
.banner-featured.is-empty:hover, .link-tile.is-empty:hover {
  transform: none; box-shadow: none; border-color: rgba(241,239,227,.16); background: rgba(255,255,255,.04);
}

/* ---------- 마퀴 (흐르는 띠) ---------- */
.marquee {
  background: var(--ink); color: var(--bg); overflow: hidden; padding: 16px 0;
  border-top: 1px solid var(--pine); border-bottom: 1px solid var(--pine);
}
.marquee-track {
  display: flex; width: max-content;
  animation: bds-marq 26s linear infinite;
  font-family: 'Nanum Myeongjo', serif; font-size: 22px; letter-spacing: .04em;
}
/* 두 덩어리(group)가 나란히 이어져 -50% 이동 시 이음매가 없습니다.
   각 덩어리는 JS가 화면 폭보다 넓게 문구를 채워 빈 공간이 안 생기게 합니다. */
.marquee-group { display: flex; flex: none; }
.marquee-track span { padding-right: 44px; white-space: nowrap; }
.marquee-track .sep { color: var(--gold); }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- 페이지 입장 애니메이션 (커튼이 위로 걷히며 화면이 드러남) ---------- */
.page-intro {
  position: fixed; inset: 0; z-index: 2000; pointer-events: none;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 40%, #1a2312 0%, #0b0d08 70%);
  animation: introLift .85s cubic-bezier(.76, 0, .24, 1) .8s forwards;
}
.page-intro .seal {
  width: 78px; height: 78px; display: grid; place-items: center;
  border: 2px solid #a3bf88; color: #e7c69c; border-radius: 6px;
  font-family: 'Nanum Myeongjo', serif; font-weight: 800; font-size: 42px;
  box-shadow: 0 0 40px rgba(231,198,156,.25);
  animation: introSeal 1s cubic-bezier(.2, .7, .2, 1) forwards;
}
.page-intro .wordmark {
  position: absolute; top: calc(50% + 66px); left: 0; right: 0; text-align: center;
  font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: .38em;
  color: rgba(241,239,227,.55); text-indent: .38em;
  animation: introWord 1s ease .18s both;
}
@keyframes introSeal {
  0%   { opacity: 0; transform: translateY(14px) scale(.72) rotate(-9deg); }
  45%  { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes introWord {
  from { opacity: 0; letter-spacing: .18em; }
  to   { opacity: 1; letter-spacing: .38em; }
}
@keyframes introLift { to { transform: translateY(-100%); visibility: hidden; } }
/* 이미 애니메이션이 끝나 걷힌 경우(자바스크립트 대비) 완전히 숨김 */
.page-intro.is-done { display: none; }

/* ---------- 공통 섹션 제목 (기술적 헤더) ---------- */
.section-head {
  display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 48px;
}
.section-eyebrow {
  font-family: 'Space Mono', monospace; font-style: normal;
  letter-spacing: 0.22em; color: var(--pine-deep); font-size: 13px; margin: 0;
}
.section-title {
  font-family: 'Gothic A1', sans-serif; font-weight: 900;
  font-size: clamp(38px, 6vw, 80px); line-height: .9; margin: 0; color: var(--ink);
}
.section-desc { margin: 0 0 8px; color: var(--sub); font-size: 14px; max-width: 380px; }

/* ---------- 프로필 ---------- */
.profile { padding: clamp(64px, 10vh, 120px) clamp(16px, 5vw, 72px); background: var(--bg); }
.profile-inner { max-width: 1320px; margin: 0 auto; }
.profile-body {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 3vw, 48px); align-items: stretch;
}
/* 포트레이트 카드 (클릭하면 크게) */
.profile-image { position: relative; }
.profile-portrait {
  position: relative; overflow: hidden; aspect-ratio: 3/4;
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: 6px;
}
.profile-portrait::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(80% 60% at 50% 20%, color-mix(in srgb, var(--dawn) 40%, transparent), transparent 70%);
}
.profile-image img {
  position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain;
  cursor: zoom-in; display: block;
}
.portrait-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: 'Space Mono', monospace; font-size: 11.5px; letter-spacing: .16em; color: var(--sub);
}
.portrait-br { position: absolute; z-index: 2; }
.portrait-br.tr { top: 12px; right: 12px; width: 18px; height: 18px; border-top: 1.5px solid var(--pine); border-right: 1.5px solid var(--pine); }
.portrait-br.bl { bottom: 12px; left: 12px; width: 18px; height: 18px; border-bottom: 1.5px solid var(--gold); border-left: 1.5px solid var(--gold); }

/* 일러스트 위 "크게 보기" 안내 */
.zoom-hint {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 3px;
  background: color-mix(in srgb, var(--bg) 80%, transparent); color: var(--ink-soft);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: 0.06em; pointer-events: none;
  opacity: 0; transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}
.zoom-hint svg { width: 14px; height: 14px; }
.profile-image:hover .zoom-hint, .profile-image img:focus-visible + .zoom-hint { opacity: 1; transform: translateY(0); }
@media (hover: none) { .zoom-hint { opacity: 1; transform: translateY(0); } }

/* 스펙 그리드 (포트레이트 아래) */
.profile-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-top: none;
  border-radius: 0 0 6px 6px; overflow: hidden;
}
.profile-field { background: var(--panel); padding: 13px 15px; }
.profile-field .label { margin: 0; font-family: 'Space Mono', monospace; font-size: 11.5px; letter-spacing: 0.14em; color: var(--sub); }
.profile-field .value { margin: 4px 0 0; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.45; }

.profile-info { display: flex; flex-direction: column; gap: 20px; }

/* 설정 요약 카드 */
.profile-summary {
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
}
.profile-summary:empty { display: none; }
.profile-summary .label {
  margin: 0 0 12px; font-family: 'Space Mono', monospace; font-size: 13px; letter-spacing: 0.2em; color: var(--pine-deep);
}
.profile-summary .value { margin: 0; font-size: 15.5px; line-height: 1.9; color: var(--ink-soft); }
.summary-link {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 14px;
  font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: 0.06em;
  color: var(--pine-deep); text-decoration: none;
}
.summary-link span { transition: transform .2s ease; }
.summary-link:hover { color: var(--gold); }
.summary-link:hover span { transform: translateX(4px); }

/* 방송을 시작한 이유 카드 (松) */
.profile-reason {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--green-deep), color-mix(in srgb, var(--green-deep) 70%, #000));
  color: #f3f1e6; border-radius: 6px; padding: clamp(22px, 2.6vw, 34px);
}
.profile-reason::before {
  content: "松"; position: absolute; top: -30px; right: -10px;
  font-family: 'Nanum Myeongjo', serif; font-size: 150px; line-height: 1; opacity: .12;
}
.profile-reason .label { position: relative; margin: 0 0 14px; font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: 0.22em; color: var(--dawn); }
.profile-reason .value {
  position: relative; margin: 0; font-family: 'Nanum Myeongjo', serif;
  font-size: clamp(18px, 2vw, 23px); line-height: 1.7; color: #f3f1e6;
}

/* likes / dislikes 태그 카드 */
.profile-cards { grid-column: 1 / -1; margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.profile-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 22px;
}
.profile-card.likes { border-top: 3px solid var(--pine); }
.profile-card.dislikes { border-top: 3px solid var(--sub); }
.profile-card .label { margin: 0 0 14px; font-family: 'Space Mono', monospace; font-size: 12.5px; letter-spacing: 0.16em; }
.profile-card.likes .label { color: var(--pine-deep); }
.profile-card.dislikes .label { color: var(--sub); }
.profile-card .value { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.profile-card .value .tag { font-size: 14px; padding: 7px 14px; background: var(--bg2); border-radius: 20px; color: var(--ink); }

/* ---------- 규칙 및 공지 ---------- */
.rules { padding: clamp(64px, 10vh, 120px) clamp(16px, 5vw, 72px); background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rules-inner { max-width: 1320px; margin: 0 auto; text-align: left; }
.rules-inner .section-head { margin-bottom: 44px; }
.rules-box { padding: 0; background: transparent; border: none; }
.rules-mark {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid var(--green-mid); margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center;
}
.rules-mark span {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--green-mid); margin-bottom: 10px;
}
.rules-title { margin: 0 0 8px; font-size: 20px; color: var(--ink-soft); font-weight: 500; text-align: center; }
.rules-text { margin: 0; font-size: 14px; color: var(--green-mid); text-align: center; }

.rules-list { list-style: none; margin: 0; padding: 0; text-align: left; counter-reset: rule-num; }
.rules-list li {
  counter-increment: rule-num;
  display: flex; gap: 18px; align-items: center;
  font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--ink);
  padding: 18px 6px; border-top: 1px solid var(--line);
  transition: background-color .2s ease;
}
.rules-list li:first-child { border-top: none; }
.rules-list li:last-child { border-bottom: 1px solid var(--line); }
.rules-list li:hover { color: var(--pine-deep); }
.rules-list li::before {
  content: "0" counter(rule-num);
  font-family: 'Archivo Black', sans-serif; font-size: 24px; color: var(--pine);
  flex-shrink: 0; width: 40px; text-align: left;
}
.rules-detail-btn {
  margin: 28px 0 0; display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 3px;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink);
  font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: 0.1em; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.rules-detail-btn:hover { background: var(--panel2); border-color: var(--pine); color: var(--pine-deep); }

/* ---------- 상세 규칙 팝업 ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 13, 7, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; transition: opacity .22s ease;
}
.modal-overlay.is-open { opacity: 1; }
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative; width: 100%; max-width: 560px; max-height: 82vh;
  overflow-y: auto; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 40px 36px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  transform: scale(.96) translateY(10px);
  transition: transform .25s cubic-bezier(.16, .84, .44, 1);
}
.modal-overlay.is-open .modal { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 4px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink-soft); cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.modal-close:hover { background: var(--panel2); transform: rotate(90deg); }
.modal-close svg { width: 16px; height: 16px; display: block; }
.modal-eyebrow {
  font-family: 'Space Mono', monospace; font-style: normal;
  letter-spacing: 0.2em; color: var(--pine-deep); font-size: 12px; margin: 0 0 8px;
}
.modal-title { font-family: 'Gothic A1', sans-serif; font-size: 26px; margin: 0 0 22px; font-weight: 900; }
.modal-rules { list-style: none; margin: 0; padding: 0; counter-reset: modal-rule-num; }
.modal-rules li {
  counter-increment: modal-rule-num;
  position: relative; padding: 16px 0 16px 40px;
  border-bottom: 1px solid var(--green-line);
}
.modal-rules li:last-child { border-bottom: none; }
.modal-rules li::before {
  content: counter(modal-rule-num);
  position: absolute; left: 0; top: 16px;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  background: var(--green-tint); color: var(--green-deep);
}
.modal-rules strong { display: block; font-size: 16px; margin-bottom: 6px; color: var(--ink); }
.modal-rules p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }

/* ---------- 방송 일정 ---------- */
.schedule { padding: clamp(64px, 10vh, 120px) clamp(16px, 5vw, 72px); background: var(--bg); }
.schedule-inner { max-width: 1320px; margin: 0 auto; }
.schedule-inner .section-head { margin-bottom: 14px; }
.schedule-note { font-size: 14px; color: var(--sub); letter-spacing: 0.02em; margin: 0 0 40px; }
.schedule-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.schedule-card {
  position: relative; padding: 22px 14px; text-align: center; background: var(--panel);
  transition: background .25s ease;
}
.schedule-card:nth-child(even) { background: var(--panel2); }
.schedule-card:hover { background: var(--panel2); }
.schedule-card.today { border-top: 3px solid var(--gold); }
.today-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 9px; border-radius: 3px;
  font-family: 'Space Mono', monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  background: var(--gold); color: #2c2415;
}
.schedule-card .day { margin: 0 0 10px; font-family: 'Gothic A1', sans-serif; font-weight: 900; font-size: 18px; color: var(--sub); }
.schedule-card.today .day { color: var(--gold); }
.schedule-card .time { margin: 0 0 5px; font-family: 'Space Mono', monospace; font-size: 16px; font-weight: 700; color: var(--pine-deep); }
.schedule-card .note { margin: 0; font-size: 13px; color: var(--sub); }

/* ---------- 메인 페이지 "더 둘러보기" ---------- */
.more { padding: clamp(64px, 10vh, 120px) clamp(16px, 5vw, 72px); background: var(--bg-alt); border-top: 1px solid var(--line); }
.more-inner { max-width: 1320px; margin: 0 auto; }
.more-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px;
}
.more-card {
  position: relative; display: block;
  padding: 28px 26px 32px; border-radius: 6px;
  background: var(--panel); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.more-card:hover {
  transform: translateY(-5px); border-color: var(--pine);
  box-shadow: 0 18px 34px var(--shadow-soft);
}
.more-eyebrow {
  font-family: 'Space Mono', monospace; font-style: normal;
  letter-spacing: 0.18em; color: var(--pine-deep); font-size: 12px; margin: 0 0 10px;
}
.more-title { margin: 0 0 10px; font-family: 'Gothic A1', sans-serif; font-size: 22px; font-weight: 900; }
.more-desc { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.more-arrow {
  position: absolute; right: 22px; bottom: 20px;
  color: var(--pine); font-family: 'Space Mono', monospace; font-size: 18px;
  transition: transform .25s ease, color .25s ease;
}
.more-card:hover .more-arrow { transform: translateX(5px); color: var(--gold); }

/* ================================================================
   하위 페이지 공통 (룰렛 / 명령어 / 발자취 / 이벤트)
   메인 첫 화면과 같은 결을 유지하되, 높이는 낮게 잡았습니다.
   ================================================================ */
.page-hero {
  position: relative; overflow: hidden;
  padding: clamp(112px, 16vh, 168px) clamp(16px, 5vw, 72px) clamp(48px, 8vh, 72px);
  text-align: left;
  background: radial-gradient(130% 120% at 88% 0%, #1c2413 0%, var(--bg) 46%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.page-hero .hero-glow { width: 460px; height: 460px; top: -24%; right: 4%; }
.page-hero-inner { position: relative; z-index: 2; max-width: 1320px; margin: 0 auto; }
.page-eyebrow {
  font-family: 'Space Mono', monospace; font-style: normal;
  letter-spacing: 0.24em; color: var(--pine-deep); font-size: 12px; margin: 0 0 14px;
  opacity: 0; animation: bds-in .8s .05s forwards;
}
.page-title {
  font-family: 'Gothic A1', sans-serif; font-weight: 900;
  font-size: clamp(44px, 8vw, 96px); line-height: .9; margin: 0 0 18px; color: var(--ink);
  opacity: 0; animation: bds-in .8s .12s forwards;
}
.page-desc {
  margin: 0; font-size: clamp(15px, 1.5vw, 17px); line-height: 1.8; color: var(--ink-soft); max-width: 640px;
  opacity: 0; animation: bds-in .8s .22s forwards;
}
.page-note {
  margin: 16px 0 0; font-family: 'Space Mono', monospace; font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em;
  opacity: 0; animation: bds-in .8s .3s forwards;
}
.page-note:empty { display: none; }
.page-body { padding: clamp(56px, 9vh, 96px) clamp(16px, 5vw, 72px) clamp(72px, 12vh, 110px); background: var(--bg); }
.page-inner { max-width: 1080px; margin: 0 auto; }
.page-inner-narrow { max-width: 820px; }

/* "업데이트 예정" 안내 (룰렛/명령어/이벤트가 비었을 때) */
.placeholder-box {
  border: 1px dashed var(--dashed-border); border-radius: 8px;
  padding: 56px 44px; background: var(--panel); text-align: center;
}

/* ================================================================
   룰렛 페이지
   ================================================================ */
.roulette-list { display: flex; flex-direction: column; gap: 32px; }
.roulette-card {
  border: 1px solid var(--green-line); border-radius: 22px;
  background: var(--bg-panel); padding: 36px 34px;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.roulette-card:hover { border-color: var(--green-mid); box-shadow: 0 18px 34px var(--shadow-soft); }
.roulette-head { margin-bottom: 28px; }
.roulette-eyebrow {
  font-family: 'Space Mono', monospace; font-style: normal;
  letter-spacing: 0.18em; color: var(--green-label); font-size: 13px; margin: 0 0 6px;
}
.roulette-name { margin: 0 0 10px; font-size: 26px; font-weight: 600; color: var(--ink); }
.roulette-desc { margin: 0 0 16px; font-size: 15px; line-height: 1.8; color: var(--ink-soft); max-width: 620px; }
.roulette-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.meta-chip {
  display: inline-flex; align-items: center;
  padding: 7px 16px; border-radius: 999px;
  font-size: 13.5px; letter-spacing: 0.03em;
}
.meta-amount { background: var(--green-deep); color: var(--on-dark); }
.meta-keyword {
  background: var(--green-tint); color: var(--green-deep);
  border: 1px solid var(--green-line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
[data-theme-active="dark"] .meta-keyword { color: var(--green-dark); }

.roulette-body { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }

/* ---- 룰렛 판 ---- */
.wheel-wrap {
  position: relative; flex: 0 0 240px;
  display: flex; flex-direction: column; align-items: center;
}
.wheel {
  width: 240px; height: 240px; border-radius: 50%;
  box-shadow: 0 14px 30px var(--shadow-soft), inset 0 0 0 6px var(--bg);
  transform: rotate(0deg);
}
.wheel-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 3;
  border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-top: 16px solid var(--gold);
  filter: drop-shadow(0 2px 3px var(--shadow-soft));
}
.wheel-hub {
  position: absolute; top: 120px; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--green-line);
  box-shadow: 0 4px 10px var(--shadow-soft); pointer-events: none;
}
.wheel-spin {
  margin-top: 20px; padding: 10px 26px; border-radius: 999px;
  border: 1px solid var(--green-mid); background: transparent;
  color: var(--green-label); font-family: inherit;
  font-size: 14px; letter-spacing: 0.04em; cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.wheel-spin:hover:not(:disabled) { background: var(--green-tint); transform: translateY(-2px); }
.wheel-spin:disabled { opacity: .5; cursor: default; }
.wheel-result {
  margin: 12px 0 0; min-height: 24px;
  font-size: 15px; font-weight: 600; color: var(--ink); text-align: center;
}
/* 말풍선(bubblePop)과 달리 이 글자는 가운데 정렬된 평범한 요소라
   translateX(-50%)를 넣으면 안 됩니다. (넣으면 나타나는 동안 왼쪽으로 밀립니다) */
.wheel-result.pop { animation: resultPop .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes resultPop {
  from { opacity: 0; transform: translateY(8px) scale(.85); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- 아이템 목록 + 확률 막대 ---- */
.roulette-items { flex: 1 1 320px; list-style: none; margin: 0; padding: 0; }
.roulette-item {
  display: grid; grid-template-columns: 12px 1fr 90px 52px;
  gap: 12px; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--green-line);
}
.roulette-item:last-child { border-bottom: none; }
.ri-swatch { width: 12px; height: 12px; border-radius: 3px; }
.ri-name { font-size: 15px; color: var(--ink); }
.ri-bar {
  height: 6px; border-radius: 999px; background: var(--green-line); overflow: hidden;
}
.ri-bar i { display: block; height: 100%; border-radius: 999px; }
.ri-pct {
  font-size: 13.5px; color: var(--green-label); text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ================================================================
   명령어 페이지
   ================================================================ */
.commands-toolbar {
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap;
}
.search-field {
  flex: 1 1 260px; display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px;
  background: var(--bg-panel); border: 1px solid var(--green-line);
  transition: border-color .2s ease;
}
.search-field:focus-within { border-color: var(--green-mid); }
.search-field svg { width: 17px; height: 17px; color: var(--green-mid); flex-shrink: 0; }
.search-field input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-family: inherit; font-size: 15px; color: var(--ink);
}
.search-field input::placeholder { color: var(--text-muted); }
.commands-count { font-size: 13px; color: var(--green-label); letter-spacing: 0.05em; }

.commands-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.command-card {
  display: flex; gap: 16px; align-items: baseline;
  padding: 18px 22px; border-radius: 14px;
  background: var(--bg-panel); border: 1px solid var(--green-line);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.command-card:hover {
  transform: translateY(-3px); border-color: var(--green-mid);
  box-shadow: 0 12px 24px var(--shadow-soft);
}
.command-key { margin: 0; flex-shrink: 0; }
.command-key code {
  display: inline-block; padding: 5px 12px; border-radius: 8px;
  background: var(--green-tint); color: var(--green-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
[data-theme-active="dark"] .command-key code { color: var(--green-dark); }
.command-desc { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); }
.commands-empty {
  margin: 40px 0 0; text-align: center;
  font-size: 15px; color: var(--text-muted);
}

/* ================================================================
   발자취 페이지 — 기록이 길어져도 보기 좋도록 연도별로 묶습니다
   ================================================================ */
.timeline-filter {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 48px;
}
.timeline-filter:empty { display: none; }
.year-chip {
  padding: 8px 20px; border-radius: 999px;
  border: 1px solid var(--green-line); background: transparent;
  color: var(--ink-soft); font-family: inherit;
  font-size: 13.5px; letter-spacing: 0.05em; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.year-chip:hover { background: var(--green-tint); border-color: var(--green-mid); }
.year-chip.is-active {
  background: var(--green-deep); border-color: var(--green-deep); color: var(--on-dark);
}

.timeline-group { margin-bottom: 24px; }
.timeline-group[hidden] { display: none; }
.timeline-year {
  display: flex; align-items: center; gap: 12px;
  position: sticky; top: 76px; z-index: 10;
  margin: 0 0 26px; padding: 10px 0;
  background: var(--bg);
}
.timeline-year .year-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px; font-weight: 600; letter-spacing: 0.06em; color: var(--green);
}
.timeline-year .year-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px;
  background: var(--green-tint); color: var(--green-label);
  font-family: 'Noto Serif KR', serif; font-size: 12px; font-weight: 500;
}
.timeline-year::after {
  content: ""; flex: 1; height: 1px; background: var(--green-line);
}

.timeline { position: relative; padding-left: 40px; }
.timeline-line {
  position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--green-mid), var(--green-line));
}
.timeline-item {
  position: relative; padding: 0 0 34px;
}
.timeline-dot {
  position: absolute; left: -40px; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--green-mid);
  border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--green-mid);
}
/* 가장 최근 기록만 금색으로 강조합니다 */
.timeline-item.is-latest .timeline-dot {
  background: var(--gold); box-shadow: 0 0 0 2px var(--gold);
  animation: goldPulse 2.4s ease-in-out infinite;
}
.timeline-date { margin: 0 0 6px; font-size: 13px; letter-spacing: 0.08em; color: var(--green-label); }
.timeline-title { margin: 0; font-size: 19px; color: var(--ink); font-weight: 500; }
.timeline-desc { margin: 8px 0 0; font-size: 14.5px; line-height: 1.75; color: var(--ink-soft); }
.latest-badge {
  display: inline-block; margin-left: 8px; vertical-align: 2px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
  background: var(--gold); color: #2c2415;
}

/* ================================================================
   이벤트 페이지 — 이벤트 하나가 카드 하나 (항상 짙은 초록 배경)
   ================================================================ */
.events-list { display: flex; flex-direction: column; gap: 32px; }
.event-card {
  position: relative;
  display: flex; gap: 48px; align-items: center; flex-wrap: wrap;
  padding: 44px 44px; border-radius: 24px;
  background: var(--green-deep); color: var(--on-dark);
  box-shadow: 0 18px 40px var(--shadow-soft);
}
/* 카드가 여러 개일 때 지루하지 않도록 짝수 번째는 이미지를 오른쪽에 둡니다 */
.event-card.is-flipped { flex-direction: row-reverse; }
.event-image { flex: 1 1 300px; max-width: 360px; }
.event-image img { width: 100%; border-radius: 18px; box-shadow: 0 24px 48px var(--shadow-strong); display: block; }
.event-info { flex: 1 1 340px; min-width: 0; }
.event-status {
  display: inline-block; margin-bottom: 12px;
  padding: 5px 14px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em;
}
.event-status.is-live { background: var(--gold); color: #2c2415; }
.event-status.is-soon { background: rgba(255,255,255,0.18); color: var(--on-dark); }
.event-status.is-ended { background: rgba(255,255,255,0.1); color: var(--on-dark-faint); }
.event-title { margin: 0 0 18px; font-size: 24px; font-weight: 600; color: var(--on-dark); }
.event-number {
  font-family: 'Cormorant Garamond', serif; font-size: 46px;
  margin: 0 0 4px; color: var(--on-dark-soft); letter-spacing: 0.05em;
}
.event-number .suffix { font-size: 22px; }
.event-label { margin: 0 0 28px; font-size: 15px; letter-spacing: 0.15em; color: var(--on-dark-soft); }
.event-perks { display: flex; flex-direction: column; gap: 18px; }
.event-perk { display: flex; gap: 16px; align-items: flex-start; }
.event-perk::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--on-dark-soft); margin-top: 8px; flex-shrink: 0;
}
.event-perk p { margin: 0; font-size: 17px; line-height: 1.7; }
.event-footnote { margin: 32px 0 0; font-size: 13px; color: var(--on-dark-faint); }

/* ---------- 푸터 (항상 짙은 무대) ---------- */
.footer {
  background: #0b0d08; color: rgba(241,239,227,.6);
  padding: 56px clamp(16px, 5vw, 72px) 40px; border-top: 1px solid #2a3122;
}
.footer-inner {
  max-width: 1320px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; color: #f1efe3; }
.footer-brand .seal {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1.5px solid #7f9a6a; color: #a3bf88;
  font-family: 'Nanum Myeongjo', serif; font-weight: 800; border-radius: 3px;
}
.footer-logo { margin: 0; font-family: 'Gothic A1', sans-serif; font-weight: 900; font-size: 18px; color: #f1efe3; }
.footer-logo .hanja { font-family: 'Nanum Myeongjo', serif; color: #d5ac66; }
.footer-tagline { margin: 16px 0 0; font-size: 13px; line-height: 1.7; max-width: 420px; }
.footer-meta { text-align: right; font-family: 'Space Mono', monospace; font-size: 12px; letter-spacing: 0.1em; line-height: 1.95; }
.footer-links { display: flex; gap: 16px; justify-content: flex-end; margin-bottom: 12px; flex-wrap: wrap; }
.footer-links a { color: rgba(241,239,227,.6); text-decoration: none; font-size: 12px; }
.footer-links a:hover { color: #a3bf88; }
.footer-copy { margin: 0; opacity: .6; }
.footer-top {
  display: inline-block; margin-top: 12px; color: #a3bf88;
  border: 1px solid rgba(163,191,136,.4); border-radius: 3px; padding: 7px 14px; text-decoration: none;
}
.footer-top:hover { color: #d5ac66; border-color: rgba(213,172,102,.5); }

/* ================================================================
   설정집 페이지 — 책처럼 읽히는 긴 글
   ================================================================ */

/* 장 목차 */
.lore-toc {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-bottom: 72px;
}
.lore-toc a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--green-line); background: transparent;
  color: var(--ink-soft); text-decoration: none;
  font-size: 13.5px; letter-spacing: 0.03em;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.lore-toc a .toc-num {
  font-size: 12px; color: var(--green-mid);
  transition: color .2s ease;
}
.lore-toc a:hover { background: var(--green-tint); border-color: var(--green-mid); }
.lore-toc a.active {
  background: var(--green-deep); border-color: var(--green-deep); color: var(--on-dark);
}
.lore-toc a.active .toc-num { color: var(--on-dark-soft); }

/* 장 — 요약 카드 목록 (세부 설정은 버튼을 눌러 팝업으로) */
#lore-chapters { display: flex; flex-direction: column; gap: 22px; max-width: 720px; margin: 0 auto; }
.lore-chapter {
  scroll-margin-top: 96px;
  padding: 34px 36px;
  background: var(--bg-panel); border: 1px solid var(--green-line);
  border-radius: 20px;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.lore-chapter:hover { border-color: var(--green-mid); box-shadow: 0 14px 30px var(--shadow-soft); }
.lore-chapter-head {
  display: flex; align-items: baseline; gap: 16px;
  margin: 0 0 20px;
}
.lore-num {
  font-size: 36px; line-height: 1; font-weight: 400;
  color: var(--green-mid); opacity: .85; flex-shrink: 0;
}
.lore-title { margin: 0; font-size: 23px; font-weight: 600; color: var(--ink); }

/* 요약 본문 */
.lore-summary p {
  margin: 0 0 16px; font-size: 15px; line-height: 1.95; color: var(--ink-soft);
}
.lore-summary p:last-child { margin-bottom: 0; }

/* 세부 설정 보기 버튼 */
.lore-more-btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 22px; padding: 10px 22px;
  border: 1px solid var(--green-mid); border-radius: 999px;
  background: transparent; color: var(--green-label);
  font-family: inherit; font-size: 14px; letter-spacing: 0.02em; cursor: pointer;
  transition: background-color .2s ease, transform .2s ease, color .2s ease;
}
.lore-more-btn svg { width: 15px; height: 15px; transition: transform .2s ease; }
.lore-more-btn:hover { background: var(--green-tint); transform: translateY(-2px); }
.lore-more-btn:hover svg { transform: translateX(3px); }

/* 세부 설정 팝업 — 한 장의 내용만 스크롤로 읽습니다 */
.lore-modal { max-width: 640px; }
.lore-modal-overlay .modal-eyebrow #lore-modal-num,
.lore-modal .modal-eyebrow span { margin-right: 4px; }
#lore-modal-body { max-height: none; }
/* 팝업 안에서는 글이 바로 시작하므로 첫 요소 위 여백을 줄입니다 */
#lore-modal-body > :first-child { margin-top: 0; }
#lore-modal-body .lore-sub:first-child { margin-top: 4px; }

/* 본문 타이포그래피 — 천천히 읽히도록 행간을 넉넉하게 */
.lore-body p {
  margin: 0 0 26px; font-size: 15.5px; line-height: 2.05;
  color: var(--ink-soft);
}
.lore-body blockquote {
  margin: 36px 0; padding: 22px 28px;
  border-left: 3px solid var(--green-mid);
  background: var(--bg-panel); border-radius: 0 14px 14px 0;
  font-style: italic; font-size: 16px; line-height: 2.1; color: var(--ink);
}
.lore-sub {
  display: flex; align-items: center; gap: 12px;
  margin: 46px 0 18px; font-size: 17.5px; font-weight: 600; color: var(--ink);
}
.lore-sub::before {
  content: ""; width: 20px; height: 1.5px; background: var(--green-mid); flex-shrink: 0;
}
/* 이름 공개처럼 특별한 순간 — 크게 가운데 표시 */
.lore-display {
  text-align: center; margin: 48px 0 8px;
  font-size: 36px; font-weight: 600; letter-spacing: 0.14em; color: var(--ink);
}
.lore-caption {
  text-align: center; margin: 0 0 10px;
  font-size: 14px; letter-spacing: 0.16em; color: var(--green-label);
}
/* 큰 표시 바로 아래 첫 줄(白旦松)은 한자답게 더 크게 */
.lore-display + .lore-caption { font-size: 23px; letter-spacing: 0.3em; color: var(--green); }

/* 정보 목록 ("이름 : 값" 꼴은 라벨/값으로 나뉘어 표시) */
.lore-body ul { list-style: none; margin: 0 0 30px; padding: 0; border-top: 1px solid var(--green-line); }
.lore-body li {
  display: flex; gap: 16px; align-items: baseline;
  padding: 11px 4px; border-bottom: 1px solid var(--green-line);
  font-size: 15px; line-height: 1.7; color: var(--ink-soft);
}
.lore-body li .li-key {
  flex: 0 0 158px; font-size: 13px; letter-spacing: 0.06em;
  color: var(--green-label);
}

/* ================================================================
   후원 리액션 페이지
   ================================================================ */
.donation-tiers { display: flex; flex-direction: column; gap: 14px; }
.tier {
  display: flex; gap: 22px; align-items: flex-start;
  padding: 20px 24px; border-radius: 16px;
  background: var(--bg-panel); border: 1px solid var(--green-line);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.tier:hover {
  transform: translateY(-3px); border-color: var(--green-mid);
  box-shadow: 0 12px 26px var(--shadow-soft);
}
.tier-amount {
  flex: 0 0 104px; text-align: center;
  padding: 8px 0; border-radius: 999px;
  background: var(--green-deep); color: var(--on-dark);
  font-size: 14px; letter-spacing: 0.02em;
}
.tier-body { min-width: 0; padding-top: 4px; }
.tier-reaction { margin: 0; font-size: 15.5px; line-height: 1.75; color: var(--ink); }
.tier-note { margin: 7px 0 0; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
/* 최고 티어는 금색으로 특별하게 */
.tier-gold { border-color: var(--gold); }
.tier-gold:hover { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 12px 26px var(--shadow-soft); }
.tier-gold .tier-amount { background: var(--gold); color: #2c2415; font-weight: 600; }

/* 수위 규칙 (팝업의 번호 목록과 같은 결) */
.donation-rules-wrap, .donation-notes-wrap { margin-top: 88px; }
.section-title-sm { font-size: 27px; }
.numbered-rules { list-style: none; margin: 0; padding: 0; counter-reset: d-rule; }
.numbered-rules li {
  counter-increment: d-rule;
  position: relative; padding: 20px 0 20px 44px;
  border-bottom: 1px solid var(--green-line);
}
.numbered-rules li:last-child { border-bottom: none; }
.numbered-rules li::before {
  content: counter(d-rule);
  position: absolute; left: 0; top: 20px;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 600;
  background: var(--green-tint); color: var(--green-deep);
}
[data-theme-active="dark"] .numbered-rules li::before { color: var(--green-dark); }
.numbered-rules strong { display: block; font-size: 16.5px; margin-bottom: 8px; color: var(--ink); }
.numbered-rules p { margin: 0; font-size: 14.5px; line-height: 1.85; color: var(--ink-soft); }

/* 공통 안내 (점선 상자 안 목록) */
.notes-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.notes-list li {
  position: relative; padding: 10px 4px 10px 24px;
  font-size: 14.5px; line-height: 1.8; color: var(--ink-soft);
}
.notes-list li::before {
  content: ""; position: absolute; left: 4px; top: 21px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green-mid);
}

/* ================================================================
   이스터에그
   ================================================================ */

/* ---------- 토스트 알림 (화면 아래 가운데에 잠깐 나타나는 말) ---------- */
.bds-toast {
  position: fixed; left: 50%; bottom: 34px;
  transform: translateX(-50%) translateY(14px);
  z-index: 140; max-width: min(440px, calc(100vw - 48px));
  padding: 12px 22px; border-radius: 999px;
  background: var(--bg-panel); color: var(--ink);
  border: 1px solid var(--green-line);
  box-shadow: 0 14px 30px var(--shadow-soft);
  font-size: 14px; line-height: 1.6; text-align: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.bds-toast.is-visible { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.bds-toast.is-gold { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 14px 30px var(--shadow-soft); }

/* ---------- 금색 솔잎 (희귀 당첨·코나미 코드·생일 축하용) ---------- */
.needle-gold { background: linear-gradient(180deg, #e8d5a8, var(--gold)); }

/* ---------- 룰렛: 확률 1% 이하 희귀 아이템 강조 ---------- */
.ri-pct.ri-rare { color: var(--gold); font-weight: 600; }
.wheel-result.is-rare { color: var(--gold); }

/* ---------- 명령어 검색창의 숨은 대답 ---------- */
.commands-empty.is-secret { color: var(--green); font-weight: 500; }

/* ---------- 발자취 금색 점 클릭 반응 ---------- */
.timeline-item.is-latest .timeline-dot { cursor: pointer; }
.timeline-dot.is-ringing {
  animation: goldPulse 2.4s ease-in-out infinite, dotRing .6s ease;
}
@keyframes dotRing {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.55); }
  100% { transform: scale(1); }
}

/* ---------- 생일 모드 뱃지 + D+ 뱃지 클릭 가능 표시 ---------- */
.hero-days { cursor: pointer; }
.hero-days.is-birthday {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

/* ---------- 프로필 일러스트 크게 보기 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(10, 13, 7, 0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px; cursor: zoom-out;
  opacity: 0; transition: opacity .25s ease;
}
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(1100px, 100%); max-height: 100%;
  width: auto; height: auto; object-fit: contain;
  border-radius: 12px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  transform: scale(.94); transition: transform .3s cubic-bezier(.16, .84, .44, 1);
}
.lightbox.is-open img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 22px; right: 22px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.1);
  color: #fdfdfb; cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); transform: rotate(90deg); }
.lightbox-close svg { width: 18px; height: 18px; display: block; }

/* ---------- 맨 위로 버튼 ---------- */
.back-to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--green-mid); background: var(--bg);
  color: var(--green-label); cursor: pointer;
  box-shadow: 0 12px 26px var(--shadow-soft);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s, background-color .2s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--green-tint); }
.back-to-top svg { width: 20px; height: 20px; display: block; }

/* ---------- 키보드 포커스 표시 ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--green-mid); outline-offset: 3px; border-radius: 4px;
}

/* ================================================================
   태블릿·좁은 노트북 대응
   ================================================================ */

/* 배너 5개: 넓은 화면은 한 줄, 그보다 좁아지면 칸 수를 줄입니다 */
@media (max-width: 1100px) {
  .links-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 메뉴가 7개라 좁아지면 간격을 줄여 한 줄에 유지합니다 */
@media (max-width: 1180px) {
  .nav { padding: 18px 28px; }
  .nav-links { gap: 22px; }
  .nav-links a { font-size: 13.5px; }
}
@media (max-width: 980px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }
  .nav-cta { padding: 8px 14px; font-size: 12px; }
  .nav-right { gap: 10px; }
}

@media (max-width: 900px) {
  .roulette-body { gap: 28px; justify-content: center; }
  .commands-list { grid-template-columns: 1fr; }
  /* 이벤트 카드가 세로로 쌓이면 좌우 번갈아 배치는 의미가 없습니다 */
  .event-card, .event-card.is-flipped { flex-direction: column; align-items: stretch; gap: 32px; }
  .event-image { max-width: 100%; }
}

/* ================================================================
   모바일 대응
   ================================================================ */
@media (max-width: 900px) { .nav-logo .logo-en { display: none; } }
@media (max-width: 720px) {
  .nav { padding: 12px 18px; }
  .menu-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-nav); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; padding: 0 20px;
    transition: max-height .3s ease, padding .3s ease;
  }
  /* 메뉴 항목이 많아서 열렸을 때 화면 높이만큼 쓰고, 넘치면 스크롤합니다 */
  .nav-links.is-open { max-height: calc(100vh - 70px); overflow-y: auto; padding: 8px 20px 18px; }
  .nav-links a {
    padding: 13px 2px; border-bottom: 1px solid var(--border-soft);
    font-size: 15.5px;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a::after { display: none; }

  /* 드롭다운 묶음 → 작은 제목 아래 늘 펼쳐진 목록으로 */
  .nav-group { position: static; }
  .nav-group-btn {
    pointer-events: none; width: 100%;
    padding: 15px 2px 4px; font-size: 12px; letter-spacing: 0.14em;
    color: var(--green-label);
  }
  .nav-group-btn::after { display: none; }
  .nav-group-btn .chevron { display: none; }
  .nav-group:hover::before { display: none; }
  .nav-dropdown {
    position: static; transform: none;
    opacity: 1; visibility: visible;
    min-width: 0; padding: 0;
    background: transparent; border: 0; border-radius: 0;
    box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .nav-links .nav-dropdown a {
    padding: 12px 2px 12px 16px; border-radius: 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 15px;
  }
  .nav-links .nav-dropdown a.active { background: transparent; }

  .hero, .banners, .profile, .rules, .schedule, .more, .page-hero, .page-body {
    padding-left: 22px; padding-right: 22px;
  }

  /* 히어로: 모바일에서는 캐릭터를 배경처럼 두고 글을 아래에 */
  .hero { min-height: 92vh; }
  .hero-art-wrap { height: 62vh; right: -22vw; }
  .hero-art { opacity: .8; }
  .hero::before { background: linear-gradient(180deg, rgba(11,13,8,.4) 0%, rgba(11,13,8,.7) 55%, rgba(11,13,8,.92) 100%); }
  .hero-image.profile-char img { max-height: clamp(360px, 90vw, 460px); }
  .hero-image.profile-char { min-height: 0; margin-top: 8px; }
  .hero-inner { padding-bottom: clamp(48px, 8vh, 80px); }
  .hero-eyebrow-row { margin-bottom: 18px; }
  .hero-live { font-size: 11px; }
  .hero-intro { max-width: 100%; }
  .hero-stats { margin-top: 30px; }
  .hero-stat { padding: 0 16px; }

  .banners { padding-top: 40px; padding-bottom: 64px; }
  .banners-grid { gap: 12px; }
  .banner-featured { padding: 22px 22px; }
  .banner-featured::after { font-size: 120px; bottom: -24px; }
  .featured-title { font-size: 26px; }
  .featured-arrow { padding: 12px 18px; font-size: 13px; }
  .links-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .link-tile { padding: 18px; }

  .section-head { margin-bottom: 36px; }

  .profile-body { grid-template-columns: 1fr; gap: 32px; }
  .profile-field:nth-child(odd) { border-right: none; }
  .profile-cards { grid-template-columns: 1fr; margin-top: 4px; }

  .rules-box, .placeholder-box { padding: 36px 22px; }
  .rules-list li { font-size: 14.5px; padding: 11px 2px; }

  .modal { padding: 32px 24px; max-height: 88vh; }
  .modal-title { font-size: 21px; }

  .schedule-grid { gap: 14px; }

  .more-grid { gap: 14px; }
  .more-card { padding: 24px 22px 30px; }

  /* ---- 하위 페이지 ---- */
  .page-hero { padding-top: 56px; padding-bottom: 48px; }
  .page-title { font-size: 32px; }
  .page-desc { font-size: 15px; }
  .page-body { padding-top: 56px; padding-bottom: 72px; }

  .roulette-card { padding: 28px 22px; border-radius: 18px; }
  .roulette-name { font-size: 22px; }
  .roulette-body { gap: 24px; }
  .wheel-wrap { flex: 1 1 100%; }
  .wheel { width: 200px; height: 200px; }
  .wheel-hub { top: 100px; width: 38px; height: 38px; }
  /* 좁은 화면에서는 확률 막대를 빼고 이름 + 숫자만 남깁니다 */
  .roulette-item { grid-template-columns: 12px 1fr 52px; }
  .ri-bar { display: none; }

  .command-card { padding: 16px 18px; gap: 12px; flex-direction: column; align-items: flex-start; }

  .timeline-filter { margin-bottom: 32px; }
  .year-chip { padding: 7px 16px; font-size: 13px; }
  .timeline-year { top: 64px; margin-bottom: 20px; }
  .timeline-year .year-num { font-size: 24px; }
  .timeline { padding-left: 32px; }
  .timeline-dot { left: -32px; }

  .event-card { padding: 30px 22px; border-radius: 18px; gap: 26px; }
  .event-title { font-size: 20px; }
  .event-number { font-size: 38px; }

  /* ---- 설정집 ---- */
  .lore-toc { margin-bottom: 40px; gap: 6px; }
  .lore-toc a { padding: 7px 14px; font-size: 12.5px; }
  #lore-chapters { gap: 16px; }
  .lore-chapter { padding: 26px 22px; border-radius: 16px; }
  .lore-chapter-head { gap: 12px; margin-bottom: 16px; }
  .lore-num { font-size: 30px; }
  .lore-title { font-size: 20px; }
  .lore-summary p { font-size: 14.5px; line-height: 1.9; }
  .lore-more-btn { width: 100%; justify-content: center; margin-top: 18px; }
  .lore-body p { font-size: 15px; line-height: 2; }
  .lore-body blockquote { padding: 18px 20px; font-size: 15px; }
  .lore-display { font-size: 30px; }
  .lore-body li { flex-direction: column; gap: 3px; }
  .lore-body li .li-key { flex: none; }

  /* ---- 후원 리액션 ---- */
  .tier { flex-direction: column; gap: 12px; padding: 18px 20px; }
  .tier-amount { flex: none; align-self: flex-start; padding: 7px 18px; }
  .tier-body { padding-top: 0; }
  .donation-rules-wrap, .donation-notes-wrap { margin-top: 64px; }
  .section-title-sm { font-size: 22px; }
  .numbered-rules li { padding-left: 40px; }

  .footer { padding: 44px 22px 32px; }
  .footer-links { gap: 20px; row-gap: 10px; }

  .lightbox { padding: 20px 14px; }
  .lightbox-close { top: 14px; right: 14px; }

  .back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }

  /* 좁은 화면에서는 토스트가 "맨 위로" 버튼을 가리지 않게 위로 올립니다 */
  .bds-toast { bottom: 74px; font-size: 13px; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 36px; }
  .nav-logo { font-size: 19px; }
  .nav-cta { padding: 8px 16px; font-size: 12px; }
  .links-grid { grid-template-columns: 1fr; }
}