/* Leapinity Play 첫 화면. 색·카드·버튼·아래쪽은 Leapinity 대문(leapinity.com)과 같은 모양
   색: 보라 #7c5cff → 하늘 #38bdf8 → 민트 #2dd4a7. 위쪽(첫 화면)·아래쪽은 어두운 밤색, 게임 목록은 밝은 바탕
   움직임은 transform·opacity 만. 움직임 줄이기 설정이면 모두 멈춰요(맨 아래)
   🌙 어두운 화면: 색은 모두 아래 :root 변수로. 기기가 어두운 화면이면(자동) 또는 theme.js 로 '어둡게'를 고르면 어두운 값으로 바뀜.
   게임 그림(카드 위쪽·시상대 동그라미)은 두 화면 모두 그대로 밝게 */
:root {
  --vio: #7c5cff; --sky: #38bdf8; --mint: #2dd4a7;
  --grad: linear-gradient(100deg, var(--vio) 0%, var(--sky) 55%, var(--mint) 100%);
  --night: #0b1030; --night2: #121a45;
  --ink: #111827; --soft: #5b6475; --mute: #6b7385;  /* 흰 배경 v3 글씨 색 (기준 mute, 흰 바탕 4.76:1). 옅은 칸 위는 아래에서 sub 색 */
  --bg: #ffffff; --bg-soft: #f5f6fb; --card: #ffffff; --line: #e4e7f1;
  --chip: #f1f3fa; --chip-ink: #5b6475;
  --tint: #ffffff; --tint-ink: #111827;           /* 게임 색(--c)을 섞을 바탕 · 글자 */
  --vio-ink: #6a4cf0; --vio-soft: rgba(124, 92, 255, .1); --vio-soft2: #f1edff;  /* 보라 글자(AA) · 연보라 바탕 */
  --focus: #0284c7;
  --jump-bg: rgba(245, 246, 251, .84);
  --skel-a: #ffffff; --skel-b: #eef0f7;
  --gold-glow: #fff7d1; --gold-top: #fffdf3; --shine: rgba(255, 255, 255, .75);
  --warn-bg: #fff8e0; --warn-line: #ffe7a3; --warn-ink: #8a5f00;
  --ok-bg: #e8faf3; --ok-ink: #0f7556; --err: #c0305c;
  --up-bg: #ffe1ea; --up-ink: #c0305c;
  --down-bg: #e0f2fe; --down-ink: #23699f;
  --new-bg: #dcf8ef; --new-ink: #0f7556;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow: 0 10px 30px rgba(22, 28, 61, .07);
  /* ☀️ 밝은 화면에서 첫 화면 띠·위쪽 막대·아래쪽도 밝게 (어두운 화면 값은 아래 두 곳에서 예전 그대로) */
  --hero-bg: #f4f3ff; --hero-ink: #111827; --hero-tag: #5b6475; --hero-hi: #0f7556; --hero-dots: rgba(22, 28, 61, .09); --hero-blob: .25;
  --hero-pill-bg: rgba(255, 255, 255, .78); --hero-pill-line: rgba(124, 92, 255, .22); --hero-pill-ink: #5b6475;
  --s-ico: #636b7e; --s-line: #d5d9ea; --s-bg: #ffffff; --s-bg-f: #ffffff; --s-ph: #6b7290; --s-x: none;
  --gl-bg: rgba(255, 255, 255, .78); --gl-line: rgba(22, 28, 61, .16); --gl-hover: #efeaff; --gl-hover2: #efeaff;
  --gl-chip: rgba(255, 255, 255, .8); --gl-chip-line: rgba(22, 28, 61, .14); --gl-x: rgba(22, 28, 61, .06); --gl-x-h: rgba(22, 28, 61, .12);
  --foot-bg: #eceef7; --foot-ink: #5b6475; --foot-hi: #111827; --foot-note: #5b6475; --foot-copy: #5b6475; --foot-rule: #d9dcea;
  color-scheme: light;
}
/* 어두운 화면: '자동'이면서 기기가 어두운 화면일 때 + '어둡게'를 골랐을 때 (두 곳 값은 같게) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --ink: #eef1fb; --soft: #a9b1cc; --mute: #929bba;
  --bg: #0b1030; --bg-soft: #0f1438; --card: #161d45; --line: #2b3468;
  --chip: #232b5c; --chip-ink: #c9cef0;
  --tint: #161d45; --tint-ink: #ffffff;
  --vio-ink: #b4a3ff; --vio-soft: rgba(124, 92, 255, .24); --vio-soft2: #2a2466;
  --focus: #38bdf8;
  --jump-bg: rgba(15, 20, 56, .86);
  --skel-a: #161d45; --skel-b: #222a58;
  --gold-glow: rgba(245, 197, 66, .2); --gold-top: #1d2148; --shine: rgba(255, 255, 255, .12);
  --warn-bg: rgba(251, 191, 36, .12); --warn-line: rgba(251, 191, 36, .38); --warn-ink: #fcd56b;
  --ok-bg: rgba(45, 212, 167, .14); --ok-ink: #6ee7c4; --err: #ff8aa6;
  --up-bg: rgba(244, 114, 182, .18); --up-ink: #ff9cbb;
  --down-bg: rgba(56, 189, 248, .18); --down-ink: #8fd3ff;
  --new-bg: rgba(45, 212, 167, .18); --new-ink: #6ee7c4;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --hero-bg: #0b1030; --hero-ink: #fff; --hero-tag: #c9cff0; --hero-hi: #2dd4a7; --hero-dots: rgba(255, 255, 255, .13); --hero-blob: 1;
  --hero-pill-bg: rgba(255, 255, 255, .07); --hero-pill-line: rgba(255, 255, 255, .16); --hero-pill-ink: #d9defa;
  --s-ico: #aeb5da; --s-line: rgba(255, 255, 255, .22); --s-bg: rgba(255, 255, 255, .09); --s-bg-f: rgba(255, 255, 255, .14); --s-ph: #9aa2cc; --s-x: invert(1) brightness(1.4);
  --gl-bg: rgba(255, 255, 255, .08); --gl-line: rgba(255, 255, 255, .24); --gl-hover: rgba(255, 255, 255, .14); --gl-hover2: rgba(255, 255, 255, .16);
  --gl-chip: rgba(255, 255, 255, .1); --gl-chip-line: rgba(255, 255, 255, .2); --gl-x: rgba(255, 255, 255, .12); --gl-x-h: rgba(255, 255, 255, .22);
  --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"] {
  --ink: #eef1fb; --soft: #a9b1cc; --mute: #929bba;
  --bg: #0b1030; --bg-soft: #0f1438; --card: #161d45; --line: #2b3468;
  --chip: #232b5c; --chip-ink: #c9cef0;
  --tint: #161d45; --tint-ink: #ffffff;
  --vio-ink: #b4a3ff; --vio-soft: rgba(124, 92, 255, .24); --vio-soft2: #2a2466;
  --focus: #38bdf8;
  --jump-bg: rgba(15, 20, 56, .86);
  --skel-a: #161d45; --skel-b: #222a58;
  --gold-glow: rgba(245, 197, 66, .2); --gold-top: #1d2148; --shine: rgba(255, 255, 255, .12);
  --warn-bg: rgba(251, 191, 36, .12); --warn-line: rgba(251, 191, 36, .38); --warn-ink: #fcd56b;
  --ok-bg: rgba(45, 212, 167, .14); --ok-ink: #6ee7c4; --err: #ff8aa6;
  --up-bg: rgba(244, 114, 182, .18); --up-ink: #ff9cbb;
  --down-bg: rgba(56, 189, 248, .18); --down-ink: #8fd3ff;
  --new-bg: rgba(45, 212, 167, .18); --new-ink: #6ee7c4;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --hero-bg: #0b1030; --hero-ink: #fff; --hero-tag: #c9cff0; --hero-hi: #2dd4a7; --hero-dots: rgba(255, 255, 255, .13); --hero-blob: 1;
  --hero-pill-bg: rgba(255, 255, 255, .07); --hero-pill-line: rgba(255, 255, 255, .16); --hero-pill-ink: #d9defa;
  --s-ico: #aeb5da; --s-line: rgba(255, 255, 255, .22); --s-bg: rgba(255, 255, 255, .09); --s-bg-f: rgba(255, 255, 255, .14); --s-ph: #9aa2cc; --s-x: invert(1) brightness(1.4);
  --gl-bg: rgba(255, 255, 255, .08); --gl-line: rgba(255, 255, 255, .24); --gl-hover: rgba(255, 255, 255, .14); --gl-hover2: rgba(255, 255, 255, .16);
  --gl-chip: rgba(255, 255, 255, .1); --gl-chip-line: rgba(255, 255, 255, .2); --gl-x: rgba(255, 255, 255, .12); --gl-x-h: rgba(255, 255, 255, .22);
  --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%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html, body { margin: 0; }
body {
  min-height: 100vh; background: var(--bg-soft); color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  word-break: keep-all; overflow-wrap: break-word; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
svg { display: block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--card); color: var(--ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-block; margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .01em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 첫 화면 (어두운 띠) ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; background: var(--hero-bg); color: var(--hero-ink); padding-bottom: 46px; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; opacity: var(--hero-blob); }
.b1 { width: 60vmax; height: 60vmax; left: -22vmax; top: -30vmax; background: radial-gradient(closest-side, rgba(124, 92, 255, .55), rgba(124, 92, 255, 0)); animation: drift1 22s ease-in-out infinite alternate; }
.b2 { width: 52vmax; height: 52vmax; right: -22vmax; top: -16vmax; background: radial-gradient(closest-side, rgba(56, 189, 248, .40), rgba(56, 189, 248, 0)); animation: drift2 26s ease-in-out infinite alternate; }
.b3 { width: 46vmax; height: 46vmax; left: 20vmax; bottom: -34vmax; background: radial-gradient(closest-side, rgba(45, 212, 167, .32), rgba(45, 212, 167, 0)); animation: drift3 30s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(12vmax, 6vmax) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-10vmax, 8vmax) scale(.92); } }
@keyframes drift3 { to { transform: translate(8vmax, -6vmax) scale(1.08); } }
.dots { position: absolute; inset: 0; background-image: radial-gradient(var(--hero-dots) 1px, transparent 1.4px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 0%, transparent 75%); }

/* 맨 위 막대: 로고 + 로그인 */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding-top: env(safe-area-inset-top); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; color: var(--hero-ink); text-decoration: none; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { width: 40px; 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); }

