/* 게임 넣기 안내 3쪽(퍼가기 · 키즈 앱 연동 · 오프라인 SDK) 공통: 맨 위 로고 + 탭, 카드·표·코드 모양을 냥게임즈 그림체(먹색 외곽선 · 크림 종이)로 맞춘다 */
:root { --ink: #3a2f2a; --paper: #f7f1e6; --cream: #fffbf3; --muted: #7a6d60; --yellow: #f6c75a; --butter: #fdeec2; --line: rgba(58, 47, 42, 0.12); }

.p-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 0 0 24px; }
.p-logo { display: block; line-height: 0; }
.p-logo img { width: 132px; height: auto; }
.p-tabs { display: flex; border: 2px solid var(--ink); border-radius: 14px; background: var(--cream); overflow: hidden; }
.p-tabs a { padding: 8px 16px; font-weight: 800; font-size: 0.92rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.p-tabs a + a { border-left: 2px solid var(--ink); }
.p-tabs a:hover { background: var(--butter); }
.p-tabs a[aria-current] { background: var(--yellow); }
.p-tabs a:focus-visible { outline: 3px solid var(--ink); outline-offset: -5px; }

.p-head h1 { margin: 0 0 4px; font-size: 1.6rem; font-weight: 900; letter-spacing: -0.02em; }
.p-head p { margin: 0; color: var(--muted); font-weight: 600; }
.p-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 0; }
.p-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream); color: var(--ink); font-weight: 800; font-size: 0.92rem; text-decoration: none; }
.p-btn.primary { background: var(--yellow); }
.p-btn:hover { background: var(--butter); }
.p-btn.primary:hover { background: #f2bd45; }

@media (max-width: 640px) {
  .p-top { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 20px; }
  .p-logo img { width: 112px; }
  .p-tabs a { flex: 1; text-align: center; padding: 8px 4px; font-size: 0.86rem; }
  .p-head h1 { font-size: 1.36rem; }
}

/* ---------- 안내 문서 (키즈 앱 연동 · 오프라인 SDK) ---------- */
.p-doc { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Pretendard Variable', Pretendard, system-ui, sans-serif; line-height: 1.65; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.p-doc * { box-sizing: border-box; }
.p-doc main { max-width: 860px; margin: 0 auto; padding: 20px 16px 64px; }
.p-doc h2 { font-size: 1.2rem; font-weight: 900; margin: 40px 0 12px; }
.p-doc h3 { font-size: 1rem; font-weight: 800; margin: 24px 0 8px; }
.p-doc p, .p-doc li { font-weight: 500; }
.p-doc main > p a, .p-doc li a, .p-doc td a, .p-doc th a { color: #a8532b; font-weight: 700; }
.p-doc code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; background: #f1e6d2; border-radius: 6px; padding: 1px 6px; }
.p-doc pre { background: var(--ink); color: #f6efe4; border-radius: 16px; padding: 16px; overflow-x: auto; font-size: 0.84rem; line-height: 1.55; margin: 12px 0; }
.p-doc pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.p-doc .table-wrap { overflow-x: auto; border: 2px solid var(--ink); border-radius: 16px; background: var(--cream); margin: 12px 0; }
.p-doc table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.p-doc th, .p-doc td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.p-doc tr:last-child td { border-bottom: 0; }
.p-doc th { background: var(--butter); font-weight: 800; }
.p-doc .card { background: var(--cream); border: 2px solid var(--ink); border-radius: 16px; padding: 16px 20px; }
.p-doc ul.check { padding-left: 20px; }
.p-doc ul.check li { margin: 4px 0; }
.p-doc .tabs { display: inline-flex; flex-wrap: wrap; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--cream); margin: 12px 0 0; }
.p-doc .tabs button { font: inherit; font-weight: 800; font-size: 0.86rem; border: 0; background: none; padding: 6px 14px; cursor: pointer; color: var(--ink); }
.p-doc .tabs button + button { border-left: 2px solid var(--ink); }
.p-doc .tabs button.sel { background: var(--yellow); }
.p-doc .tab[hidden] { display: none; }
@media (max-width: 640px) {
  .p-doc th, .p-doc td { padding: 8px; font-size: 0.86rem; }
  .p-doc td code { overflow-wrap: anywhere; }
  .p-doc .table-wrap.wide table { min-width: 600px; }
  .p-doc .table-wrap.wide code { white-space: nowrap; overflow-wrap: normal; }
  .p-doc .tabs { display: flex; }
  .p-doc .tabs button { flex: 1 1 auto; padding: 6px 8px; }
}

/* 흐름 그림: 앱 → 게임 한 판 → 돌아가기 (동물 친구 얼굴) */
.p-flow { display: grid; grid-template-columns: 1fr 32px 1fr 32px 1fr; align-items: stretch; gap: 0; margin: 24px 0 0; }
.p-flow .st { background: var(--cream); border: 2px solid var(--ink); border-radius: 16px; padding: 12px 12px 16px; text-align: center; }
.p-flow canvas { width: 64px; height: 64px; display: block; margin: 0 auto 4px; }
.p-flow .st > b { display: block; font-size: 1rem; font-weight: 900; }
.p-flow .st > span { display: block; font-size: 0.84rem; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.p-flow .arr { align-self: center; justify-self: center; width: 20px; height: 20px; border-top: 3px solid var(--ink); border-right: 3px solid var(--ink); transform: rotate(45deg); margin-left: -6px; }
@media (max-width: 640px) {
  .p-flow { grid-template-columns: 1fr; gap: 0; }
  .p-flow .st { display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; text-align: left; align-items: center; padding: 12px; }
  .p-flow canvas { width: 56px; height: 56px; margin: 0; grid-row: span 2; }
  .p-flow .st > span { margin-top: 0; }
  .p-flow .arr { transform: rotate(135deg); margin: -2px 0 6px; width: 16px; height: 16px; }
}

/* ---------- 한 페이지로 합친 게임 넣기 안내 (partner/) ---------- */
.p-wide main { max-width: 980px; }
.p-sec { padding-top: 16px; scroll-margin-top: 16px; }
.p-sec > h2 { margin-top: 32px; font-size: 1.36rem; }
.p-lead { margin: 0 0 16px; color: var(--muted); font-weight: 600; }
.p-who { margin-top: 24px; }
.p-who td:first-child { font-weight: 700; white-space: nowrap; }
.p-sub { margin-top: 40px; scroll-margin-top: 16px; }
.p-subh { font-size: 1.12rem; font-weight: 900; margin: 0 0 8px; padding-top: 16px; border-top: 2px dashed rgba(58, 47, 42, 0.25); }
.p-doc h4 { font-size: 0.96rem; font-weight: 800; margin: 24px 0 8px; }
.p-more { margin: 16px 0 0; border: 2px solid var(--ink); border-radius: 16px; background: var(--cream); }
.p-more > summary { cursor: pointer; padding: 12px 20px; font-weight: 800; list-style: none; display: flex; align-items: center; gap: 12px; }
.p-more > summary::-webkit-details-marker { display: none; }
.p-more > summary::before { content: ''; flex: none; width: 8px; height: 8px; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(-45deg); transition: transform 0.15s ease; }
.p-more[open] > summary::before { transform: rotate(45deg); }
.p-more > summary:hover { background: var(--butter); border-radius: 14px; }
.p-more > summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 14px; }
.p-more[open] > summary { border-bottom: 2px solid var(--ink); border-radius: 14px 14px 0 0; }
.p-more > :not(summary) { margin-left: 20px; margin-right: 20px; }
.p-more > :last-child { margin-bottom: 20px; }
.p-more .table-wrap, .p-more pre { background-clip: padding-box; }
.p-callout { background: var(--butter); border: 2px solid var(--ink); border-radius: 16px; padding: 12px 16px; font-size: 0.92rem; font-weight: 600; }
@media (min-width: 641px) {
  .p-wide .p-top { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 12px 0; margin-top: -12px; }
  .p-sec, .p-sub { scroll-margin-top: 72px; }
}
@media (max-width: 640px) {
  .p-sec > h2 { margin-top: 24px; font-size: 1.2rem; }
  .p-who td:first-child { white-space: normal; }
  .p-more > summary { padding: 12px 16px; }
  .p-more > :not(summary) { margin-left: 12px; margin-right: 12px; }
}
.p-doc td:first-child > code { white-space: nowrap; overflow-wrap: normal; }
