/* 글 페이지 (게임 설명서 · 소개 · 개인정보처리방침 · 문의) 공통 모양
   색·버튼·위아래 띠는 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: #161c3d;
  --muted: #565d7e;
  --line: #e4e7f1;
  --chip: #f1f3fa;
  --accent: #6a4cf0;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow: 0 10px 30px rgba(22, 28, 61, .07);
  color-scheme: light;
}
*, *::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(--sky); outline-offset: 3px; border-radius: 10px; }

/* 맨 위 띠: 로고 + 메뉴 (어두운 밤색, 첫 화면과 같음) */
.top { position: relative; overflow: hidden; isolation: isolate; background: var(--night); color: #fff; padding-top: env(safe-area-inset-top); }
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  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; color: #fff; 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); }
.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; padding: 7px 12px; border-radius: 99px; color: #c9cff0; 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: rgba(255, 255, 255, .12); color: #fff; }
@media (max-width: 640px) {
  .top-in { padding-bottom: 8px; }
  .top nav { margin: 0 -8px; width: calc(100% + 16px); }
  .top nav a { padding: 6px 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: #3b4266; }
@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: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: #4a5173; }
/* 바로 하기 버튼 (대문의 무지개 버튼) */
.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: 10px 14px; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 800; }
.faq details p { margin: 8px 0 2px; }

/* 설명서 목록 */
.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; 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(--sky); 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: #1f8f5f; }
.msg.err { color: #c43d5c; }

/* 아래쪽 (대문과 같은 모양) */
footer.site { background: #080c26; color: #aab1d6; 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: #fff; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; }
.foot-brand .brand-mark { width: 32px; }
.foot-brand b { color: #fff; font-weight: 800; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: auto; }
footer.site .foot-note { width: 100%; margin: 0; color: #8d95c0; font-size: 14px; }
footer.site .copy { width: 100%; margin: 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .09); color: #6f77a3; 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; }
}
