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

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

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

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

  /* ---- 원본 색상표 (밝을 때 / 어두울 때) ---- */
  --bg-light: #fdfdfb;             --bg-dark: #1c2116;
  --bg-alt-light: #f4f6ef;         --bg-alt-dark: #141810;
  --bg-panel-light: #f8f9f4;       --bg-panel-dark: #191e13;
  --bg-nav-light: rgba(253, 253, 251, 0.88); --bg-nav-dark: rgba(20, 24, 15, 0.85);
  --hero-glow-light: #f2f5ee;      --hero-glow-dark: #202717;

  --ink-light: #2c3327;            --ink-dark: #edf1e4;
  --ink-soft-light: #4a5442;       --ink-soft-dark: #c4cdb6;

  --green-light: #6f8161;          --green-dark: #a8bd97;
  --green-mid-light: #8a9a7b;      --green-mid-dark: #8ba07a;
  --green-label-light: #7c8c6e;    --green-label-dark: #9fb58c;
  --green-line-light: #d7dfcc;     --green-line-dark: #313b26;
  --green-tint-light: #e8f0d8;     --green-tint-dark: #202b19;

  --border-soft-light: #e7ebe1;    --border-soft-dark: #2a3122;
  --text-muted-light: #a3ac96;     --text-muted-dark: #7c8b6a;
  --dashed-border-light: #b9c5a8;  --dashed-border-dark: #465238;

  --shadow-soft-light: rgba(60, 70, 50, 0.12); --shadow-soft-dark: rgba(0, 0, 0, 0.45);
  --shadow-hero-light: rgba(80, 95, 70, 0.18); --shadow-hero-dark: rgba(0, 0, 0, 0.4);
  --select-bg-light: #c9d4bb;      --select-bg-dark: #3a4a30;

  /* ---- 실제로 쓰이는 색상 (기본값 = 밝은 화면) ---- */
  --bg: var(--bg-light);
  --bg-alt: var(--bg-alt-light);
  --bg-panel: var(--bg-panel-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);
  --shadow-soft: var(--shadow-soft-light);
  --shadow-hero: var(--shadow-hero-light);
  --select-bg: var(--select-bg-light);

  /* ---- 고정 색상 (다크 모드에서도 바뀌지 않음) ---- */
  --green-deep: #4b5a41;     /* 버튼/이벤트/푸터 등 항상 짙은 초록 배경 */
  --brand-dark: #232922;     /* 치지직 배너 등 항상 짙은 카드 */
  --gold: #c9a86a;           /* 발자취 마지막 포인트 */
  --discord: #5865F2;        /* 디스코드 브랜드 색 */
  --x-black: #000000;        /* X(트위터) 브랜드 색 */
  --shadow-strong: rgba(0, 0, 0, 0.25);

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

  --cafe-bg: #e8f0d8;        /* 네이버 카페 배너 (브랜드 카드, 고정) */
  --cafe-text: #2c3327;
  --cafe-border: #cdd6c1;

  --fancim: #d9536f;         /* 팬심 배너 (선물 서비스 — 따뜻한 장미빛) */
}

/* 색상 이름 하나를 한번에 다크값으로 바꾸기 위한 목록 (아래 두 곳에서 재사용) */
@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);
    --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);
    --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);
  --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);
  --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);
  --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);
  --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;
}

html { scroll-behavior: smooth; }

