/* 글 페이지 (게임 설명서 · 소개 · 개인정보처리방침 · 문의) 공통 모양
   색·버튼·위아래 띠는 Leapinity 대문(leapinity.com)·첫 화면(hub.css)과 같음: 보라 #7c5cff → 하늘 #38bdf8 → 민트 #2dd4a7 */
:root {
  --vio: #7c5cff; --sky: #38bdf8; --mint: #2dd4a7;
  --grad: linear-gradient(100deg, var(--vio) 0%, var(--sky) 55%, var(--mint) 100%);
  --night: #0b1030;
  --bg: #f5f6fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #5b6475;
  --line: #e4e7f1;
  --chip: #f1f3fa;
  --accent: #6a4cf0;
  --chip-ink: #5b6475; --th: #3b4266;
  --focus: #0284c7; --ok: #1a7d53; --err: #c43d5c;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow: 0 10px 30px rgba(22, 28, 61, .07);
  /* ☀️ 밝은 화면에서 위쪽 띠·아래쪽도 밝게 (어두운 화면 값은 아래 두 곳에서 예전 그대로) */
  --top-bg: #f4f3ff; --top-ink: #111827; --top-nav: #5b6475; --top-glow: .35; --top-line: #e4e7f1;
  --gl-bg: rgba(255, 255, 255, .78); --gl-line: rgba(22, 28, 61, .16); --gl-hover: #efeaff; --gl-on: rgba(124, 92, 255, .12);
  --foot-bg: #eceef7; --foot-ink: #5b6475; --foot-hi: #111827; --foot-note: #5b6475; --foot-copy: #5b6475; --foot-rule: #d9dcea;
  color-scheme: light;
}
/* 🌙 어두운 화면: '자동'이면서 기기가 어두운 화면일 때 + theme.js 로 '어둡게'를 골랐을 때 (두 곳 값은 같게). 게임 그림(.g-art)은 그대로 */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1438; --card: #161d45; --text: #eef1fb; --muted: #a9b1cc;
  --line: #2b3468; --chip: #232b5c; --chip-ink: #c9cef0; --th: #d3d7f0;
  --accent: #b4a3ff; --focus: #38bdf8; --ok: #6ee7c4; --err: #ff8aa6;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --top-bg: #0b1030; --top-ink: #fff; --top-nav: #c9cff0; --top-glow: 1; --top-line: transparent;
  --gl-bg: rgba(255, 255, 255, .08); --gl-line: rgba(255, 255, 255, .24); --gl-hover: rgba(255, 255, 255, .16); --gl-on: rgba(255, 255, 255, .12);
  --foot-bg: #080c26; --foot-ink: #aab1d6; --foot-hi: #fff; --foot-note: #8d95c0; --foot-copy: #747ca8; --foot-rule: rgba(255, 255, 255, .09);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0f1438; --card: #161d45; --text: #eef1fb; --muted: #a9b1cc;
  --line: #2b3468; --chip: #232b5c; --chip-ink: #c9cef0; --th: #d3d7f0;
  --accent: #b4a3ff; --focus: #38bdf8; --ok: #6ee7c4; --err: #ff8aa6;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --top-bg: #0b1030; --top-ink: #fff; --top-nav: #c9cff0; --top-glow: 1; --top-line: transparent;
  --gl-bg: rgba(255, 255, 255, .08); --gl-line: rgba(255, 255, 255, .24); --gl-hover: rgba(255, 255, 255, .16); --gl-on: rgba(255, 255, 255, .12);
  --foot-bg: #080c26; --foot-ink: #aab1d6; --foot-hi: #fff; --foot-note: #8d95c0; --foot-copy: #747ca8; --foot-rule: rgba(255, 255, 255, .09);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex; flex-direction: column;
  color: var(--text);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  background: var(--bg);
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
svg { display: block; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }

/* 맨 위 띠: 로고 + 메뉴 (어두운 밤색, 첫 화면과 같음) */
.top { position: relative; overflow: hidden; isolation: isolate; background: var(--top-bg); color: var(--top-ink); box-shadow: inset 0 -1px 0 var(--top-line); padding-top: env(safe-area-inset-top); }
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: var(--top-glow);
  background: radial-gradient(ellipse 50% 140% at 0% 0%, rgba(124, 92, 255, .45), transparent 70%), radial-gradient(ellipse 45% 140% at 100% 0%, rgba(56, 189, 248, .32), transparent 70%), radial-gradient(ellipse 40% 120% at 60% 120%, rgba(45, 212, 167, .22), transparent 70%); }
