/* DATA PICK — 따뜻한 종이색 배경, 짙은 남색 브랜드, 절제된 금색 포인트.
   공 색상은 익숙한 공식 번호대 색을 차분하게 낮춰 씁니다. 다크 모드는 시스템 설정을 따릅니다. */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --ink: #16181d;
  --ink-2: #3a3e47;
  --muted: #747985;
  --line: #e4e1d9;
  --brand: #1d3557;
  --brand-ink: #ffffff;
  --brand-soft: #e8edf5;
  --gold: #a87b22;
  --good: #2f7d5b;
  --good-soft: #e7f3ed;
  --warn: #b4542d;
  --warn-soft: #fbeee8;
  --shadow: 0 1px 2px rgba(22, 24, 29, .04), 0 8px 24px rgba(22, 24, 29, .06);
  --radius: 18px;
  --radius-sm: 12px;
  --ball-1: #f2c14b; --ball-1-ink: #3b2a00;
  --ball-2: #5a86e0; --ball-3: #e2665c; --ball-4: #9aa0aa; --ball-5: #4caf80;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a20;
    --surface-2: #1d2128;
    --ink: #eceef1;
    --ink-2: #c7cbd3;
    --muted: #979daa;
    --line: #2a2f38;
    --brand: #e6ebf3;
    --brand-ink: #11141a;
    --brand-soft: #232a36;
    --gold: #d8b263;
    --good: #6cc49a;
    --good-soft: #1b2a23;
    --warn: #e59473;
    --warn-soft: #2d201b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
    --ball-1: #e3b445; --ball-2: #4f78cc; --ball-3: #cf5b52; --ball-4: #7e848f; --ball-5: #3f9a6f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg);
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.6; letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
button, a, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
h1, h2, h3, h4, p { word-break: keep-all; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.shell { width: min(100%, 720px); margin: 0 auto; padding: 0 20px calc(48px + env(safe-area-inset-bottom)); }

/* ---------- 머리글 ---------- */
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); }
.brand-mark::after { content: ""; position: absolute; right: 5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: .06em; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.quota-badge { padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); background: var(--surface); font-size: 12px; font-weight: 600; white-space: nowrap; }
.site-nav { display: flex; gap: 4px; margin: 0 -4px 8px; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { flex: none; padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--ink); }