/* 애니메이션을 줄여달라고 설정한 방문자를 위해 모든 움직임을 사실상 끔 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

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

body {
  margin: 0;
  font-family: 'Noto Serif KR', serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
}

::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); }
}

/* ---------- 스크롤 진행률 바 ---------- */
.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 .7s cubic-bezier(.16, .84, .44, 1), transform .7s cubic-bezier(.16, .84, .44, 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: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  background: var(--bg-nav);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; letter-spacing: 0.08em;
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-links a {
  position: relative;
  color: var(--ink-soft); text-decoration: none;
  font-size: 14.5px; letter-spacing: 0.03em;
  transition: color .2s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px;
  background: var(--green-mid); border-radius: 2px;
  transition: right .28s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-links a.active { color: var(--ink); }
.nav-cta {
  font-size: 13px; padding: 9px 20px;
  border: 1px solid var(--green-mid); border-radius: 999px;
  color: var(--green-label); text-decoration: none; letter-spacing: 0.05em;
  transition: background-color .2s ease, transform .2s ease;
}
.nav-cta:hover { background: var(--green-tint); transform: translateY(-1px); }

/* ---------- 라이트/다크 모드 토글 버튼 ---------- */
.nav-right { display: flex; align-items: center; gap: 14px; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; padding: 0;
  border: 1px solid var(--green-mid); background: transparent;
  color: var(--green-label); cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.theme-toggle:hover { background: var(--green-tint); transform: rotate(-14deg); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme-active="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme-active="dark"] .theme-toggle .icon-moon { display: block; }

/* ---------- 모바일 메뉴 버튼 ---------- */
.menu-toggle {
  display: none; width: 38px; height: 38px; border-radius: 50%; padding: 0;
  border: 1px solid var(--green-mid); 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(--green-label);
  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: 92vh;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 48px 40px;
  background: radial-gradient(120% 90% at 50% 0%, var(--hero-glow) 0%, var(--bg) 55%, var(--bg) 100%);
  overflow: hidden;
}
.hero-glow {
  position: absolute; width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,212,187,0.55) 0%, rgba(201,212,187,0) 70%);
  top: 8%; left: 50%; transform: translateX(-50%); z-index: 0;
}
.hero-inner {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  gap: 56px; max-width: 1200px; width: 100%; flex-wrap: wrap;
}
.hero-text { flex: 1 1 340px; min-width: 300px; text-align: left; }
.hero-eyebrow {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 18px; letter-spacing: 0.18em;
  color: var(--green-label); margin: 0 0 14px;
}
.hero-title { font-size: 64px; line-height: 1.15; margin: 0 0 18px; font-weight: 600; color: var(--ink); }
.hero-title .hanja { font-size: 30px; font-weight: 400; color: var(--green); }
.hero-intro { font-size: 17px; line-height: 1.9; color: var(--ink-soft); max-width: 460px; margin: 0 0 32px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  padding: 14px 30px; background: var(--green-deep); color: var(--on-dark);
  text-decoration: none; border-radius: 999px; font-size: 15px; letter-spacing: 0.04em;
  display: inline-block; transition: transform .22s ease, box-shadow .22s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px var(--shadow-soft); }
.btn-ghost {
  padding: 14px 30px; background: transparent; color: var(--green-label);
  border: 1px solid var(--green-mid);
  text-decoration: none; border-radius: 999px; font-size: 15px; letter-spacing: 0.04em;
  display: inline-block; transition: background-color .22s ease, transform .22s ease;
}
.btn-ghost:hover { background: var(--green-tint); transform: translateY(-2px); }
.hero-image { flex: 1 1 320px; min-width: 280px; display: flex; justify-content: center; position: relative; }
.hero-image img {
  width: 100%; max-width: 420px;
  animation: softFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 24px 40px var(--shadow-hero));
  cursor: pointer;
}

/* ---------- 캐릭터 클릭 이스터에그 ---------- */
/* 클릭 반동 — fadeUp이 끝난 뒤 animation을 갈아끼우므로 opacity:1을 명시해
   (아래 진입 애니메이션의 opacity:0 기본값으로 되돌아가지 않도록) 합니다 */
.hero-image.is-poked   { opacity: 1; animation: squish .45s ease; transform-origin: 50% 85%; }
.hero-image.is-tickled { opacity: 1; animation: wiggle .5s ease; transform-origin: 50% 85%; }
@keyframes squish {
  0%   { transform: scale(1, 1); }
  30%  { transform: scale(1.05, .94); }
  60%  { transform: scale(.97, 1.04); }
  100% { transform: scale(1, 1); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-3deg); }
  40% { transform: rotate(3deg); }
  60% { transform: rotate(-2.4deg); }
  80% { transform: rotate(2.4deg); }
}
.speech-bubble {
  position: absolute; top: 1%; left: 50%; transform: translateX(-50%);
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--green-line); border-radius: 14px;
  padding: 12px 18px; font-size: 15px; line-height: 1.5;
  max-width: 280px; width: max-content; text-align: center;
  box-shadow: 0 10px 24px var(--shadow-soft);
  z-index: 5; pointer-events: none;
}
.speech-bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 8px solid transparent; border-top-color: var(--bg);
}
.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, #9fae8f, var(--green));
  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)); }
}