.hero-in { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 26px; }
.eyebrow-pill { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 15px; border-radius: 99px; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  background: var(--hero-pill-bg); border: 1px solid var(--hero-pill-line); color: var(--hero-pill-ink); }
.eyebrow-pill span { color: var(--hero-hi); }
.hero h1 { margin: 14px 0 0; font-size: clamp(38px, 7vw, 68px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
.hero-tag { margin: 14px auto 0; max-width: 30em; font-size: clamp(16px, 1.9vw, 19px); font-weight: 600; color: var(--hero-tag); line-height: 1.55; }
.hero .count { margin: 10px 0 0; min-height: 1.4em; font-size: 14px; font-weight: 700; color: var(--hero-hi); }

/* 게임 찾기 */
.search { position: relative; width: min(520px, 100%); margin-top: 22px; }
.search svg { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--s-ico); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.search input { width: 100%; height: 54px; padding: 0 20px 0 50px; border-radius: 99px; border: 1px solid var(--s-line); background: var(--s-bg); color: var(--hero-ink);
  font: 600 16px/1 inherit; font-family: inherit; -webkit-appearance: none; appearance: none; transition: border-color .2s, background-color .2s; }
.search input::placeholder { color: var(--s-ph); }
.search input:focus { outline: none; border-color: var(--sky); background: var(--s-bg-f); box-shadow: 0 0 0 4px rgba(56, 189, 248, .22); }
.search input::-webkit-search-cancel-button { filter: var(--s-x); cursor: pointer; }
.hero-links { margin: 16px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* 버튼 (대문과 같음) */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 99px; font-size: 15px; font-weight: 700;
  text-decoration: none; transition: transform .35s var(--ease); isolation: isolate; }
.btn svg:not(.lp-icon) { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.btn-grad { color: #fff; background: var(--grad); }
.btn-grad::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; }
.btn-ghost { color: var(--hero-ink); background: var(--gl-bg); border: 1px solid var(--gl-line); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-3px); }
  .btn:hover svg:not(.lp-icon) { transform: translateX(4px); }
  .btn-grad:hover::after { opacity: .85; }
  .btn-ghost:hover { background: var(--gl-hover); }
}
.btn:active { transform: scale(.97); }

/* ---------- ⭐ 처음이면 이거! (추천 3개, 휴대폰은 세 칸 세로 타일) ---------- */
.starter { position: relative; z-index: 1; max-width: 800px; margin: 22px auto 0; padding: 0 16px; }
.starter.hidden, .searching .starter { display: none; }
.starter-head { display: flex; align-items: center; flex-wrap: wrap; column-gap: 10px; padding-right: 48px; position: relative; margin-bottom: 10px; }
.starter-head h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.starter-head p { margin: 0; color: var(--soft); font-size: 14px; }
.starter-x { position: absolute; right: -4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--mute); cursor: pointer; }
.starter-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.starter-x:hover, .starter-x:focus-visible { background: var(--chip); color: var(--ink); }
.starter-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.starter-list li.hidden { display: none; }
.starter-list a { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 10px 14px 10px 10px; border-radius: 20px; text-decoration: none; color: var(--ink);
  background: linear-gradient(color-mix(in srgb, var(--c) 10%, var(--card)), color-mix(in srgb, var(--c) 10%, var(--card))) padding-box, linear-gradient(120deg, color-mix(in srgb, var(--c) 55%, transparent), var(--line)) border-box;
  border: 1.5px solid transparent; box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s; }