/* ---------- 공통 타이포·버튼 ---------- */
.eyebrow { margin: 0 0 10px; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
h1 { margin: 0; font-size: clamp(30px, 7.4vw, 44px); line-height: 1.22; letter-spacing: -.035em; font-weight: 800; }
h2 { margin: 0; font-size: clamp(24px, 6vw, 30px); line-height: 1.3; letter-spacing: -.03em; }
h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.section-copy, .hero-copy { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.view { display: none; animation: reveal .3s ease both; }
.view.active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn-primary { color: var(--brand-ink); background: var(--brand); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-lg { min-height: 56px; font-size: 17px; }

.primary-action, .secondary-action { width: 100%; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; cursor: pointer; text-align: left; transition: transform .1s, border-color .15s; }
.primary-action { border: 0; color: var(--brand-ink); background: var(--brand); }
.secondary-action { border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.primary-action:active, .secondary-action:active { transform: scale(.985); }
.primary-action strong, .secondary-action strong, .primary-action small, .secondary-action small { display: block; }
.primary-action strong, .secondary-action strong { font-size: 15px; }
.primary-action small, .secondary-action small { margin-top: 2px; opacity: .72; font-size: 12px; }
.arrow { margin-left: auto; font-size: 18px; }
.compact { margin-top: 16px; }
button[disabled] { opacity: .5; cursor: not-allowed; }
.back-button { margin: 12px 0 28px; padding: 6px 0; border: 0; color: var(--muted); background: none; font-size: 14px; cursor: pointer; }
.notice { margin: 28px 4px 0; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; }

/* ---------- 카드 ---------- */
.card, .report-section { position: relative; margin-top: 20px; padding: 22px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head a { color: var(--muted); font-size: 13px; text-decoration: none; white-space: nowrap; }
.card-head a:hover { color: var(--ink); }
.report-section h3 { margin-bottom: 16px; }
.section-number { display: none; }

/* ---------- 메인 ---------- */
.hero { padding: 28px 0 8px; }
.hero h1 em { color: var(--brand); font-style: normal; }
@media (prefers-color-scheme: dark) { .hero h1 em { color: var(--gold); } }
.hero-actions { display: grid; gap: 10px; margin-top: 26px; }
.hero-sub-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.hero-meta b { color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 6px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }

.latest-draw .balls-row { display: flex; align-items: center; gap: clamp(4px, 1.4vw, 8px); }
.latest-draw .ball { width: clamp(34px, 9.6vw, 46px); height: clamp(34px, 9.6vw, 46px); font-size: clamp(14px, 3.8vw, 17px); }
.latest-draw .plus { margin: 0 2px; color: var(--muted); }
.draw-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 0; }
.draw-meta div { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.draw-meta dt { color: var(--muted); font-size: 12px; }
.draw-meta dd { margin: 2px 0 0; font-size: 14px; font-weight: 700; }

.how-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.how-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.how-steps li::before { counter-increment: step; content: counter(step); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-size: 13px; font-weight: 800; }
.how-steps strong { display: block; font-size: 15px; }
.how-steps span { color: var(--muted); font-size: 13px; }

.teaser-grid { display: grid; gap: 18px; }
.teaser-grid h4 { margin: 0 0 10px; color: var(--ink-2); font-size: 13px; font-weight: 700; }
.teaser-balls { display: flex; flex-wrap: wrap; gap: 10px; }
.teaser-balls figure { margin: 0; display: grid; justify-items: center; gap: 4px; }
.teaser-balls figcaption { color: var(--muted); font-size: 11px; }
.fine-print { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
@media (min-width: 560px) {
  .teaser-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { grid-template-columns: 1.3fr 1fr; align-items: stretch; }
}

/* ---------- 번호 공 ---------- */
.ball, .mini-ball, .profile-number {
  flex: none; display: inline-grid; place-items: center; border-radius: 50%;
  color: #fff; background: var(--ball-4); font-weight: 800; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12), inset 0 2px 0 rgba(255, 255, 255, .25);
}
.ball { width: clamp(40px, 11.5vw, 52px); height: clamp(40px, 11.5vw, 52px); font-size: clamp(15px, 4.2vw, 18px); }
.mini-ball { width: 30px; height: 30px; font-size: 12px; }
.profile-number { width: 32px; height: 32px; font-size: 13px; }
.tone-1 { color: var(--ball-1-ink, #3b2a00); background: var(--ball-1); }
.tone-2 { background: var(--ball-2); }
.tone-3 { background: var(--ball-3); }
.tone-4 { background: var(--ball-4); }
.tone-5 { background: var(--ball-5); }
.mini-ball.bonus, .ball.bonus { outline: 2px solid var(--line); outline-offset: 2px; }
.pick-balls { display: flex; justify-content: center; gap: clamp(5px, 1.8vw, 10px); margin: 22px 0 14px; }

/* ---------- 번호 선택 ---------- */
.number-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 24px 0 120px; }
.number-button { aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--ink-2); background: var(--surface); cursor: pointer; font-size: 14px; font-variant-numeric: tabular-nums; }
.number-button:hover { border-color: var(--muted); }
.number-button.selected { border-color: var(--brand); color: var(--brand-ink); background: var(--brand); font-weight: 800; }
.selection-bar { position: fixed; z-index: 10; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); width: min(calc(100% - 28px), 680px); display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); transform: translateX(-50%); box-shadow: var(--shadow); }
.selection-bar div { min-width: 0; flex: 1; }
.selection-bar span, .selection-bar strong { display: block; }
.selection-bar span { color: var(--muted); font-size: 11px; }
.selection-bar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.selection-bar button { padding: 12px 16px; border: 0; border-radius: 12px; color: var(--brand-ink); background: var(--brand); font-weight: 700; cursor: pointer; }
.selection-bar button:disabled { opacity: .35; }

/* ---------- 로딩·안내 ---------- */
.loading-view { min-height: 60vh; padding-top: 22vh; text-align: center; }
.loading-view > p:last-child { color: var(--muted); }
.loader { display: flex; justify-content: center; gap: 7px; margin-bottom: 22px; }
.loader span { width: 10px; height: 10px; border-radius: 50%; background: var(--ball-1); animation: pulse 1s infinite ease-in-out; }
.loader span:nth-child(2) { background: var(--ball-2); animation-delay: .12s; }
.loader span:nth-child(3) { background: var(--ball-3); animation-delay: .24s; }
@keyframes pulse { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-6px); } }
.alternative-list { display: grid; gap: 10px; margin-top: 24px; }
.alternative-button { padding: 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface); cursor: pointer; font-weight: 700; }
.ad-stage { min-height: 160px; display: grid; place-items: center; margin: 24px 0; padding: 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: 14px; text-align: center; }
.ad-actions { display: grid; gap: 10px; }

/* ---------- 번호 검토 결과 ---------- */
.score-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 20px; margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.score-ring { width: 96px; height: 96px; display: grid; place-content: center; border: 6px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; text-align: center; }
.score-ring strong, .score-ring span { display: block; }
.score-ring strong { font-size: 21px; }
.score-ring span { color: var(--muted); font-size: 10px; }
.analysis-verdict { color: var(--brand); font-size: 16px; font-weight: 800; }
@media (prefers-color-scheme: dark) { .analysis-verdict { color: var(--gold); } }
.score-card p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.analysis-reason { display: flex; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.analysis-reason:last-child { border-bottom: 0; }
.analysis-reason i { color: var(--warn); font-style: normal; }
.analysis-pass { padding: 16px; border-radius: 12px; color: var(--good); background: var(--good-soft); font-size: 14px; }

/* ---------- 추천 리포트 ---------- */
.report-head { text-align: center; }
.report-head .back-button { display: block; text-align: left; }
.report-id { display: block; margin: 0 0 18px; color: var(--muted); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-align: right; }
.report-basis { color: var(--muted); font-size: 13px; }
.highlight-list { display: grid; }
.highlight { padding: 13px 0; border-bottom: 1px solid var(--line); }
.highlight:first-child { padding-top: 0; }
.highlight:last-child { padding-bottom: 0; border: 0; }
.highlight span { display: block; color: var(--muted); font-size: 12px; }
.highlight strong { display: block; margin-top: 2px; font-size: 16px; }
.highlight p { margin: 4px 0 0; color: var(--good); font-size: 13px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.metric { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.metric span, .metric strong { display: block; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { margin-top: 3px; font-size: 15px; }
.metric .grade { margin-top: 2px; color: var(--good); }
.metric-note { margin: 12px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.detail-section { padding-block: 0; }
.detail-section summary { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; cursor: pointer; list-style: none; }
.detail-section summary::-webkit-details-marker { display: none; }
.detail-section summary .eyebrow { display: block; margin: 0 0 2px; }
.detail-section summary strong { font-size: 18px; }
.detail-toggle { color: var(--muted); font-size: 24px; font-weight: 300; transition: transform .2s; }
.detail-section[open] .detail-toggle { transform: rotate(45deg); }
.detail-section[open] { padding-bottom: 20px; }
.detail-section h4 { margin: 6px 0 10px; color: var(--ink-2); font-size: 13px; }
.metric-note + h4 { margin-top: 22px; }
.profile-list { display: grid; gap: 6px; }
.profile-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink-2); font-size: 13px; }
.profile-row b { color: var(--ink); }
.disclaimer { margin: 22px 2px; padding: 14px 16px; border-left: 3px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.7; }
.disclaimer strong { color: var(--ink-2); }
.disclaimer p { margin: 4px 0 0; white-space: pre-line; }
.footer-disclaimer { white-space: pre-line; }
.report-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }
.report-actions .compact { margin-top: 0; }
.report-actions .secondary-action { justify-content: center; text-align: center; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; width: min(calc(100% - 40px), 520px); padding: 13px 16px; border-radius: 12px; color: #fff; background: #2a2d33; font-size: 14px; text-align: center; transform: translate(-50%, 120px); opacity: 0; transition: .25s; box-shadow: var(--shadow); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- 콘텐츠·정책 페이지 ---------- */
.content { padding-top: 12px; }
.page-title { margin-bottom: 4px; font-size: clamp(26px, 6.4vw, 34px); }
.content > .report-basis { text-align: center; }
.round-list { display: grid; gap: 8px; margin-top: 22px; }
.round-row { display: grid; grid-template-columns: 58px 1fr; gap: 6px 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; transition: border-color .15s; }
.round-row:hover { border-color: var(--muted); }
.round-no { grid-row: span 2; font-weight: 800; }
.round-meta { color: var(--muted); font-size: 12px; }
.mini-balls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.round-list .mini-ball { width: 27px; height: 27px; font-size: 11px; }
.plus { color: var(--muted); font-size: 12px; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin: 22px 0; color: var(--muted); font-size: 14px; }
.pager a { color: var(--ink); font-weight: 600; text-decoration: none; }
.pager a:last-child { text-align: right; }
.fact-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.fact-list dt { color: var(--muted); }
.fact-list dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.band-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 16px; text-align: center; }
.band-grid div { padding: 8px 4px; border-radius: 10px; background: var(--surface-2); }
.band-grid span, .band-grid strong { display: block; }
.band-grid span { color: var(--muted); font-size: 11px; }
.band-grid strong { font-size: 16px; }
.table-wrap { overflow-x: auto; }
.stat-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.stat-table th { padding: 8px; color: var(--muted); font-size: 12px; font-weight: 600; text-align: right; }
.stat-table td { padding: 6px 8px; border-top: 1px solid var(--line); text-align: right; }
.stat-table th:first-child, .stat-table td:first-child { text-align: left; }
.guide-steps { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; line-height: 1.9; }
.policy p, .policy li { color: var(--ink-2); font-size: 14px; line-height: 1.8; }
.policy ul { margin: 0; padding-left: 18px; }
.draft-notice { margin: 16px 0 0; padding: 12px 14px; border: 1px solid var(--warn); border-radius: 12px; color: var(--warn); background: var(--warn-soft); font-size: 13px; }

/* ---------- 바닥글 ---------- */
.site-footer { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; }
.site-footer p { margin: 0 0 6px; }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 10px 0; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.age-notice { color: var(--ink-2); font-weight: 700; }

@media (min-width: 640px) {
  .shell { padding-inline: 28px; }
  .hero { padding-top: 48px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