/* ---------- 방송 D+일수 뱃지 ---------- */
.hero-days {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 26px; padding: 7px 16px; border-radius: 999px;
  background: var(--green-tint); color: var(--green-label);
  border: 1px solid var(--green-line);
  font-size: 13.5px; letter-spacing: 0.04em;
}
.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-size: 12px; letter-spacing: 0.2em; color: var(--green-mid); text-decoration: none;
  animation: heroScrollBob 2.2s ease-in-out infinite;
}
@keyframes heroScrollBob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: .7; }
  50%      { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* 첫 화면 진입 애니메이션 (스크롤과 무관하게 페이지가 열리면 바로 재생) */
.hero-eyebrow, .hero-title, .hero-intro, .hero-days, .hero-buttons {
  opacity: 0; animation: fadeUp .8s cubic-bezier(.16, .84, .44, 1) forwards;
}
.hero-eyebrow { animation-delay: .05s; }
.hero-title   { animation-delay: .16s; }
.hero-intro   { animation-delay: .28s; }
.hero-days    { animation-delay: .36s; }
.hero-buttons { animation-delay: .44s; }
.hero-image   { opacity: 0; animation: fadeUp 1s cubic-bezier(.16, .84, .44, 1) forwards; animation-delay: .3s; }

/* ---------- 배너 (채널 링크 — 각 서비스 브랜드 색이라 다크 모드에서도 고정) ---------- */
/* 배너가 5개라, 넓은 화면에서는 한 줄에 5개가 딱 맞게 들어가도록 칸 수를 직접 정합니다.
   (auto-fit 은 5개일 때 4+1 처럼 한 개만 다음 줄로 떨어져 보기 안 좋습니다) */
.banners { padding: 60px 48px 100px; background: var(--bg); }
.banners-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px;
}
.banner {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 28px 24px; border-radius: 20px;
  text-decoration: none; transition: transform .25s ease, box-shadow .25s ease;
}
.banner:hover { transform: translateY(-6px); box-shadow: 0 18px 34px var(--shadow-soft); }
.banner-icon { transition: transform .25s ease; }
.banner:hover .banner-icon { transform: scale(1.08) rotate(-4deg); }
.banner-chzzk { background: var(--brand-dark); color: var(--on-dark); border: 1px solid rgba(255,255,255,0.07); }
.banner-discord { background: var(--discord); color: var(--on-dark); }
.banner-cafe { background: var(--cafe-bg); color: var(--cafe-text); border: 1px solid var(--cafe-border); }
.banner-x { background: var(--x-black); color: var(--on-dark); border: 1px solid rgba(255,255,255,0.1); }
.banner-fancim { background: var(--fancim); color: var(--on-dark); }
.banner-icon {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.banner-chzzk .banner-icon { background: var(--on-dark); }
.banner-discord .banner-icon { background: rgba(255,255,255,0.18); }
.banner-cafe .banner-icon { background: rgba(255,255,255,0.5); }
.banner-x .banner-icon { background: rgba(255,255,255,0.14); }
.banner-fancim .banner-icon { background: rgba(255,255,255,0.2); }
.icon-play {
  width: 0; height: 0;
  border-top: 10px solid transparent; border-bottom: 10px solid transparent;
  border-left: 16px solid var(--brand-dark); margin-left: 4px;
}
.icon-pill { width: 22px; height: 16px; border-radius: 10px; background: var(--on-dark); }
.icon-square { width: 20px; height: 20px; border-radius: 5px; border: 2.5px solid var(--cafe-text); }
.banner-title { margin: 0 0 5px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.banner-sub { margin: 0; font-size: 12px; opacity: 0.85; letter-spacing: 0.03em; }
.banner-cafe .banner-sub { opacity: 0.72; }
/* 주소가 아직 비어 있는 배너는 살짝 흐리게 (클릭해도 이동하지 않음) */
.banner.is-empty { opacity: .55; cursor: default; }
.banner.is-empty:hover { transform: none; box-shadow: none; }

/* ---------- 공통 섹션 제목 ---------- */
.section-head { text-align: center; margin-bottom: 64px; }
.section-eyebrow {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  letter-spacing: 0.2em; color: var(--green-label); font-size: 16px; margin: 0 0 10px;
}
.section-title { font-size: 38px; margin: 0; font-weight: 600; }

/* ---------- 프로필 ---------- */
.profile { padding: 110px 48px; background: var(--bg-alt); }
/* 일러스트를 크게 보여주려고 안쪽 너비를 넓혔습니다.
   (이미지 620px + 글 520px + 사이 간격 64px = 1204px 이므로 1240px 확보) */
.profile-inner { max-width: 1240px; margin: 0 auto; }
.profile-body {
  display: flex; gap: 64px; align-items: center;
  flex-wrap: wrap; justify-content: center;
}
.profile-image { flex: 1 1 460px; max-width: 620px; position: relative; }
.profile-image img {
  width: 100%; border-radius: 18px; box-shadow: 0 24px 48px var(--shadow-soft);
  cursor: zoom-in; display: block;
  transition: transform .3s ease, box-shadow .3s ease;
}
.profile-image:hover img { transform: translateY(-4px); box-shadow: 0 30px 56px var(--shadow-soft); }

/* 일러스트 위에 살짝 떠 있는 "크게 보기" 안내 */
.zoom-hint {
  position: absolute; right: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--bg-nav); color: var(--ink-soft);
  border: 1px solid var(--green-line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 12.5px; letter-spacing: 0.03em; 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-info { flex: 1 1 440px; max-width: 520px; }
.profile-fields {
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--green-line);
}
.profile-field { padding: 16px 18px; border-bottom: 1px solid var(--green-line); }
.profile-field:nth-child(odd) { border-right: 1px solid var(--green-line); }
.profile-field .label { margin: 0 0 4px; font-size: 12px; letter-spacing: 0.1em; color: var(--green-label); }
.profile-field .value { margin: 0; font-size: 16px; color: var(--ink); line-height: 1.5; }
.profile-cards { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.profile-card {
  background: var(--bg); border: 1px solid var(--green-line);
  border-radius: 14px; padding: 20px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.profile-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px var(--shadow-soft); }
.profile-card .label { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.08em; color: var(--green-label); }
.profile-card .value { margin: 0; font-size: 15px; line-height: 1.7; }
.profile-reason { margin-top: 18px; background: var(--green-deep); border-radius: 14px; padding: 24px 26px; }
.profile-reason .label { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.08em; color: var(--on-dark-soft); }
.profile-reason .value {
  margin: 0; font-size: 17px; line-height: 1.7; color: var(--on-dark);
  font-style: italic; font-family: 'Cormorant Garamond', 'Noto Serif KR', serif;
}

/* ---------- 규칙 및 공지 ---------- */
.rules { padding: 100px 48px; background: var(--bg); }
.rules-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.rules-inner .section-head { margin-bottom: 40px; }
.rules-box {
  border: 1.5px dashed var(--dashed-border); border-radius: 20px;
  padding: 56px 44px; background: var(--bg-panel);
}
.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; }
.rules-text { margin: 0; font-size: 14px; color: var(--green-mid); }

.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: 14px; align-items: center;
  font-size: 15.5px; line-height: 1.5; color: var(--ink);
  padding: 13px 10px; border-bottom: 1px solid var(--green-line);
  border-radius: 10px; transition: background-color .2s ease;
}
.rules-list li:last-child { border-bottom: none; }
.rules-list li:hover { background: var(--green-tint); }
.rules-list li::before {
  content: counter(rule-num);
  flex-shrink: 0; 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);
}
.rules-detail-btn {
  margin: 26px auto 0; display: block;
  padding: 12px 30px; 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;
}
.rules-detail-btn:hover { background: var(--green-tint); transform: translateY(-2px); }