.starter-list a:hover, .starter-list a:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 30px color-mix(in srgb, var(--c) 30%, transparent); }
.st-art { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #fff 0 55%, color-mix(in srgb, var(--c) 25%, #fff) 56%); }
.st-art svg { width: 72%; height: 72%; filter: drop-shadow(0 1px 1px rgba(22,28,61,.3)); }
.st-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-txt b { font-size: 16px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.st-txt small { font-size: 13px; color: var(--soft); line-height: 1.35; }
@media (max-width: 640px) {
  .starter { margin-top: 18px; padding: 0 12px; }
  .starter-head h2 { font-size: 17px; }
  .starter-head p { font-size: 13px; }
  .starter-list { gap: 8px; }
  .starter-list a { flex-direction: column; justify-content: flex-start; text-align: center; gap: 6px; padding: 12px 6px; min-height: 0; height: 100%; border-radius: 18px; }
  .st-art { width: 48px; height: 48px; }
  .st-txt b { font-size: 14.5px; word-break: keep-all; }
  .st-txt small { font-size: 12px; word-break: keep-all; }
}

/* ---------- 인기 차트: 시상대 (2등 · 1등 · 3등) ---------- */
.chart { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; padding: 34px 16px 6px; }
.chart-head { text-align: center; margin-bottom: 16px; display: flex; flex-direction: column; align-items: center; }
.chart-head h2 { margin: 6px 0 0; display: inline-flex; align-items: center; gap: 8px; font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -.03em; }
.chart-head p:last-child { margin: 4px 0 0; color: var(--soft); font-size: 15px; }
.podium { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; }
.podium:has(> :only-child) { grid-template-columns: minmax(0, 240px); justify-content: center; }
.podium:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 240px)); justify-content: center; }
/* 넓은 화면은 시상대 모양(2등 · 1등 · 3등), 휴대폰은 1 · 2 · 3 차례 (HTML 은 1·2·3 순서) */
@media (min-width: 561px) { .podium:has(> :nth-child(3)) > .r2 { order: -1; } }
.pod a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px 0; border-radius: 24px 24px 18px 18px; text-decoration: none; color: inherit; overflow: hidden;
  background: linear-gradient(180deg, var(--card) 0%, color-mix(in srgb, var(--c) 12%, var(--tint)) 100%); border: 1px solid color-mix(in srgb, var(--m) 50%, var(--tint));
  box-shadow: 0 12px 30px color-mix(in srgb, var(--m) 22%, transparent); transition: transform .4s var(--ease), box-shadow .4s; }
