/* Leapinity 천국 — 사이트 모양 (lp-brand.css 다음에 읽어요)
   고유 색: 하늘 #0369a1 (흰 글자 5.9:1, 흰 바탕 글자 5.9:1 / 어둡게 #7dd3fc)
   style-src 'self' 라서 HTML 에 style="…" 을 쓰지 않아요. (JS 에서 el.style.x = … 는 괜찮아요) */
:root {
  --lp-accent: #0369a1; --lp-accent-ink: #0369a1; --lp-accent-ink-dark: #7dd3fc;
  --sky-1: #eaf6ff; --sky-2: #fdf2fb; --sky-3: #fff8ec;
  --stage-ink: #2a3358; --stage-chip: rgba(255, 255, 255, .82); --stage-chip-line: rgba(42, 51, 88, .14);
  --hud-bg: rgba(255, 255, 255, .78);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --sky-1: #17204f; --sky-2: #2a2160; --sky-3: #1b2a5a;
  --stage-ink: #eef0fb; --stage-chip: rgba(22, 29, 69, .82); --stage-chip-line: rgba(255, 255, 255, .2);
  --hud-bg: rgba(22, 29, 69, .78);
} }
:root[data-theme="dark"] {
  --sky-1: #17204f; --sky-2: #2a2160; --sky-3: #1b2a5a;
  --stage-ink: #eef0fb; --stage-chip: rgba(22, 29, 69, .82); --stage-chip-line: rgba(255, 255, 255, .2);
  --hud-bg: rgba(22, 29, 69, .78);
}

html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--lp-card); color: var(--lp-ink); padding: 10px 16px; border-radius: 12px; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a { color: var(--lp-accent-ink); }
:focus-visible { outline: 3px solid var(--lp-focus); outline-offset: 3px; }

/* 맨 위 막대 */
.brand-ico { display: inline-flex; width: 38px; height: 38px; border-radius: 12px; background: #e8f5ff; align-items: center; justify-content: center; flex: none; }
:root[data-theme="dark"] .brand-ico { background: #1d2a5c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-ico { background: #1d2a5c; } }
.lp-theme-btn, .icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border-radius: 999px; border: 1px solid var(--lp-ghost-line); background: var(--lp-ghost-bg); color: var(--lp-ink); font-size: 19px; cursor: pointer; }
.icon-btn[aria-pressed="false"] { opacity: .7; }
.gate-btn { padding: 0 14px; gap: 6px; }
.lp-bar-end { gap: 6px; }
@media (max-width: 440px) {
  .gate-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .gate-btn { width: 44px; padding: 0; }
  .lp-brand b { display: none; }
}
@media (max-width: 340px) { .brand-ico { display: none; } }

/* 첫 화면 */
.hero { padding-top: 40px; padding-bottom: 8px; text-align: center; }
.hero h1 { margin: 10px 0 0; font-size: clamp(34px, 7vw, 56px); font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }
.hero .lead { margin: 14px auto 0; max-width: 640px; font-size: 17px; font-weight: 600; color: var(--lp-soft); line-height: 1.6; letter-spacing: -.01em; }
.hero-pill { display: inline-block; margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--lp-chip); color: var(--lp-chip-ink); font-size: 14px; font-weight: 700; }
.toy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 28px 0 8px; }
.toy-card { display: flex; flex-direction: column; text-decoration: none; color: var(--lp-ink); overflow: hidden; transition: transform .3s var(--lp-ease); }
@media (hover: hover) { .toy-card:hover { transform: translateY(-4px); } }
.toy-card:focus-visible { outline: 3px solid var(--lp-focus); outline-offset: 3px; }
.toy-art { display: flex; align-items: center; justify-content: center; height: 170px; background: linear-gradient(160deg, var(--sky-1), var(--sky-2) 60%, var(--sky-3)); }
.toy-art svg { width: 140px; height: 140px; }
.toy-txt { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; }
.toy-txt b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.toy-txt span { color: var(--lp-soft); font-size: 15px; line-height: 1.55; }
@media (max-width: 560px) {
  .toy-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .toy-art { height: 120px; } .toy-art svg { width: 100px; height: 100px; }
  .toy-txt { padding: 12px 12px 14px; } .toy-txt b { font-size: 16px; } .toy-txt span { font-size: 13.5px; }
}

