:root {
  --bg: #f4f8ff;
  --surface: #ffffff;
  --text: #1f2a44;
  --muted: #5b6785;
  --primary: #2f7de1;
  --primary-dark: #1f5fb8;
  --accent: #ffb300;
  --line: #dbe5f5;
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1626;
    --surface: #182138;
    --text: #e8eefc;
    --muted: #9fb0d3;
    --primary: #5b9bf0;
    --primary-dark: #7db0f5;
    --line: #2a3656;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  word-break: keep-all;
}

img { max-width: 100%; height: auto; }

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* 헤더 */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 12px;
  flex-wrap: wrap;
}
.brand {
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span { color: var(--primary); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 15px;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--bg); color: var(--primary); }

/* 히어로 */
.hero {
  background: linear-gradient(160deg, #2f7de1 0%, #5bb0ff 60%, #9ad4ff 100%);
  color: #fff;
  padding: 72px 0 80px;
}
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.3; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero p { font-size: clamp(16px, 2.4vw, 19px); margin: 0; max-width: 560px; opacity: 0.95; }
.hero-inner { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; justify-content: space-between; }
.hero-art { display: flex; gap: 12px; }
.hero-art img { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.25)); }

.btn {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 24px;
  background: var(--accent);
  color: #3a2800;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
}
.btn:hover { background: #ffc233; color: #3a2800; }
.btn.secondary { background: transparent; border: 2px solid #fff; color: #fff; margin-left: 8px; }
.btn.secondary:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* 섹션 */
section { padding: 56px 0; }
section h2 { font-size: 26px; margin: 0 0 8px; letter-spacing: -0.02em; }
.lead { color: var(--muted); margin: 0 0 28px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin: 12px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .icon { height: 72px; display: flex; align-items: center; }
.card .icon img { max-height: 72px; width: auto; }

/* 게임 소개 */
.game-hero { background: linear-gradient(180deg, #4a9bef, #8fd0ff); color: #fff; padding: 56px 0; }
.game-hero .wrap { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; justify-content: center; }
.game-hero img.title { width: min(280px, 70vw); border-radius: 24px; box-shadow: 0 12px 32px rgba(0,0,0,0.3); }
.game-hero .text { flex: 1 1 320px; max-width: 520px; }
.game-hero h1 { margin: 0 0 12px; font-size: clamp(26px, 5vw, 38px); line-height: 1.3; }
.game-hero p { margin: 0; font-size: 17px; }

.shots { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.shot {
  background: linear-gradient(180deg, #3d8ce6, #8fd0ff);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
  color: #fff;
}
.shot .art { height: 120px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.shot .art img { max-height: 110px; max-width: 100%; width: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25)); }
.shot strong { display: block; margin-top: 8px; font-size: 15px; }
.shot span { font-size: 13px; opacity: 0.95; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li {
  counter-increment: s;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 16px 64px;
  position: relative;
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.notice {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--muted);
  font-size: 14px;
}

.info { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.info th, .info td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.info th { width: 130px; color: var(--muted); font-weight: 600; background: var(--bg); }
.info tr:last-child th, .info tr:last-child td { border-bottom: 0; }

/* 법률 문서 */
.doc { padding: 40px 0 72px; }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: 30px; margin: 0 0 4px; }
.doc .meta { color: var(--muted); font-size: 14px; margin: 0 0 32px; }
.doc h2 { font-size: 20px; margin: 36px 0 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 16px; margin: 20px 0 4px; }
.doc p, .doc li { font-size: 15px; }
.doc ol, .doc ul { padding-left: 22px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; background: var(--surface); }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg); }
.doc .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 24px; }
.doc .toc ol { margin: 0; columns: 2 220px; }

/* 푸터 */
.site-footer { background: #17203a; color: #b6c3e2; padding: 36px 0; font-size: 14px; }
.site-footer a { color: #d8e3ff; }
.site-footer .links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.site-footer p { margin: 2px 0; }

@media (max-width: 600px) {
  .hero { padding: 48px 0 56px; }
  .hero-art img { width: 64px; height: 64px; }
  .btn.secondary { margin-left: 0; }
  .info th { width: 100px; }
}
