/* 색은 앱 Lucky Gloss 테마(app/.../ui/theme/Color.kt)에서 옮긴 값 */
@font-face { font-family: "Noto Sans KR"; src: url("fonts/noto-sans-kr.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Noto Sans JP"; src: url("fonts/noto-sans-jp.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root, [data-theme="light"] {
  --bg: #f6f1e7;
  --surface: #ffffff;
  --surface-low: #fcfaf5;
  --surface-2: #f1ebdd;
  --line: #e4dccb;
  --outline: #d6cdbb;
  --text: #1e2a44;
  --text-2: #4f5869;
  --text-3: #6b7280;
  --primary: #0f8b8d;
  --primary-ink: #0b6e70;
  --primary-soft: #d7efee;
  --gold: #f5b301;
  --gold-soft: #fdecc0;
  --gold-ink: #7a5900;
  --green: #6fbf3b;
  --blue: #1e4b8f;
  --cta: linear-gradient(135deg, var(--navy), #24406b);
  --on-cta: #ffffff;
  --navy: #16233f;
  --hero-grad: linear-gradient(120deg, #1e4b8f, #0f8b8d 45%, #e9930b);
  --headline-grad: var(--hero-grad);
  --shadow-1: 0 1px 2px rgba(30, 42, 68, .06), 0 4px 14px rgba(30, 42, 68, .06);
  --shadow-2: 0 18px 50px rgba(30, 42, 68, .14);
  --nav-bg: rgba(246, 241, 231, .78);
  --scrim: rgba(10, 12, 18, .82);
  --nav-h: 64px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #15161b;
  --surface: #1d1e24;
  --surface-low: #1a1b20;
  --surface-2: #23242b;
  --line: #2e2f36;
  --outline: #4a4a50;
  --text: #ede6d6;
  --text-2: #c7c2b6;
  --text-3: #9d988c;
  --primary: #62d6d6;
  --primary-ink: #62d6d6;
  --primary-soft: rgba(98, 214, 214, .12);
  --gold-soft: rgba(245, 179, 1, .14);
  --gold-ink: #f5c84a;
  --green: #9bd97a;
  --blue: #8db4f0;
  --cta: linear-gradient(135deg, #62d6d6, #3fb8b9);
  --on-cta: #00373a;
  --headline-grad: linear-gradient(120deg, #9cc3ff, #62d6d6 45%, #f5b301);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
  --shadow-2: 0 18px 50px rgba(0, 0, 0, .45);
  --nav-bg: rgba(21, 22, 27, .78);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
/* 일본어 페이지는 한국어 글꼴 대신 Noto Sans JP */
[lang="ja"], [lang="ja"] body { font-family: "Space Grotesk", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; word-break: normal; line-break: strict; }
img { display: block; max-width: 100%; }
a { color: var(--primary-ink); }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 300; padding: 8px 14px; border-radius: 8px; background: var(--text); color: var(--bg); }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* ───────── 내비 ───────── */
.site-nav { position: sticky; top: 0; z-index: 100; background: var(--nav-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-nav.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--text-2); font-size: 15px; text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.lang-switch a { padding: 3px 9px; border-radius: 999px; color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-decoration: none; }
.lang-switch a[aria-current] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text-2); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="light"] .theme-btn .sun, [data-theme="dark"] .theme-btn .moon { display: none; }
.nav-cta { padding: 8px 16px; border-radius: 999px; background: var(--cta); color: var(--on-cta); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
@media (max-width: 900px) { .nav-links { display: none; } }
@media (max-width: 420px) { .nav-right { gap: 10px; } .nav-cta { padding: 7px 12px; } .brand span { display: none; } }

/* ───────── 버튼 ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 16px; font-size: 16px; font-weight: 600; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-cta { background: var(--cta); color: var(--on-cta); box-shadow: var(--shadow-1); }
.btn-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn-ghost { border: 1px solid var(--outline); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.apk-meta { margin-top: 10px; color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ───────── 로또 공 (앱 LottoBall: 좌상단 하이라이트 → 본색 → 아래 림) ───────── */
.ball {
  --c: #fbc400;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .28);
  background:
    radial-gradient(circle at 36% 24%, rgba(255, 255, 255, .55), transparent 28%),
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c), #fff 65%), var(--c) 45%, color-mix(in srgb, var(--c), #000 28%) 85%);
  box-shadow: 0 4px 10px rgba(30, 42, 68, .18);
}
/* 번호대 색은 앱 ballColor(UiHelpers.kt)와 같다 */
.ball[data-b="2"] { --c: #69c8f2; }
.ball[data-b="3"] { --c: #ff7272; }
.ball[data-b="4"] { --c: #aaaaaa; }
.ball[data-b="5"] { --c: #b0d840; }
.balls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px 0 32px; padding: 0; list-style: none; }
.balls .plus { color: var(--text-3); font-weight: 600; margin: 0 2px; }
@media (max-width: 420px) { .balls { gap: 6px; } .ball { width: 38px; height: 38px; font-size: 15px; } }
.balls .bonus { box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--c), #000 38%), 0 4px 10px rgba(30, 42, 68, .18); }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) scale(.9); } to { opacity: 1; transform: none; } }
.js .balls li { animation: drop .5s cubic-bezier(.2, .8, .2, 1.2) backwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
@media (prefers-reduced-motion: reduce) { .js .balls li { animation: none; } }

/* ───────── 첫 화면 ───────── */
/* 내비 밑까지 배경 빛이 이어지게 내비 높이만큼 위로 겹친다 */
.hero { position: relative; margin-top: calc(-1 * var(--nav-h)); padding: calc(var(--nav-h) + 56px) 0 88px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--primary), transparent 82%), transparent); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-ink); font-size: 13px; font-weight: 600; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.headline { margin-top: 20px; }
.headline .l1 { display: block; color: var(--text-2); font-size: 20px; font-weight: 600; }
.headline .l2 { display: block; margin-top: 6px; font-size: clamp(34px, 5.2vw, 56px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; background: var(--headline-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 20px; max-width: 34em; color: var(--text-2); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.hero-dl { display: flex; flex-direction: column; }
.points { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--text-2); font-size: 14px; }
.points li { display: inline-flex; align-items: center; gap: 8px; }
.points svg { width: 16px; height: 16px; color: var(--primary); flex: none; }
.hero-media, .feature-media { display: flex; justify-content: center; }

/* 휴대폰 틀 */
.phone { width: var(--w, 280px); aspect-ratio: 1080 / 2400; padding: 8px; border-radius: 40px; background: #0e0f13; box-shadow: var(--shadow-2), inset 0 0 0 1.5px #2b2d33; }
.phone img { width: 100%; height: 100%; border-radius: 32px; object-fit: cover; }
.hero .phone { --w: 300px; transform: rotate(2deg); }
@media (max-width: 900px) {
  .hero { padding: calc(var(--nav-h) + 32px) 0 64px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero .phone { --w: 240px; transform: none; }
}

/* ───────── 공통 섹션 ───────── */
.band { padding: 96px 0; }
.band.alt { background: var(--surface-low); border-block: 1px solid var(--line); }
.band-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.015em; }
.band-desc { margin-top: 12px; max-width: 40em; color: var(--text-2); font-size: 17px; }
@media (max-width: 600px) { .band { padding: 64px 0; } }

/* 광고 영상: 누르기 전에는 표지 이미지만, 누르면 YouTube 플레이어로 바뀐다 */
.videos { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: center; }
.video-list { margin: 0; padding: 0; list-style: none; }
.video { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 20px; background: #000; box-shadow: var(--shadow-2); -webkit-tap-highlight-color: transparent; }
.video img { width: 100%; height: 100%; object-fit: cover; }
.video-play { position: absolute; inset: 0; width: 64px; height: 64px; margin: auto; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; transition: transform .2s; }
.video-play svg { width: 28px; height: 28px; fill: currentColor; }
.video:hover .video-play { transform: scale(1.08); }
.video-len { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.video-list p { margin-top: 12px; color: var(--text-2); font-size: 15px; line-height: 1.5; }
.video-open { overflow: hidden; }
.video-shade { position: fixed; inset: 0; z-index: 400; background: var(--scrim); }
.video-pop { position: fixed; z-index: 401; overflow: hidden; border-radius: 20px; background: #000; }
.video-pop img, .video-pop iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-close { position: fixed; top: 16px; right: 16px; z-index: 402; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.video-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 760px) {
  .videos { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .video-list { max-width: 260px; }
}

/* 처리 흐름 4단계 */
.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 48px 0 0; padding: 0; list-style: none; }
.stage { --c: var(--primary); position: relative; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-1); }
.stage:nth-child(2) { --c: var(--blue); }
.stage:nth-child(3) { --c: var(--gold); }
.stage:nth-child(4) { --c: var(--green); }
.stage-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: color-mix(in srgb, var(--c), transparent 86%); color: var(--c); }
.stage-ic svg { width: 22px; height: 22px; }
.stage-n { position: absolute; top: 22px; right: 24px; color: var(--text-3); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stage h3 { margin-top: 18px; font-size: 18px; }
.stage p, .card p, .step p { margin-top: 6px; color: var(--text-2); font-size: 15px; }
.stage p { margin-top: 8px; }
@media (max-width: 960px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stages { grid-template-columns: minmax(0, 1fr); } }

/* 기능: 화면 + 설명 줄 */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; margin-top: 72px; }
.feature.rev .feature-media { order: -1; }
.feature-media .phone { --w: 250px; }
.feature-tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); font-size: 13px; font-weight: 600; }
.feature h3 { margin-top: 14px; font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; }
.feature p { margin-top: 14px; color: var(--text-2); font-size: 17px; }
@media (max-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 64px; }
  .feature.rev .feature-media { order: 0; }
  .feature-media .phone { --w: 220px; }
}

/* 기능 카드 */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 80px 0 0; padding: 0; list-style: none; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.card-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-ink); }
.card-ic svg { width: 20px; height: 20px; }
.card h3 { margin-top: 16px; font-size: 17px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards { grid-template-columns: minmax(0, 1fr); } }

/* 사용 방법 */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 48px 0 0; padding: 0; list-style: none; }
.step { position: relative; padding-top: 56px; }
.step::before { content: attr(data-n); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--cta); color: var(--on-cta); font-weight: 700; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 20px; left: 52px; right: -12px; height: 1px; background: var(--outline); }
.step h3 { font-size: 17px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .step { padding: 0 0 28px 60px; min-height: 68px; }
  .step:not(:last-child)::after { top: 48px; bottom: 6px; left: 20px; right: auto; width: 1px; height: auto; }
}

/* 자주 묻는 질문 */
.faq { max-width: 820px; margin: 40px 0 0; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 17px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { padding: 0 0 22px; color: var(--text-2); }

/* 다운로드 */
.outro { padding: 32px 0 96px; }
.outro-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; padding: 48px; border-radius: 28px; background: radial-gradient(60% 120% at 100% 0%, rgba(255, 255, 255, .18), transparent 60%), var(--hero-grad); color: #fff; }
.outro-desc { margin-top: 10px; opacity: .9; }
.notes { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.notes li { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 13px; }
.outro .btn { background: #fff; color: var(--navy); }
.outro .apk-meta { color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
@media (max-width: 760px) {
  .outro-card { grid-template-columns: minmax(0, 1fr); padding: 32px 24px; }
}

/* 푸터 */
.site-foot { padding: 32px 0 48px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--text-2); text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }

/* 404 */
.nf { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 48px 16px; }
.nf h1 { margin-top: 24px; font-size: 32px; font-weight: 800; }
.nf p { margin: 12px 0 28px; color: var(--text-2); }
.nf .balls { justify-content: center; margin: 0; }