/* 글 영역 */
.content { padding-top: 28px; padding-bottom: 12px; max-width: 860px; }
.content h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 12px 0 14px; }
.content .intro { color: var(--lp-soft); line-height: 1.7; margin: 0 0 14px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 18px; padding: 14px 16px; }
.steps li > span:last-child { display: flex; flex-direction: column; gap: 4px; line-height: 1.6; }
.steps li > span:last-child > span { color: var(--lp-soft); font-size: 15px; }
.step-n { flex: none; width: 30px; height: 30px; border-radius: 999px; background: var(--lp-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.faq { background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 16px; margin: 0 0 10px; }
.faq summary { cursor: pointer; padding: 14px 16px; min-height: 44px; box-sizing: border-box; font-weight: 700; list-style-position: inside; }
.faq p { margin: 0; padding: 0 16px 16px; color: var(--lp-soft); line-height: 1.7; }
.more-link { margin: 18px 0 30px; }
.foot-cats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; }
.foot-cats a { color: var(--lp-foot-ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot-cats a:hover { color: var(--lp-foot-hi); }
.lp-foot { margin-top: 36px; }

/* 장난감 페이지 공통 */
.toy-nav { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; max-width: var(--lp-wrap); margin: 0 auto; box-sizing: border-box; scrollbar-width: none; }
.toy-nav::-webkit-scrollbar { display: none; }
.toy-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--lp-chip); color: var(--lp-chip-ink); text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; }
.toy-chip[aria-current="page"] { background: var(--lp-accent); color: #fff; }
.toy { max-width: var(--lp-wrap); margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
.toy-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* 놀이판: 파스텔 하늘 (어두운 화면이면 밤하늘) */
.stage { position: relative; width: 100%; height: calc(100svh - 190px); min-height: 380px; max-height: 820px; border-radius: 24px; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 62%, var(--sky-3) 100%); color: var(--stage-ink);
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; box-shadow: var(--lp-shadow); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage:focus-visible { outline: 3px solid var(--lp-focus); outline-offset: 3px; }
@media (max-width: 480px) { .toy { padding: 0 8px; } .stage { border-radius: 18px; } }
@media (orientation: landscape) and (max-height: 520px) { .stage { height: calc(100svh - 76px); min-height: 260px; } .toy-nav { padding: 4px 12px; } }
.hud { position: absolute; display: flex; gap: 8px; align-items: center; pointer-events: none; }
.hud > * { pointer-events: auto; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--hud-bg); color: var(--stage-ink);
  border: 1px solid var(--stage-chip-line); font-weight: 800; font-size: 15px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--stage-chip); color: var(--stage-ink); border: 1px solid var(--stage-chip-line); font: 700 15px/1.2 var(--lp-font); cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .2s var(--lp-ease); }
.tbtn:active { transform: scale(.95); }
.tbtn[aria-pressed="true"] { background: var(--lp-accent); color: #fff; border-color: transparent; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 10px 0 0; }
.tools .tbtn { background: var(--lp-card); color: var(--lp-ink); border-color: var(--lp-line); }
.tools .tbtn[aria-pressed="true"] { background: var(--lp-accent); color: #fff; border-color: transparent; }
.tools-label { width: 100%; text-align: center; font-size: 13px; color: var(--lp-mute); margin: 4px 0 -2px; font-weight: 700; }

/* 포탈 덮개 */
.portal-arrive body::after { content: ''; position: fixed; inset: 0; z-index: 9998; background: #ffffff; }
.portal-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 9999; pointer-events: none; }
.portal-fx.is-blocking { pointer-events: auto; }
.portal-fade { position: fixed; inset: 0; z-index: 9999; background: #ffffff; pointer-events: auto; }

/* 404 */
.nf { padding-bottom: 40px; }
.nf-cloud { font-size: 64px; margin: 0; }
.nf-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
