/* 냥신 키우기 안내 페이지 공통 스타일
   - 외부 CDN·웹 글꼴 없이 기기 글꼴만 씀 (빠르게 뜨고, 오프라인 캐시에도 안전)
   - 색은 :root 토큰 한 곳에서만 정함. 어두운 모드는 아래 media 블록에서 같은 이름을 다시 정함
   - 휴대폰 기준(좁은 화면)으로 먼저 만들고, 넓은 화면에서는 가운데 720px 폭 */

:root {
  --bg: #fff7ec;          /* 크림색 바탕 */
  --card: #ffffff;
  --text: #3b2f2a;        /* 진한 코코아 */
  --muted: #7a6a62;
  --line: #f0dfcc;
  --accent: #e8577a;      /* 분홍 (링크·강조) */
  --accent-soft: #ffe3ea;
  --accent2: #f2a33a;     /* 귤색 (제목 밑줄·배지) */
  --accent2-soft: #fff0d6;
  --note: #eef6ff;        /* 안내 상자 */
  --note-line: #bcd8f5;
  --warn: #fff1e6;
  --warn-line: #f5c49b;
  --radius: 18px;
  --shadow: 0 4px 14px rgba(120, 80, 40, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #211b18;
    --card: #2d2521;
    --text: #f5ebe3;
    --muted: #bba99d;
    --line: #463a33;
    --accent: #ff8fa8;
    --accent-soft: #4a2a33;
    --accent2: #f7bb62;
    --accent2-soft: #45351f;
    --note: #1f2d3b;
    --note-line: #35506b;
    --warn: #3b2a1e;
    --warn-line: #6e4a2c;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR",
               "Malgun Gothic", "맑은 고딕", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;       /* 한국어 낱말 가운데서 줄이 안 끊기게 */
  overflow-wrap: anywhere;    /* 긴 주소·영어는 넘치지 않게 */
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* ---------- 머리·꼬리 ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}
.brand .paw { font-size: 20px; }
.nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;           /* 좁은 화면에서는 옆으로 밀어서 봄 */
  padding: 8px 0 2px;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: none;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent2-soft);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
.nav a[aria-current="page"] { background: var(--accent); color: #fff; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 8px;
}

.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 4px 0; }

/* ---------- 글 ---------- */
h1 {
  font-size: 26px;
  line-height: 1.35;
  margin: 8px 0 6px;
}
h2 {
  font-size: 20px;
  margin: 36px 0 10px;
  padding-bottom: 4px;
  border-bottom: 3px solid var(--accent2-soft);
}
h3 { font-size: 17px; margin: 22px 0 6px; }
p, ul, ol { margin: 8px 0; }
ul, ol { padding-left: 22px; }
li { margin: 3px 0; }
small, .muted { color: var(--muted); }
.lead { font-size: 17px; }
.meta { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

/* 목차 */
.toc {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 18px;
  box-shadow: var(--shadow);
  font-size: 15px;
}
.toc ol { margin: 4px 0; }

/* ---------- 상자 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}
.note, .warn {
  border-radius: 14px;
  padding: 12px 16px;
  margin: 14px 0;
  border: 1px solid;
}
.note { background: var(--note); border-color: var(--note-line); }
.warn { background: var(--warn); border-color: var(--warn-line); }
.note > :first-child, .warn > :first-child, .card > :first-child { margin-top: 0; }
.note > :last-child, .warn > :last-child, .card > :last-child { margin-bottom: 0; }

.badge {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--accent2-soft);
  font-size: 13px;
  font-weight: 700;
  margin: 2px 4px 2px 0;
}
.badge.pink { background: var(--accent-soft); }

/* 단계 (1 → 2 → 3) */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 10px 12px 10px 48px;
  margin: 8px 0;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  text-align: center;
  line-height: 26px;
  font-size: 14px;
}

/* 링크 카드 (첫 화면) */
.links { display: grid; gap: 10px; grid-template-columns: 1fr; padding: 0; list-style: none; }
@media (min-width: 560px) { .links { grid-template-columns: 1fr 1fr; } }
.links a {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  border: 2px solid transparent;
}
.links a:hover { border-color: var(--accent); }
.links strong { display: block; font-size: 16px; }
.links span { color: var(--muted); font-size: 14px; }

/* 게임 화면 영상 (첫 화면) — 세로 영상 두 개를 나란히, 넓은 화면에서도 560px 안 */
.clips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 560px;
  margin: 14px auto;
}
.clip { margin: 0; }
.clip video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}
.clip figcaption { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.clip figcaption strong { display: block; color: var(--text); font-size: 15px; }

.hero {
  text-align: center;
  padding: 24px 8px 8px;
}
.hero .cat { font-size: 64px; line-height: 1; }
.hero h1 { font-size: 30px; }

/* ---------- 표 ---------- */
.table-wrap {
  overflow-x: auto;           /* 표만 옆으로 밀림, 페이지는 안 밀림 */
  -webkit-overflow-scrolling: touch;
  margin: 10px 0;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
table {
  border-collapse: collapse;
  width: 100%;
  background: var(--card);
  font-size: 14px;
  line-height: 1.5;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
th { background: var(--accent2-soft); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.zero { color: var(--muted); }
.frac { display: block; color: var(--muted); font-size: 12px; }

/* 접었다 펴는 칸 */
details {
  background: var(--card);
  border-radius: 14px;
  padding: 10px 14px;
  margin: 10px 0;
  box-shadow: var(--shadow);
}
summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: 6px; }

/* 채워야 할 자리 — 눈에 띄게 (출시 전에 전부 없어져야 함) */
.fill {
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 0 4px;
  font-weight: 700;
}

code { background: var(--accent2-soft); padding: 0 5px; border-radius: 5px; font-size: 0.92em; }
