/* 읽기용 페이지. 게임(style.css)과 토큰만 공유하고 레이아웃은 따로 간다.
   게임은 overflow:hidden 고정 화면이지만 이 페이지는 스크롤되어야 한다. */

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

:root {
  --bg: #0a0c14;
  --ink: #e8ecf8;
  --muted: #8892b0;
  --accent: #43e5a0;
  --accent-2: #5b8cff;
  --danger: #ff4d6d;
  --warn: #ffc247;
  --panel: rgba(16, 20, 34, 0.92);
  --line: rgba(255, 255, 255, 0.09);
  --rail: 0px;
  --gutter: 0px;
}

@media (min-width: 1200px) { :root.has-ad-rails { --rail: 160px; --gutter: 40px; } }
@media (min-width: 1600px) { :root.has-ad-rails { --rail: 300px; --gutter: 56px; } }

html { scroll-behavior: smooth; }

body {
  background: radial-gradient(120% 60% at 50% 0%, #1b2242 0%, #0a0c14 55%), var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ===== 광고 레일 ===== */
.rail {
  position: fixed;
  top: 0; bottom: 0;
  width: var(--rail);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
  background: #05060c;
  border-inline: 1px solid var(--line);
}
.rail--left { left: 0; }
.rail--right { right: 0; }
.rail[hidden] { display: none; }
@media (min-width: 1200px) { :root.has-ad-rails .rail { display: flex; } }

.rail__label {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.28);
}
.rail__slot { width: 100%; flex: 1; display: grid; place-items: center; overflow: hidden; }

/* ?rails=1 미리보기용 자리표시자. 실제 광고가 들어가면 쓰이지 않는다. */
.rail__placeholder {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 300 / 600;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255,255,255,.22);
  border-radius: 6px;
  background: repeating-linear-gradient(45deg,#14172400,#14172400 10px,#1a1d2b55 10px,#1a1d2b55 20px);
  color: rgba(255,255,255,.3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}


/* ===== 본문 ===== */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}
@media (min-width: 1200px) {
  :root.has-ad-rails .wrap {
    margin-left: calc(var(--rail) + var(--gutter));
    margin-right: calc(var(--rail) + var(--gutter));
  }
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 48px;
}
.brand { font-size: 20px; font-weight: 900; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.brand span { color: var(--accent); }

.btn-play {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #04120b;
  font-weight: 800; font-size: 13px;
  text-decoration: none;
}
.btn-play:hover { background: #5df3b3; }

.langs { display: flex; gap: 6px; }
.lang {
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-family: inherit; font-size: 12px; cursor: pointer;
}
.lang:hover { color: var(--ink); border-color: rgba(255,255,255,.28); }
.lang[aria-pressed="true"] {
  color: var(--accent); border-color: var(--accent);
  background: rgba(67,229,160,.1); font-weight: 700;
}

h1 {
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 900; line-height: 1.2; letter-spacing: -.02em;
  margin-bottom: 16px;
}
.lede { font-size: 17px; color: var(--muted); margin-bottom: 8px; }

h2 {
  font-size: 22px; font-weight: 800; line-height: 1.3;
  margin: 56px 0 4px;
  scroll-margin-top: 24px;
}
.pattern-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 20px;
}
h3 { font-size: 15px; font-weight: 800; margin: 24px 0 6px; color: var(--ink); }

p { margin-bottom: 16px; color: #c3cade; }
strong { color: var(--ink); }

ul { margin: 0 0 16px 20px; color: #c3cade; }
li { margin-bottom: 8px; }

.note {
  border-left: 3px solid var(--accent);
  background: rgba(67,229,160,.05);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  font-size: 14.5px;
}
.note strong { color: var(--accent); }

hr { border: 0; border-top: 1px solid var(--line); margin: 56px 0; }

footer { color: var(--muted); font-size: 13px; }
footer a { color: var(--accent); }

/* 표 (개인정보 처리방침의 수집 항목 목록) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 24px;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: #c3cade;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
@media (max-width: 560px) { td:first-child { white-space: normal; } }

code {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  color: var(--ink);
}

/* 언어 전환. 도감(/about)은 ko/en 만, 처리방침(/privacy)은 4개 언어를 쓴다.
   해당 언어 블록이 없는 페이지에서는 그냥 아무것도 매칭되지 않는다. */
[data-lang] { display: none; }
:root[lang="ko"] [data-lang="ko"],
:root[lang="en"] [data-lang="en"],
:root[lang="ja"] [data-lang="ja"],
:root[lang="zh"] [data-lang="zh"] { display: revert; }

/* 전환 버튼 자체는 위 규칙에서 빼야 한다. 버튼에도 data-lang 이 붙어
   있어서, 그대로 두면 현재 언어 버튼 하나만 남아 전환이 불가능해진다. */
#lang-list [data-lang] { display: revert; }