.pod a:hover, .pod a:focus-visible { transform: translateY(-5px); box-shadow: 0 18px 38px color-mix(in srgb, var(--m) 36%, transparent); }
.pod.r1 { --m: #f5c542; } .pod.r2 { --m: #b8c2d6; } .pod.r3 { --m: #e3a374; }
.pod.r1 a { padding-top: 26px; background: radial-gradient(circle at 50% 0%, var(--gold-glow) 0%, transparent 60%), linear-gradient(180deg, var(--gold-top) 0%, color-mix(in srgb, var(--c) 14%, var(--tint)) 100%); }
.pod.r1 a::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, var(--shine) 50%, transparent 65%); transform: translateX(-100%); animation: shine 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 30%, 100% { transform: translateX(100%); } }
.medal { position: absolute; top: 8px; left: 10px; font-size: 26px; line-height: 1; filter: drop-shadow(0 3px 4px rgba(0,0,0,.12)); }
.pod.r1 .medal { font-size: 32px; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-6deg); } }
.pod-art { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #fff 0 55%, color-mix(in srgb, var(--c) 25%, #fff) 56%); box-shadow: 0 0 0 4px color-mix(in srgb, var(--m) 45%, #fff); }
.pod.r1 .pod-art { width: 96px; height: 96px; box-shadow: 0 0 0 5px var(--m), 0 10px 24px rgba(245,197,66,.35); }
.pod-art svg { width: 70%; height: 70%; filter: drop-shadow(0 1px 1px rgba(22,28,61,.35)); }
.pod-name { margin-top: 4px; font-size: 16px; font-weight: 800; letter-spacing: -.02em; text-align: center; line-height: 1.25; }
.pod.r1 .pod-name { font-size: 18px; }
.pod-meta { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; color: var(--mute); font-size: 12.5px; font-weight: 700; }
.pod-basis { white-space: nowrap; }
.chart-rule { margin: 8px auto 0; text-align: center; color: var(--soft); font-size: 14px; }
.chart-rule summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 99px; cursor: pointer; list-style: none; font-weight: 700; }
.chart-rule summary::-webkit-details-marker { display: none; }
.chart-rule summary:hover, .chart-rule summary:focus-visible { background: var(--chip); color: var(--ink); }
.chart-rule p { margin: 4px auto 0; max-width: 30em; line-height: 1.55; }
.mv { padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.mv.up { background: var(--up-bg); color: var(--up-ink); }
.mv.down { background: var(--down-bg); color: var(--down-ink); }
.mv.same { background: var(--chip); color: var(--mute); }
.mv.fresh { background: var(--new-bg); color: var(--new-ink); }
.step { align-self: stretch; margin: 8px -10px 0; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,.15);
  background: linear-gradient(180deg, color-mix(in srgb, var(--m) 85%, #fff), var(--m)); height: 34px; }
.pod.r1 .step { height: 52px; font-size: 28px; }
.pod.r2 .step { height: 40px; }

/* ---------- 장르 바로 가기 (위에 붙어 다님, 좌우로 넘김) ---------- */
.jump { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px max(16px, calc((100% - 1128px) / 2)); margin: 18px 0 4px;
  background: var(--jump-bg); border-bottom: 1px solid transparent; -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); }
.jump::-webkit-scrollbar { display: none; }
.jump:empty { display: none; }
/* 불러오는 동안 차트·장르 바로 가기 자리를 미리 잡아 둠 (나중에 채워질 때 아래 카드가 밀려 내려가지 않게) */
.jump.pending:empty { display: block; height: 65px; }
.chart.loading { min-height: 412px; }
.chart.loading .podium { height: 244px; border-radius: 22px; background: linear-gradient(90deg, var(--skel-b), var(--line), var(--skel-b)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.jump a { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 15px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: border-color .2s, color .2s, background-color .2s; }
.jump a:hover, .jump a:focus-visible { border-color: transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box; color: var(--vio-ink); }

/* ---------- 장르 줄 ---------- */
main { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: 0 0 56px; }
.row { margin-top: 26px; scroll-margin-top: 64px; }
.row-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 0 16px; margin-bottom: 10px; }
.row-head h2 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.03em; display: flex; align-items: center; gap: 8px; }
.row-head h2::before { content: ""; width: 6px; height: 22px; border-radius: 99px; background: linear-gradient(var(--vio), var(--sky) 60%, var(--mint)); }
.row-head h2 small { font-size: 12px; font-weight: 800; color: var(--vio-ink); background: var(--vio-soft); padding: 2px 9px; border-radius: 99px; }
.row-head p { margin: 0; color: var(--soft); font-size: 14px; }
.arrows { margin-left: auto; display: flex; gap: 6px; align-self: center; }
.arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 800 22px/1 inherit; font-family: inherit; cursor: pointer; box-shadow: var(--shadow); transition: border-color .2s, color .2s; }
.arrow:not(:disabled):hover { border-color: var(--vio); color: var(--vio-ink); }
.arrow:disabled { opacity: .35; cursor: default; }
.row.fits .arrows { visibility: hidden; }
.rail { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; padding: 8px 16px 26px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 16px; }
.rail .card { flex: 0 0 270px; scroll-snap-align: start; }
/* 검색 결과는 여러 줄로 펼쳐서 (찾는 동안 인기 차트는 숨김) */
.searching .chart, .searching .spin { display: none; }
.row.found .rail { flex-wrap: wrap; overflow: visible; scroll-snap-type: none; }
.row.found .arrows { display: none; }
.new { position: absolute; top: 12px; left: 12px; padding: 3px 9px; border-radius: 99px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; box-shadow: 0 4px 12px rgba(124, 92, 255, .4); }

/* 게임 카드: 대문 카드처럼 둥글고, 올리면 무지개 테두리 + 빛 */
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 24px; border: 1px solid var(--line);
  background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(var(--line), var(--line)) border-box;
  color: inherit; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .45s var(--ease), box-shadow .45s; -webkit-tap-highlight-color: transparent;
}
a.card:hover, a.card:focus-visible { border-color: transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box;
  transform: translateY(-6px); box-shadow: 0 18px 40px rgba(124, 92, 255, .16), 0 8px 30px rgba(56, 189, 248, .14); }