/* ---------- 상세 규칙 팝업 ---------- */
.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(--bg); color: var(--ink);
  border-radius: 20px; 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: 18px; right: 18px;
  width: 34px; height: 34px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--green-line); background: transparent;
  color: var(--ink-soft); cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.modal-close:hover { background: var(--green-tint); transform: rotate(90deg); }
.modal-close svg { width: 16px; height: 16px; display: block; }
.modal-eyebrow {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  letter-spacing: 0.2em; color: var(--green-label); font-size: 14px; margin: 0 0 8px;
}
.modal-title { font-size: 24px; margin: 0 0 22px; font-weight: 600; }
.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: 100px 48px; background: var(--bg-alt); }
.schedule-inner { max-width: 1000px; margin: 0 auto; }
.schedule-inner .section-head { margin-bottom: 56px; }
.schedule-note { font-size: 13px; color: var(--text-muted); letter-spacing: 0.03em; margin: 14px 0 0; }
.schedule-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;
}
.schedule-card {
  position: relative;
  border-radius: 16px; padding: 28px 24px; text-align: center; background: var(--bg);
  transition: transform .25s ease, box-shadow .25s ease;
}
.schedule-card:nth-child(even) { background: var(--green-tint); }
.schedule-card:hover { transform: translateY(-5px); box-shadow: 0 16px 30px var(--shadow-soft); }
.schedule-card.today { box-shadow: inset 0 0 0 1.5px var(--green-mid); }
.today-badge {
  position: absolute; top: 12px; right: 12px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
  background: var(--green-deep); color: var(--on-dark);
}
.schedule-card .day { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.1em; color: var(--green-mid); }
.schedule-card .time { margin: 0 0 6px; font-size: 24px; font-weight: 600; color: var(--ink); }
.schedule-card .note { margin: 0; font-size: 13px; color: var(--green-mid); }