.top-in { max-width: 860px; margin: 0 auto; padding: 0 16px; min-height: 64px; display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--top-ink); text-decoration: none; font-size: 18px; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { width: 38px; height: auto; flex: none; overflow: visible; }
.brand-name b { font-weight: 800; }
.brand-name i { font-style: normal; font-weight: 500; opacity: .78; }
.brand-head { transform-box: fill-box; transform-origin: 30% 70%; transition: transform .45s var(--ease); }
.brand:hover .brand-head { transform: translate(3px, -3px); }
/* 🌓 화면 색 버튼 (theme.js): 로고 오른쪽. 넓은 화면에선 메뉴 바로 왼쪽 */
.theme-slot { margin-left: auto; flex: none; display: flex; min-width: 40px; min-height: 38px; }
.top .theme-slot + nav { margin-left: 0; }
.theme-btn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--gl-line); background: var(--gl-bg); color: var(--top-ink);
  font: 700 14px/1 inherit; font-family: inherit; cursor: pointer; white-space: nowrap; transition: background-color .2s; }
.theme-btn:hover { background: var(--gl-hover); }
.theme-btn:focus-visible { outline-color: #38bdf8; }
.top nav { margin-left: auto; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 99px; color: var(--top-nav); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s; }
.top nav a[aria-current="page"], .top nav a:hover { background: var(--gl-on); color: var(--top-ink); }
@media (max-width: 640px) {
  .top-in { padding-bottom: 8px; }
  .theme-btn { width: 44px; padding: 0; justify-content: center; font-size: 17px; } .theme-txt { display: none; }
  .top nav { margin: 0 -8px; width: calc(100% + 16px); }
  .top nav a { padding: 0 10px; font-size: 13.5px; }
}

main.doc { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 22px 16px 56px; }
.doc h1 { margin: 10px 0 6px; font-size: clamp(27px, 6vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.3; }
.doc .lead { margin: 0 0 22px; color: var(--muted); font-size: 16.5px; }
.doc h2 { margin: 34px 0 10px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.doc h3 { margin: 18px 0 6px; font-size: 16px; font-weight: 800; }
.doc p, .doc li { font-size: 15.5px; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 8px 0; }
.doc li { margin: 4px 0; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px; box-shadow: var(--shadow); margin: 14px 0; }
.box > :first-child { margin-top: 0; }
.box > :last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th, table.t td { text-align: left; vertical-align: top; padding: 9px 8px; border-bottom: 1px solid var(--line); }
table.t th { width: 32%; font-weight: 800; color: var(--th); }
@media (max-width: 560px) {
  table.t, table.t tbody, table.t tr, table.t th, table.t td { display: block; width: 100%; }
  table.t th { border-bottom: 0; padding-bottom: 0; }
}

/* 게임 설명서 */
.g-hero { display: flex; gap: 16px; align-items: center; margin: 8px 0 18px; }
.g-art { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 24px; background: color-mix(in srgb, var(--c, #c9bdff) 22%, #fff); display: grid; place-items: center; overflow: hidden; box-shadow: var(--shadow); }
.g-art svg { width: 100%; height: 100%; }
.g-hero h1 { margin: 0 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips li { margin: 0; padding: 3px 11px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--chip-ink); }
/* 바로 하기 버튼 (대문의 무지개 버튼) */
.play-btn { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 4px; min-height: 52px; padding: 12px 26px; border-radius: 99px; background: var(--grad); color: #fff; font-weight: 700; font-size: 16.5px; line-height: 1.3; text-decoration: none; transition: transform .35s var(--ease); }
.play-btn::after { content: ""; position: absolute; inset: 6px 10px -6px; z-index: -1; border-radius: inherit; background: var(--grad); filter: blur(18px); opacity: .5; transition: opacity .35s; }
@media (hover: hover) { .play-btn:hover { transform: translateY(-3px); } .play-btn:hover::after { opacity: .85; } }
.play-btn:active { transform: scale(.97); }
.ctrl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .ctrl { grid-template-columns: 1fr; } }
.ctrl .box { margin: 0; }
.modes { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.modes .box { margin: 0; padding: 12px 14px; }
.modes b { display: block; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0 14px; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 800; padding: 10px 0; } /* 누르는 칸 높이 44px 넘게 */
.faq details p { margin: 0 0 12px; }

/* 설명서 목록 */
.glist { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 16px 0; padding: 0; list-style: none; }
.glist a { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(var(--line), var(--line)) border-box; color: var(--text); text-decoration: none; box-shadow: var(--shadow); height: 100%; transition: transform .4s var(--ease), box-shadow .4s; }
.glist a:hover, .glist a:focus-visible { border-color: transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box; transform: translateY(-3px); box-shadow: 0 14px 32px rgba(124, 92, 255, .14); }
.glist .g-art { width: 56px; height: 56px; border-radius: 16px; box-shadow: none; }
.glist b { display: block; font-size: 16px; }
.glist span.s { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }
.cat { margin-top: 26px; }

/* 문의 */
form.contact { display: grid; gap: 12px; }
form.contact label { font-weight: 800; font-size: 14px; display: grid; gap: 6px; }
form.contact select, form.contact input, form.contact textarea { font: inherit; font-size: 16px; min-height: 44px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 100%; }
form.contact textarea { min-height: 150px; resize: vertical; }
form.contact select:focus, form.contact input:focus, form.contact textarea:focus { outline: 2px solid var(--focus); border-color: transparent; }
form.contact button { justify-self: start; border: 0; border-radius: 99px; min-height: 48px; padding: 12px 26px; background: var(--grad); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
form.contact button:disabled { opacity: .55; cursor: default; }
.msg { min-height: 1.5em; font-weight: 700; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--err); }

/* 아래쪽 (대문과 같은 모양) */
footer.site { background: var(--foot-bg); color: var(--foot-ink); padding: 36px 0 calc(36px + env(safe-area-inset-bottom)); font-size: 14.5px; line-height: 1.6; }
footer.site .foot-in { max-width: 860px; margin: 0 auto; padding: 0 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
footer.site a { color: inherit; text-decoration: none; transition: color .2s; }
footer.site a:hover { color: var(--foot-hi); }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; }
.foot-brand .brand-mark { width: 32px; }
.foot-brand b { color: var(--foot-hi); font-weight: 800; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 0 18px; margin-left: auto; }
footer.site nav a, .foot-brand { display: inline-flex; align-items: center; min-height: 44px; }
footer.site nav a { justify-content: center; min-width: 44px; }  /* 누르는 곳 44px */
footer.site .foot-note { width: 100%; margin: 0; color: var(--foot-note); font-size: 14px; }
footer.site .copy { width: 100%; margin: 0; padding-top: 14px; border-top: 1px solid var(--foot-rule); color: var(--foot-copy); font-size: 14px; }
@media (max-width: 640px) { footer.site nav { margin-left: 0; width: 100%; } }
.doc .glist, .doc .chips { padding: 0; }
@media (max-width: 480px) {
  .g-hero { align-items: flex-start; gap: 12px; }
  .g-hero > .g-art { width: 72px; height: 72px; border-radius: 18px; }
}

@media (prefers-reduced-motion: no-preference) {
  .brand-head { animation: leap .8s .3s cubic-bezier(.3, 1.6, .5, 1) backwards; }
}
@keyframes leap {
  0% { opacity: 0; transform: translate(-14px, 14px) scale(.4); }
  55% { opacity: 1; transform: translate(6px, -6px) scale(1.08); }
  100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* 문의: 비밀번호 안내 (2026-11-03) */
.safe-note { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--chip, rgba(124,92,255,.1)); border: 1px solid var(--line, rgba(0,0,0,.08)); font-size: 15px; line-height: 1.55; }

/* 광고 칸 (/lp-ads.js, 2026-11-10): 설명서·소개 글 사이에 1개. 승인 전·숨김일 땐 자리 없음 */
.lp-ad[hidden] { display: none !important; }
.lp-ad { display: block; clear: both; width: 100%; max-width: 728px; margin: 32px auto; text-align: center; overflow: hidden; }
.lp-ad::before { content: '광고'; display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