a.card:focus-visible { outline: none; }
a.card:active { transform: scale(.985); }
.card .art { position: relative; height: 150px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 58%, rgba(255,255,255,.94) 0 27%, transparent 59%), radial-gradient(circle at 18% 18%, rgba(255,255,255,.72) 0 4px, transparent 5px), linear-gradient(160deg, color-mix(in srgb, var(--c) 14%, #fff), color-mix(in srgb, var(--c) 36%, #fff)); background-size: auto, 28px 28px, auto; }
.card .art svg { width: 110px; height: 110px; filter: drop-shadow(0 1px 1.2px rgba(22, 28, 61, .45)) drop-shadow(0 8px 12px color-mix(in srgb, var(--c) 40%, transparent)); transition: transform .4s var(--ease); }
a.card:hover .art svg { transform: scale(1.08) rotate(-4deg); }
.ribbon { position: absolute; top: 14px; right: -34px; transform: rotate(35deg); padding: 4px 40px; background: var(--night); color: #fff; font-size: 12px; font-weight: 800; }
.card .body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.card h3 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.meta span { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.concept { background: color-mix(in srgb, var(--c) 16%, var(--tint)); color: color-mix(in srgb, var(--c) 45%, var(--tint-ink)); }
.players { background: var(--chip); color: var(--chip-ink); }
/* 나이 표시 (기타 등등의 인생 체험 '14세 이상', 2026-11-15) */
.age { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }
/* 📦 기타 등등: 장르 줄 맨 아래, 점선으로 보통 게임 줄과 나눔 */
.row.extra { margin-top: 44px; padding-top: 26px; border-top: 2px dashed var(--line); }
.desc { margin: 0; color: var(--soft); font-size: 14.5px; line-height: 1.6; flex: 1; }
.notice { margin: 0; padding: 8px 10px; border-radius: 12px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); font-size: 13px; font-weight: 700; }
.play { align-self: flex-start; margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 15px; color: var(--ink); }
.play::after { content: '→'; color: var(--sky); transition: transform .4s var(--ease); }
a.card:hover .play::after { transform: translateX(5px); }
.card.soon { opacity: .75; }
.card.soon .play { color: var(--mute); }
.card.soon .play::after { content: ''; }
.skeleton { height: 330px; background: linear-gradient(90deg, var(--skel-a), var(--skel-b), var(--skel-a)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.error, .empty { text-align: center; color: var(--soft); padding: 30px 16px; }

/* ---------- 사이트 소개 글 (검색·처음 온 사람용, JS 없이도 보임) ---------- */
.intro { margin-top: 24px; margin-bottom: 56px; color: var(--soft); font-size: 15.5px; line-height: 1.75; }
/* 🔒 보호자·선생님 한 줄 (홈 아래쪽, 작고 흐리게) → /about/#safety */
.guard-note { margin-top: -40px; margin-bottom: 24px; font-size: 13.5px; line-height: 1.5; }
.guard-note a { display: inline-block; min-height: 44px; padding: 11px 0; color: var(--mute); text-decoration: none; }
.guard-note a:hover, .guard-note a:focus-visible { color: var(--ink); }
.guard-note .gn-more { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.intro h2 { margin: 0 0 10px; color: var(--ink); font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.intro h3 { margin: 0 0 6px; color: var(--ink); font-size: 17px; font-weight: 800; }
.intro p { margin: 0 0 12px; }
.intro a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.intro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.intro-grid > div { padding: 18px 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.intro-grid p { margin: 0; font-size: 14.5px; line-height: 1.65; }

/* ---------- 아래쪽 (대문과 같은 모양) ---------- */
.foot { background: var(--foot-bg); color: var(--foot-ink); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 15px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.foot a { color: inherit; text-decoration: none; transition: color .2s; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--foot-hi) !important; font-size: 16px; letter-spacing: -.01em; }
.foot-brand .brand-mark { width: 34px; }
.foot-brand span { color: var(--foot-ink); }
.foot-brand b { color: var(--foot-hi); font-weight: 800; }
.foot-brand:hover span { color: var(--foot-hi); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin-left: auto; }
.foot-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }  /* 누르는 곳 44px (Leapinity 스타일 가이드) */
.foot-brand { min-height: 44px; }
.foot-links a:hover { color: var(--foot-hi); }
.foot-note { width: 100%; margin: 0; color: var(--foot-note); font-size: 14px; }
.copy { width: 100%; margin: 0; padding-top: 16px; border-top: 1px solid var(--foot-rule); color: var(--foot-copy); font-size: 14px; }
@media (max-width: 640px) { .foot-links { margin-left: 0; width: 100%; } }

/* ---------- 통합 로그인: 위쪽 칩과 로그인 창 (public/me.js) ---------- */
.me-bar { margin-left: auto; display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-height: 40px; min-width: 0; }
.me-chip { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 40vw; height: 40px; padding: 0 14px; border-radius: 99px; background: var(--gl-chip); border: 1px solid var(--gl-chip-line); color: var(--hero-ink); font-size: 14px; }
.me-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-btn { flex: none; min-height: 44px; padding: 8px 16px; border-radius: 99px; border: 1px solid transparent; background: var(--grad); color: #fff; font: 700 14px/1 inherit; font-family: inherit; cursor: pointer; transition: transform .3s var(--ease); }
.me-btn:active { transform: scale(.97); }
.me-btn.ghost { background: var(--gl-bg); border-color: var(--gl-line); color: var(--hero-ink); }
.me-btn.primary { background: var(--grad); color: #fff; border: 0; }
.me-btn:disabled { opacity: .6; cursor: default; }
.me-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(11, 16, 48, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.me-sheet { width: min(380px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 24px 20px; border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: 0 24px 60px rgba(11, 16, 48, .35); }
.me-sheet h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.me-sub, .me-fine { margin: 0; color: var(--soft); font-size: 14px; line-height: 1.45; }
.me-fine { font-size: 12px; color: var(--mute); }
.me-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 99px; background: var(--chip); }
.me-tabs button { min-height: 44px; border: 0; border-radius: 99px; background: transparent; color: var(--chip-ink); font: 700 14px/1 inherit; font-family: inherit; cursor: pointer; }
.me-tabs button[aria-pressed="true"] { background: var(--card); color: var(--vio-ink); box-shadow: 0 2px 8px rgba(22, 28, 61, .12); }
.me-sheet input { min-height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-soft); font: 600 16px/1 inherit; font-family: inherit; color: var(--ink); }
.me-sheet input:focus { outline: 2px solid var(--focus); border-color: transparent; }
.me-sheet .me-btn.ghost { background: var(--card); border-color: var(--line); color: var(--soft); }
.me-msg { margin: 0; min-height: 1.2em; color: var(--err); font-size: 13.5px; font-weight: 700; }
.me-row { display: flex; gap: 8px; justify-content: flex-end; }
/* Leapinity 계정 (2026-11-03): 내 계정·복구 코드·비밀번호 되찾기 */
.me-chipbtn { cursor: pointer; font: inherit; font-family: inherit; min-height: 44px; height: auto; }
.me-chipbtn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.me-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.me-sheet { max-height: calc(100dvh - 32px); overflow-y: auto; }
.me-link { min-height: 44px; border: 0; background: none; color: var(--vio-ink); font: 700 14px/1.2 inherit; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.me-code { margin: 4px 0; padding: 14px 10px; border-radius: 16px; background: var(--bg-soft); border: 2px dashed var(--line); text-align: center; font: 900 24px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 2px; color: var(--ink); user-select: all; }
.me-row2 { justify-content: stretch; } .me-row2 .me-btn { flex: 1; }
.me-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 700; cursor: pointer; }
.me-check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--vio-ink); }
.me-msg.ok { color: var(--soft); }
.me-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.me-dl dt { color: var(--mute); } .me-dl dd { margin: 0; }
.me-games { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; max-height: 160px; overflow-y: auto; }
.me-games li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg-soft); }
.me-games small { color: var(--mute); }
/* 옅은 칸(칩·시상대·내 게임 줄) 위 작은 회색 글씨는 sub 색 (대비 4.5:1). 어두운 화면 값은 그대로 */
.mv.same, .me-games li, .pod a { --mute: #5b6475; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.mv.same, .me-games li, .pod a) { --mute: #929bba; } }
:root[data-theme="dark"] :is(.mv.same, .me-games li, .pod a) { --mute: #929bba; }
.me-list { display: grid; gap: 6px; } .me-list .me-btn { width: 100%; }

/* ---------- 🌓 화면 색 버튼 (theme.js 가 채움): 자동 → 밝게 → 어둡게 ---------- */
.theme-slot { flex: none; display: flex; min-width: 44px; min-height: 44px; }
.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(--hero-ink);
  font: 700 14px/1 inherit; font-family: inherit; cursor: pointer; white-space: nowrap; transition: background-color .2s; }
.theme-btn:hover { background: var(--gl-hover2); }
.theme-btn:focus-visible { outline-color: #38bdf8; }
@media (max-width: 560px) { .theme-btn { width: 44px; padding: 0; justify-content: center; font-size: 17px; } .theme-txt { display: none; } }

/* ---------- 휴대폰 ---------- */
@media (max-width: 560px) {
  .brand { font-size: 17px; gap: 8px; }
  .brand-mark { width: 34px; }
  .hero { padding-bottom: 32px; }
  .hero-in { padding-top: 14px; }
  .hero-tag { font-size: 15.5px; }
  .hero h1 { margin-top: 10px; }
  .hero-tag { margin-top: 10px; }
  .search { margin-top: 14px; }
  .search input { height: 50px; }
  .hero-links { margin-top: 12px; }
  .hero-links .btn { height: 44px; font-size: 14px; }
  .btn { height: 44px; padding: 0 18px; font-size: 14.5px; }
  .chart { padding: 26px 12px 4px; }
  .chart-head { margin-bottom: 12px; }
  .chart-head p:last-child { font-size: 13.5px; }
  .chart.loading { min-height: 354px; } .chart.loading .podium { height: 194px; }
  .jump.pending:empty { height: 65px; }
  .podium { gap: 8px; }
  .pod a { padding: 14px 6px 0; border-radius: 18px 18px 14px 14px; }
  .pod.r1 a { padding-top: 20px; }
  .medal { font-size: 20px; top: 6px; left: 7px; }
  .pod.r1 .medal { font-size: 24px; }
  .pod-art { width: 56px; height: 56px; }
  .pod.r1 .pod-art { width: 70px; height: 70px; }
  .pod-name { font-size: 13.5px; }
  .pod.r1 .pod-name { font-size: 15px; }
  .pod-meta { font-size: 11px; gap: 4px; }
  .step { margin: 6px -6px 0; height: 28px; font-size: 18px; }
  .pod.r1 .step { height: 42px; font-size: 22px; }
  .pod.r2 .step { height: 34px; }
  .jump { margin-top: 12px; }
  .jump a { height: 44px; font-size: 13px; padding: 0 12px; }
  .arrows { display: none; }
  .row { margin-top: 18px; }
  .row-head { margin-bottom: 6px; }
  .row-head h2 { font-size: 19px; }
  .row-head p { font-size: 12.5px; width: 100%; }
  .rail { gap: 10px; padding-bottom: 18px; }
  .rail .card { flex-basis: 42vw; max-width: 200px; }
  .row.found .rail .card { flex: 0 0 calc(50% - 5px); max-width: none; }
  .card { border-radius: 18px; }
  .card .art { height: 96px; }
  .card .art svg { width: 70px; height: 70px; }
  .card .body { padding: 10px 11px 12px; gap: 6px; }
  .card h3 { font-size: 16px; }
  .meta span { font-size: 10.5px; padding: 2px 7px; }
  .meta .concept { display: none; }
  .desc { font-size: 12.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .notice { font-size: 11.5px; padding: 6px 8px; }
  .play { font-size: 13px; }
  .ribbon { font-size: 10px; right: -38px; }
  .new { top: 8px; left: 8px; font-size: 10px; padding: 2px 7px; }
  .foot { font-size: 14px; }
}
@media (max-width: 380px) {
  .brand-name i { display: none; }
  .me-chip { max-width: 34vw; }
}

/* ---------- 움직임 줄이기 ---------- */
@media (prefers-reduced-motion: no-preference) {
  .brand-head { animation: leap .8s .4s 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; }
}
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* ⚡ 빠르게: 화면 아래쪽(처음에 안 보이는) 장르 줄 · 소개 · 바닥은 스크롤해서 가까이 올 때 그림 (보이는 모습은 같음)
   contain-intrinsic-size = 그리기 전 자리 크기 (실제 높이와 같게: PC 452px, 휴대폰 324px). auto 라서 한 번 그린 뒤엔 진짜 크기를 기억함 */
#rows > .row:not(.found):nth-child(n+3), .intro, .foot { content-visibility: auto; contain-intrinsic-size: auto 452px; }
.intro { contain-intrinsic-size: auto 366px; }
.foot { contain-intrinsic-size: auto 182px; }
@media (max-width: 560px) {
  #rows > .row:not(.found):nth-child(n+3) { contain-intrinsic-size: auto 324px; }
  .intro { contain-intrinsic-size: auto 830px; }
  .foot { contain-intrinsic-size: auto 214px; }
}

/* ---------- 흰 배경 v3 그림 (2026-11-08): 이모지 대신 Leapinity 그림(lp-icons.js). 색은 그림 안에 들어 있어요 ---------- */
.lp-icon { flex: none; display: inline-block; vertical-align: middle; }
.emo { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.starter-head h2 .emo, .intro h3 .emo { margin-right: 8px; }

.intro h3 .emo { vertical-align: -4px; }
.guard-note .emo { margin-right: 4px; vertical-align: -3px; }
.jump a .lp-icon { margin-right: 0; }
.me-btn, .me-chip { gap: 6px; }
#meIn { display: inline-flex; align-items: center; }
#meIn .lp-icon { stroke: #fff; }   /* 보라 그러데이션 단추 위라서 그림 선만 흰색 */
.theme-btn .lp-icon, .me-chip .lp-icon { flex: none; }

/* 광고 칸 (/lp-ads.js, 2026-11-10): 게임 목록·소개 글 아래 1개. 승인 전·숨김일 땐 자리 없음 */
.lp-ad[hidden] { display: none !important; }
.lp-ad { display: block; width: calc(100% - 32px); max-width: 728px; margin: 16px auto 48px; text-align: center; overflow: hidden; }
.lp-ad::before { content: '광고'; display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--mute); }
