:root {
  --bg-black: #080606;
  --bg-black-2: #0d0709;

  --neon: #b8232f;
  --neon-soft: #d9c4a4;

  --brass: #a3853f;
  --gold: #d9a94a;
  --gold-dim: #6b5424;
}

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

html,
body {
  background: var(--bg-black-2);
  color: var(--neon-soft);
  font-family: 'Noto Serif KR', 'Cormorant Garamond', serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  word-break: keep-all;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--bg-black);
  overflow: hidden;
  padding-bottom: 60px;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../image/wood.jpg") center center / cover no-repeat;
  filter: grayscale(1) brightness(0.12) contrast(1.15);
  z-index: 0;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 45% at 50% 8%, rgba(120, 20, 24, 0.16), transparent 60%),
    radial-gradient(ellipse 80% 35% at 50% 100%, rgba(90, 14, 18, 0.1), transparent 65%);
  z-index: 1;
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 50;
}

/* ---------- Header ---------- */

.rules-header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 64px 24px 26px;
}

.rules-channel {
  font-family: 'Cormorant SC', serif;
  font-size: 12px;
  letter-spacing: 5px;
  color: var(--neon);
  margin-bottom: 10px;
}

.rules-eyebrow {
  font-family: 'Cormorant SC', serif;
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 10px;
}

.rules-title {
  font-family: 'Cormorant SC', serif;
  font-weight: 600;
  font-size: 32px;
  letter-spacing: 2px;
  color: var(--gold);
}

.rules-rule {
  width: 70px;
  height: 1px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.7;
}

/* ---------- Rule list (accordion) ---------- */

.rule-list {
  position: relative;
  z-index: 10;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rule-item {
  border: 1px solid var(--gold-dim);
  background: rgba(15, 8, 8, 0.65);
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.rule-item:has(.rule-panel.open) {
  border-color: var(--neon);
}

.rule-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.rule-num {
  font-family: 'Cormorant SC', serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--gold);
  flex-shrink: 0;
}

.rule-name {
  flex: 1;
  font-family: 'Noto Serif KR', 'Cormorant Garamond', serif;
  font-size: 15px;
  color: var(--gold);
  opacity: 0.95;
}

.rule-arrow {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--gold);
  transition: transform 0.25s ease;
}

.rule-toggle.open .rule-arrow {
  transform: rotate(180deg);
}

.rule-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.rule-panel.open {
  max-height: 1200px;
}

/* 본문은 이전 디자인처럼 폭 제한 없이 */
.rule-text {
  padding: 8px 16px 18px;
  font-family: 'Noto Serif KR', 'Cormorant Garamond', serif;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--neon-soft);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.rule-text p {
  margin-bottom: 12px;
}

.rule-text p:last-child {
  margin-bottom: 0;
}

/* ---------- OUTTAKE / EXAMPLE 박스 ---------- */

.rule-note-box {
  position: relative;
  margin: 0 16px 18px;
  padding: 16px 14px 14px;
  border: 1px solid var(--gold-dim);
}

.rule-note-box-label {
  position: absolute;
  top: -9px;
  left: 12px;
  background: var(--bg-black);
  padding: 0 6px;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--gold);
}

.rule-note-box p {
  font-family: 'Noto Serif KR', 'Cormorant Garamond', serif;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--neon-soft);
  opacity: 0.9;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ---------- Nav ---------- */

.stage nav {
  position: relative;
  width: 100%;
  z-index: 25;
  margin-top: 36px;
  padding: 0 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

nav a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 2px;
  text-decoration: none;
  color: var(--gold);
  font-family: 'Cormorant SC', serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.2s, text-shadow 0.2s;
}

.nav-kr {
  margin-top: 2px;
  font-family: 'Noto Serif KR', serif;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: none;
  color: #d9c4a4;
  opacity: 0.8;
}

nav a.active {
  padding: 8px 20px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  opacity: 1;
}

nav a:not(.active):hover {
  opacity: 1;
}

nav .sep {
  color: var(--gold-dim);
  opacity: 0.6;
  font-size: 12px;
}

.floor-glow {
  position: absolute;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%);
  width: 450px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(120, 20, 24, 0.14), transparent 70%);
  filter: blur(6px);
  z-index: 5;
  pointer-events: none;
}

@media (max-width: 360px) {
  .rules-title { font-size: 26px; }
  .rule-name { font-size: 13px; }
}