/* ---------- 메인 페이지 "더 둘러보기" ---------- */
.more { padding: 100px 48px; background: var(--bg); }
.more-inner { max-width: 1160px; margin: 0 auto; }
.more-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px;
}
.more-card {
  position: relative; display: block;
  padding: 30px 28px 34px; border-radius: 18px;
  background: var(--bg-panel); border: 1px solid var(--green-line);
  text-decoration: none; color: var(--ink);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.more-card:hover {
  transform: translateY(-6px); border-color: var(--green-mid);
  box-shadow: 0 18px 34px var(--shadow-soft);
}
.more-eyebrow {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  letter-spacing: 0.18em; color: var(--green-label); font-size: 13px; margin: 0 0 8px;
}
.more-title { margin: 0 0 10px; font-size: 22px; font-weight: 600; }
.more-desc { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.more-arrow {
  position: absolute; right: 24px; bottom: 22px;
  color: var(--green-mid); font-size: 18px;
  transition: transform .25s ease, color .25s ease;
}
.more-card:hover .more-arrow { transform: translateX(5px); color: var(--green); }

/* ================================================================
   하위 페이지 공통 (룰렛 / 명령어 / 발자취 / 이벤트)
   메인 첫 화면과 같은 결을 유지하되, 높이는 낮게 잡았습니다.
   ================================================================ */
.page-hero {
  position: relative; overflow: hidden;
  padding: 80px 48px 64px; text-align: center;
  background: radial-gradient(120% 120% at 50% 0%, var(--hero-glow) 0%, var(--bg) 60%, var(--bg) 100%);
  border-bottom: 1px solid var(--border-soft);
}
.page-hero .hero-glow { width: 520px; height: 520px; top: -30%; }
.page-hero-inner { position: relative; z-index: 2; max-width: 720px; margin: 0 auto; }
.page-eyebrow {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  letter-spacing: 0.2em; color: var(--green-label); font-size: 16px; margin: 0 0 10px;
  opacity: 0; animation: fadeUp .8s cubic-bezier(.16,.84,.44,1) forwards; animation-delay: .05s;
}
.page-title {
  font-size: 44px; margin: 0 0 16px; font-weight: 600; color: var(--ink);
  opacity: 0; animation: fadeUp .8s cubic-bezier(.16,.84,.44,1) forwards; animation-delay: .14s;
}
.page-desc {
  margin: 0; font-size: 16px; line-height: 1.9; color: var(--ink-soft);
  opacity: 0; animation: fadeUp .8s cubic-bezier(.16,.84,.44,1) forwards; animation-delay: .24s;
}
.page-note {
  margin: 16px 0 0; font-size: 13px; color: var(--text-muted); letter-spacing: 0.03em;
  opacity: 0; animation: fadeUp .8s cubic-bezier(.16,.84,.44,1) forwards; animation-delay: .32s;
}
.page-note:empty { display: none; }
.page-body { padding: 84px 48px 100px; background: var(--bg); }
.page-inner { max-width: 1080px; margin: 0 auto; }
.page-inner-narrow { max-width: 820px; }

/* "업데이트 예정" 안내 (룰렛/명령어/이벤트가 비었을 때) */
.placeholder-box {
  border: 1.5px dashed var(--dashed-border); border-radius: 20px;
  padding: 56px 44px; background: var(--bg-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: 'Cormorant Garamond', serif; font-style: italic;
  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 { padding: 56px 48px 40px; background: var(--green-deep); text-align: center; }
.footer-logo {
  font-family: 'Cormorant Garamond', serif; font-size: 24px;
  letter-spacing: 0.1em; color: var(--on-dark); margin: 0 0 18px;
}
.footer-links { display: flex; gap: 28px; justify-content: center; margin-bottom: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--on-dark-faint); text-decoration: none; font-size: 13px; }
.footer-copy { margin: 0; font-size: 12px; color: var(--on-dark-faint); opacity: .75; letter-spacing: 0.05em; }

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

/* ---------- 토스트 알림 (화면 아래 가운데에 잠깐 나타나는 말) ---------- */
.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) {
  .banners-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: 720px) {
  .nav { padding: 14px 20px; position: relative; }
  .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(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
    max-height: 0; overflow: hidden; padding: 0 20px;
    transition: max-height .3s ease, padding .3s ease;
  }
  /* 메뉴가 7개라 열렸을 때 높이를 넉넉히 잡습니다 */
  .nav-links.is-open { max-height: 520px; 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; }

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

  /* 히어로: 92vh 고정 대신 내용 높이에 맞춰 자연스럽게 */
  .hero { min-height: auto; padding-top: 84px; padding-bottom: 56px; }
  .hero-inner { gap: 40px; }
  .hero-title { font-size: 42px; }
  .hero-intro { font-size: 16px; line-height: 1.8; }

  .banners { padding-top: 40px; padding-bottom: 64px; }
  .banners-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .banner { padding: 22px 18px; }
  .banner-icon { width: 40px; height: 40px; margin-bottom: 12px; }
  .banner-title { font-size: 15.5px; }
  .banner-sub { font-size: 11px; }

  .profile, .schedule, .rules, .more { padding-top: 72px; padding-bottom: 72px; }

  .section-head { margin-bottom: 40px; }
  .section-title { font-size: 28px; }

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

  .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; }

  .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; }
  .banners-grid { grid-template-columns: 1fr; }
}
