/* lottodraw.kr 공용 스타일 — 기존 사이트의 흰 배경 · 남색(#003087) 스타일.
   공 색(구간 색)은 번호 정보라 그대로 쓴다. */

:root {
    --brand: #003087;
    --brand-dark: #002266;
    --text: #333;
    --muted: #555;
    --line: #ddd;
    --head: #f2f2f2;
    --error: #c00;

    --ball-1: #fbc400;
    --ball-2: #69c8f2;
    --ball-3: #ff7272;
    --ball-4: #aaaaaa;
    --ball-5: #b0d840;

    --font: Arial, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: #fff;
    color: #000;
    font: 15px/1.6 var(--font);
}

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
a { color: #0066cc; }
[hidden] { display: none !important; }

.page { max-width: 1440px; margin: 0 auto; }

.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;
}

/* ───── 헤더 ───── */
.banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    padding: 12px 20px;
    background: #fff;
}
.brand { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.brand-name { color: var(--brand); font-size: 22px; font-weight: bold; line-height: 1.2; }
.brand-tag { color: var(--muted); font-size: 13px; }
.banner-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.latest-callout { margin: 0; color: var(--brand); font-weight: bold; font-variant-numeric: tabular-nums; }
.latest-callout .bonus-sep { color: var(--muted); }
.sticker {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}
.sticker:hover { background: var(--brand-dark); }
.sticker b { font-weight: bold; }

/* ───── 내비게이션 ───── */
.nav { background: #fefefe; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); }
.nav ul { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; padding: 6px 10px; list-style: none; }
.nav li { margin: 4px 14px; }
.nav a { display: block; padding: 4px 0; color: #000; font-weight: bold; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand); }

/* ───── 2단 레이아웃: 좌 생성기 / 우 통계 ───── */
.layout {
    display: grid;
    grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    padding: 24px 20px;
}
.rail { display: grid; gap: 16px; min-width: 0; }
.main { min-width: 0; }

.eyebrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 12px; }
.eyebrow h1, .eyebrow h2 { margin: 0; color: var(--brand); font-size: 24px; line-height: 1.3; }
.eyebrow p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.page > .eyebrow { padding: 24px 20px 8px; }

.bg-olive, .bg-sage, .bg-salmon, .bg-peach, .bg-lime, .bg-sky, .bg-steel, .bg-periwinkle { background: transparent; }

.notice { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.page > .notice { padding: 0 20px; }
#paywall, #premium { padding: 0 20px 24px; }
.intro-doubt { display: block; padding: 0 20px 16px; }

/* ───── 번호 생성 결과 ───── */
.cta {
    padding: 20px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}
.cta h2 { margin: 0 0 12px; color: var(--text); font-size: 18px; }
.tray { display: flex; justify-content: center; gap: 8px; }
.result-msg { min-height: 2.8em; margin: 12px 0; color: var(--muted); font-size: 15px; }
.result-msg.error { color: var(--error); }

/* ───── 공 ───── */
.ball {
    flex: none;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 2px dashed #e0e0e0;
    background: #fafafa;
    color: #ccc;
    font-size: 20px;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
}
.ball.filled { color: #fff; border: 2px solid transparent; animation: ball-pop .28s ease-out both; }
.mball {
    flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.35);
}
[data-band="1"].filled, .mball[data-band="1"], .cell.include[data-band="1"] { background: var(--ball-1); }
[data-band="2"].filled, .mball[data-band="2"], .cell.include[data-band="2"] { background: var(--ball-2); }
[data-band="3"].filled, .mball[data-band="3"], .cell.include[data-band="3"] { background: var(--ball-3); }
[data-band="4"].filled, .mball[data-band="4"], .cell.include[data-band="4"] { background: var(--ball-4); }
[data-band="5"].filled, .mball[data-band="5"], .cell.include[data-band="5"] { background: var(--ball-5); }
@keyframes ball-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ball.filled { animation: none; } }

/* ───── 버튼 ───── */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    font: bold 14px/1.2 var(--font);
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--head); color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { background: #e6e6e6; }
.btn-big { padding: 12px 32px; border-radius: 8px; font-size: 17px; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; }

/* ───── 카드 ───── */
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    scroll-margin-top: 12px;
}
.card-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: 12px 16px 0;
    color: var(--brand);
    font-size: 16px;
    font-weight: bold;
    line-height: 1.3;
}
.card-title small { color: var(--muted); font-size: 12px; font-weight: normal; white-space: nowrap; }
.card-body { flex: 1; padding: 10px 16px 14px; font-size: 14px; }
.card-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
details > summary.card-title { padding-bottom: 12px; cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary.card-title::after { content: "▼"; color: var(--muted); font-size: 11px; }
details[open] > summary.card-title::after { content: "▲"; }
details[open] > summary.card-title { padding-bottom: 0; }

/* ───── 포함/제외 번호 그리드 ───── */
.picker-help { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.chip.include { background: var(--brand); color: #fff; }
.chip.exclude { background: #eee; color: #777; text-decoration: line-through; }
.number-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 5px; }
.cell {
    aspect-ratio: 1 / 1;
    min-width: 0;
    min-height: 30px;
    padding: 0;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--text);
    font: bold 14px/1 var(--font);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}
.cell:hover { border-color: #999; }
.cell.include { color: #fff; border-color: transparent; }
.cell.exclude { background: #eee; color: #bbb; border-color: #eee; text-decoration: line-through; }
.picker-summary { margin: 10px 0 0; font-size: 13px; font-weight: bold; }
.picker-warning { margin: 4px 0 0; min-height: 1.4em; color: var(--error); font-size: 13px; }
.picker-actions { display: flex; justify-content: flex-end; }

/* 패턴 체크 목록 — 두 칸을 같은 폭으로 두고 줄바꿈을 막아 행 높이를 맞춘다.
   한 줄이라도 접히면 그 줄부터 좌우 체크박스가 어긋나 보인다. */
.patterns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.patterns li {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 0;
    font-size: 13px;
    line-height: 1.5;
}
.patterns label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.patterns input { flex: none; margin: 0; }
.patterns-actions { display: flex; gap: 8px; margin-top: 10px; }

/* 생성기 구간에서는 카드 세로를 꽉 채우도록 체크 목록을 고르게 벌린다 */
#sec-generator #patterns-title + .card-body { display: flex; flex-direction: column; }
#sec-generator .patterns { flex: 1; align-content: space-evenly; }
#sec-generator .patterns-actions { margin-top: 12px; }

/* 로그/이력 */
.log { max-height: 200px; overflow-y: auto; margin-top: 10px; padding: 10px; background: #f9f9f9; border: 1px solid #ccc; font-size: 12px; }
.history { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.history th, .history td { border: 1px solid var(--line); padding: 4px; text-align: center; }
.history th { background: var(--head); }
.muted { color: gray; font-size: 13px; }

/* ───── 통계 그리드 ─────
   카드는 제목 번호 순서대로 DOM 에 들어온다. 좁은 화면에서 span-2 가 2칸을 차지하면
   뒤 카드가 앞으로 끼어들어 번호가 뒤섞이므로, 4단이 아닐 때는 한 줄을 다 쓰게 한다. */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: span 2; }

/* 가로 막대 */
.hbars { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.hbar {
    display: grid;
    grid-template-columns: 5.2em minmax(0, 1fr) 6.6em;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.hbar-track { height: 12px; overflow: hidden; background: #eee; border-radius: 6px; }
.hbar-fill { height: 100%; background: var(--brand); border-radius: 6px; transition: filter .18s ease, background .18s ease; }
.hbar:hover .hbar-fill, .hbar:focus-within .hbar-fill {
    background: #1b5fd9;
    filter: drop-shadow(0 0 5px rgba(27, 95, 217, .85)) brightness(1.1);
}
.hbar:hover .hbar-val, .hbar:focus-within .hbar-val { color: var(--brand); font-weight: bold; }
.hbar-val { color: var(--muted); text-align: right; white-space: nowrap; }

/* 세로 막대 45개 */
.vbars {
    display: grid;
    grid-template-columns: repeat(45, minmax(0, 1fr));
    align-items: end;
    gap: 2px;
    height: 110px;
    border-bottom: 1px solid var(--line);
}
.vbar {
    min-height: 1px;
    background: var(--brand);
    border-radius: 2px 2px 0 0;
    transition: filter .18s ease, background .18s ease, transform .18s ease;
    transform-origin: bottom;
}
.vbars:hover .vbar { filter: saturate(.5) opacity(.55); }
.vbars .vbar:hover {
    background: #1b5fd9;
    filter: drop-shadow(0 0 7px rgba(27, 95, 217, .95)) brightness(1.15);
    transform: scaleX(1.5);
}
.vaxis { display: grid; grid-template-columns: repeat(45, minmax(0, 1fr)); color: var(--muted); font-size: 10px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.vaxis span { text-align: center; white-space: nowrap; }
.extremes { margin: 8px 0 0; font-size: 13px; }

/* 공 목록 (많이·적게, 쌍, 최근 회차) */
.ball-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ball-list li { display: flex; align-items: center; gap: 3px; font-size: 13px; font-variant-numeric: tabular-nums; }
.ball-list .lead { min-width: 3.6em; font-weight: bold; }
.ball-list .tail { margin-left: auto; color: var(--muted); white-space: nowrap; }
.plus { padding: 0 1px; color: var(--muted); font-weight: bold; }
.trend-group + .trend-group { margin-top: 10px; }
.trend-group h4 { margin: 0 0 6px; color: var(--text); font-size: 13px; }
.trend-balls { display: flex; flex-wrap: wrap; gap: 6px 5px; }
.trend-balls figure { display: flex; flex-direction: column; align-items: center; margin: 0; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.stats-loading { padding: 24px 0; color: var(--muted); }

/* ───── 이용권 (30일 통계) ───── */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.plan {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    text-align: center;
}
.plan .card-title { justify-content: center; }
.plan .card-body { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.plan-price { margin: 4px 0 0; color: #000; font-size: 34px; font-weight: bold; line-height: 1.1; }
.plan-price small { font-size: 15px; font-weight: bold; color: var(--muted); }
.plan ul { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.plan-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.plan.featured { border: 2px solid var(--brand); box-shadow: 0 10px 20px rgba(0, 48, 135, 0.15); }
.license-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.license-form { display: flex; flex-wrap: wrap; gap: 8px; }
.license-form input {
    flex: 1 1 260px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: 15px var(--font);
}
.license-status { margin: 8px 0 0; min-height: 1.4em; font-size: 14px; }
.license-status.error { color: var(--error); }
.locked-preview { margin-top: 16px; }
.locked-preview .stat-grid { filter: grayscale(1); opacity: .4; pointer-events: none; user-select: none; }
.license-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: #eef1f5;
    border-radius: 8px;
    color: var(--brand);
    font-weight: bold;
}

/* ───── 약관/문의 본문 ───── */
.prose { max-width: 900px; margin: 0 auto; padding: 24px 20px; line-height: 1.7; }
.prose h1 { margin: 0 0 12px; color: var(--brand); font-size: 26px; text-align: center; }
.prose h2 { margin: 24px 0 6px; color: var(--brand); font-size: 18px; }
.prose p, .prose ul { margin: 6px 0; }
.contact-form { display: grid; gap: 8px; max-width: 480px; }
.contact-form input, .contact-form textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font: 15px var(--font); }

/* ───── 홈: 세로 3구간 ─────
   구간마다 화면을 채우되 스크롤은 건드리지 않는다. 스냅이나 휠 가로채기로 한 화면씩
   넘기면 읽던 자리에서 튕겨 나가 불편하다 — 이동은 오른쪽 점과 화살표로만 한다. */
html.home { scroll-behavior: smooth; }
.snap-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100svh;
    padding: 20px;
}
/* 첫 구간은 위에 헤더·메뉴가 얹혀 있으니 그만큼 뺀다 */
#sec-generator { min-height: calc(100svh - var(--chrome-h, 118px)); }
/* 통계는 카드가 13장이라 한 화면에 딱 맞추면 글씨가 읽기 어려워진다.
   가운데 정렬을 풀고 위에서부터 쌓되, 한 화면에 가깝도록 여백만 조인다. */
#sec-stats { justify-content: flex-start; padding-top: 20px; }
#sec-stats .eyebrow { padding-bottom: 6px; }
#sec-stats .eyebrow h2 { font-size: 21px; }
#sec-stats .notice { margin-bottom: 10px; font-size: 13px; }
#sec-stats .card-title { padding: 10px 12px 0; font-size: 14px; }
#sec-stats .card-body { padding: 8px 12px 10px; font-size: 13px; }
#sec-stats .vbars { height: 84px; }
#sec-stats .hbar { font-size: 11px; }
#sec-stats .hbars { gap: 3px; }
#sec-stats .ball-list li { font-size: 12px; }
#sec-stats .card-note { font-size: 11px; }
#sec-stats .extremes { font-size: 12px; }

/* 아래에 더 있다는 표시 */
.scroll-cue {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: auto;
    padding-top: 16px;
    border: 0;
    background: none;
    color: var(--muted);
    font: bold 12px/1.4 var(--font);
    cursor: pointer;
}
.scroll-cue:hover { color: var(--brand); }
.scroll-cue .chevron { font-size: 18px; line-height: 1; animation: cue-bob 1.6s ease-in-out infinite; }
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.scroll-cue[hidden] { display: none !important; }

/* 오른쪽 구간 점 */
.dot-nav {
    position: fixed;
    top: 50%;
    right: 14px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    transform: translateY(-50%);
}
.dot-nav button {
    display: block;
    width: 11px; height: 11px;
    padding: 0;
    border: 2px solid var(--brand);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}
.dot-nav button:hover { transform: scale(1.25); }
.dot-nav button[aria-current="true"] { background: var(--brand); transform: scale(1.25); }

/* ───── 홈 3구간: 생성기 ───── */
/* 결과 · 포함/제외 · 특수패턴을 한 줄에. 번호 그리드는 aspect-ratio 로 칸이 정사각형이라
   칸 폭이 넓어지면 카드가 그만큼 세로로도 커진다 — 3단으로 좁혀야 한 화면에 들어온다. */
.gen-hero {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.1fr) minmax(0, 1.15fr);
    gap: 14px;
    align-items: stretch;
}
/* 이 화면에서 제일 중요한 건 번호 생성이다 — 남는 세로를 결과 카드가 가져간다 */
#sec-generator .cta { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
#sec-generator .cta h2 { font-size: 20px; }
#sec-generator .result-msg { margin: 16px 0; }
.gen-extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; margin-top: 14px; }
/* 펼쳤을 때 구간이 한 화면을 넘지 않도록 본문 높이를 묶고 안에서 스크롤시킨다 */
.gen-extras .card-body { max-height: 12vh; overflow-y: auto; font-size: 12px; line-height: 1.55; }
.gen-extras .card-body p { margin: 4px 0; }
.gen-extras .history { font-size: 12px; }
.gen-extras .log { max-height: none; margin-top: 6px; padding: 6px; font-size: 11px; }

/* ───── 홈 3구간: 10회차 미리보기 ───── */
/* 좌우 기둥 높이를 맞춘다. 왼쪽 히트 그리드는 칸이 정사각형이라 폭으로 높이가
   정해져 오른쪽보다 짧아진다 — 카드는 늘리고 내용은 가운데에 둔다. */
.teaser { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.teaser > .card { display: flex; flex-direction: column; }
.teaser > .card > .card-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.teaser-side { display: grid; gap: 14px; min-width: 0; }
.teaser-side .card-body { font-size: 13px; }

/* 이용권 카드 — 이 화면에서 유일하게 돈이 걸린 자리라 눈에 띄게 둔다 */
.card.sell { border: 2px solid var(--brand); box-shadow: 0 10px 20px rgba(0, 48, 135, .15); }
.card.sell .card-title { background: var(--brand); color: #fff; padding: 10px 14px; font-size: 16px; }
.card.sell .card-title small { color: #cfe0ff; }
.sell-lede { margin: 0 0 8px; }
.sell-list { margin: 0; padding: 0 0 0 2px; list-style: none; }
.sell-list li { padding: 5px 0 5px 22px; position: relative; border-top: 1px solid var(--line); }
.sell-list li::before { content: "✓"; position: absolute; left: 2px; color: var(--brand); font-weight: bold; }
.sell-list b { color: var(--brand); }
.sell-price { margin: 12px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.sell-price b { color: #000; font-size: 22px; }
.card.sell .page-actions { margin: 10px 0 0; }
.card.sell .btn-big { display: block; width: 100%; }
.heat-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 7px; }
.heat {
    aspect-ratio: 1 / 1;
    min-height: 30px;
    padding: 0;
    border: 2px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: #999;
    font: bold 14px/1 var(--font);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease;
}
.heat[data-hits="1"] { background: #cfe0ff; border-color: #cfe0ff; color: var(--brand); }
.heat[data-hits="2"] { background: #7ea9f0; border-color: #7ea9f0; color: #fff; }
.heat[data-hits="3"] { background: #3d72d6; border-color: #3d72d6; color: #fff; }
.heat[data-hits="4"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.heat:hover, .heat[aria-pressed="true"] { transform: scale(1.12); filter: drop-shadow(0 0 6px rgba(27, 95, 217, .8)); }
.heat-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.heat-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); vertical-align: -2px; }
.heat-readout { margin: 10px 0 0; min-height: 3em; font-size: 14px; }
.heat-readout b { color: var(--brand); font-size: 18px; }

@media (max-width: 1099px) {
    .gen-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 899px) {
    .gen-hero, .teaser { grid-template-columns: minmax(0, 1fr); }
    .gen-extras { grid-template-columns: minmax(0, 1fr); }
    .dot-nav { display: none; }
}
@media (max-width: 599px) {
    .snap-section { padding: 14px 12px; min-height: 0; }
    #sec-generator { min-height: 0; }
}
/* 1366x768 같은 낮은 화면에서는 탭을 펼치면 1구간이 한 화면을 넘는다 — 여백과 글자를 조인다 */
@media (max-height: 899px) {
    #sec-generator .eyebrow h1 { font-size: 20px; }
    #sec-generator .eyebrow p { font-size: 13px; }
    #sec-generator .eyebrow { padding-bottom: 8px; }
    #sec-generator .cta h2 { font-size: 17px; }
    #sec-generator .result-msg { margin: 10px 0; font-size: 13px; }
    #sec-generator .ball { width: 42px; height: 42px; font-size: 17px; }
    #sec-generator .patterns li { font-size: 12px; }
    #sec-generator .picker-help { font-size: 12px; }
    .gen-extras { margin-top: 8px; gap: 10px; }
    .gen-extras .card-body { max-height: 6vh; }
    #sec-generator { padding-top: 14px; padding-bottom: 14px; }
    .scroll-cue { padding-top: 8px; font-size: 11px; }
    .scroll-cue .chevron { font-size: 15px; }
}

/* 화면이 아주 낮으면 구간을 화면에 맞추는 게 오히려 답답하다 — 평범한 스크롤로 둔다 */
@media (max-height: 740px) {
    .snap-section { min-height: 0; }
    #sec-generator { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
    html.home { scroll-behavior: auto; }
    .scroll-cue .chevron { animation: none; }
}

/* ───── 일반 본문 페이지 (ABOUT · 실수령액 · TOP 50) ───── */
.prose.wide { max-width: 1200px; }
.prose h3 { margin: 18px 0 6px; color: var(--text); font-size: 16px; }
.prose .intro { margin: 0 0 24px; color: var(--muted); font-size: 16px; text-align: center; }
.prose .note { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.prose .intro.error { color: var(--error); }
.page-actions { margin: 28px 0 0; text-align: center; }

/* 본문 표 */
.table-scroll { overflow-x: auto; }
.data-table {
    width: 100%;
    margin: 16px 0;
    border-collapse: collapse;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.data-table th, .data-table td { border: 1px solid var(--line); padding: 10px; text-align: center; }
.data-table th { background: var(--head); font-weight: bold; }
.data-table tbody tr:nth-child(even) { background: #f9f9f9; }
.data-table tbody tr:hover { background: #f1f1f1; }

/* 접었다 펴는 문답 (ABOUT) */
.faq { display: grid; gap: 10px; margin: 16px 0 28px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    background: var(--head);
    color: var(--brand);
    font-weight: bold;
    cursor: pointer;
    list-style: none;
}
.faq summary::after { content: "▼"; color: var(--muted); font-size: 11px; }
.faq details[open] summary::after { content: "▲"; }
.faq summary:hover { background: #eef1f5; }
.faq .content { padding: 4px 16px 14px; }

/* 계산기 폼 (실수령액) */
.calc-form { display: grid; gap: 8px; max-width: 480px; margin: 16px 0 0; }
.calc-form label { font-weight: bold; }
.calc-form input {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: 15px var(--font);
}
.calc-form .btn { justify-self: start; }
.calc-result {
    max-width: 480px;
    margin: 16px 0 0;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.calc-result p { margin: 6px 0; }
.calc-net { color: #2e7d32; font-size: 20px; font-weight: bold; }
.calc-error { margin: 8px 0 0; min-height: 1.4em; color: var(--error); font-size: 14px; }

/* ───── 댓글 · 푸터 ───── */
.comments { padding: 24px 20px; text-align: center; }
.comments h2 { margin: 0 0 8px; color: var(--text); font-size: 18px; }
.footer { margin-top: 40px; padding: 20px; color: gray; font-size: 13px; text-align: center; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 16px; margin: 0 0 8px; padding: 0; list-style: none; }
.footer-nav a { display: inline-block; padding: 10px 4px; color: var(--text); font-weight: bold; text-decoration: none; }
.footer p { margin: 4px 0; }

/* ───── 이번 기간 리뷰 · 이번 주 전략 (결제 페이지) ───── */
.insight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; margin-top: 16px; }
.insight-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.insight-list li { display: grid; gap: 2px; }
.insight-list strong { color: var(--brand); font-size: 13px; }
.insight-list p { margin: 0; font-size: 14px; }
.insight-list .card-note { margin: 0; }
.strategy-warn { margin: 0 0 12px; padding: 8px 10px; background: #eef1f5; border-radius: 6px; color: var(--brand); font-size: 13px; font-weight: bold; line-height: 1.5; }
.strategy-list { display: grid; gap: 16px; margin: 0; padding: 0 0 0 18px; }
.strategy { padding-left: 2px; }
.strategy h4 { margin: 0 0 2px; font-size: 14px; color: var(--text); }
.strategy-basis { margin: 0 0 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.strategy-pairs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.pair-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 4px; background: #f2f2f2; border-radius: 12px; }
.pair-chip small { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.strategy-nums { display: flex; flex-wrap: wrap; gap: 4px; }
.page-disclaimer { margin: 20px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.strategy .card-note { margin: 6px 0 0; }

/* ───── 상세 분석 · 잠금 카드 ───── */
.section-head { margin: 24px 0 10px; color: var(--brand); font-size: 18px; }
.section-head small { margin-left: 6px; padding: 2px 8px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 11px; font-weight: bold; vertical-align: middle; }
.locked-card .card-body { display: grid; gap: 10px; justify-items: start; color: var(--muted); font-size: 13px; }
.lock-mark { padding: 2px 8px; border-radius: 10px; background: var(--head); color: var(--muted); font-size: 11px; font-weight: bold; }
.detail-lead { margin: 0 0 8px; font-size: 13px; }
.run-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.run-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.run-round { min-width: 4.4em; font-weight: bold; }
.run-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.run-group { display: inline-flex; gap: 2px; padding: 2px 6px; background: var(--head); border-radius: 12px; }
.run-tail { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.partner-grid { margin-bottom: 12px; }
.partner-grid .cell { min-height: 26px; font-size: 12px; }
.partner-out { display: grid; gap: 6px; }
.match-out { display: grid; gap: 8px; margin-top: 10px; font-size: 13px; }
.match-out p { margin: 0; }
.vaxis-all span { font-size: 9px; letter-spacing: -0.04em; }
.chart-tools { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.btn-small { padding: 4px 10px; font-size: 12px; }

/* ───── 정적 통계 페이지 · 통계 링크 ───── */
.breadcrumb { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.breadcrumb a { color: var(--muted); }
.stat-page h1 { text-align: left; }
.stat-page h2 { margin: 28px 0 10px; }
.stat-scope { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.stat-lead { margin: 0 0 16px; font-size: 16px; line-height: 1.8; }
.stat-page .data-table { font-variant-numeric: tabular-nums; }
.stat-page .data-table th, .stat-page .data-table td { padding: 6px 10px; }
/* 넓은 본문에서 순위 목록이 화면 끝까지 늘어나면 번호와 횟수가 멀어진다 */
.stat-page .ball-list { max-width: 320px; }
.stat-page .data-table td .mball { margin: 0 1px; }
.stat-page .btn { margin-top: 12px; }
.stat-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; margin: 0; padding: 0; list-style: none; }
.stat-links li { display: grid; gap: 1px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.stat-links a { font-weight: bold; }
.stat-links span { color: var(--muted); font-size: 12px; }
.stat-index { margin-top: 20px; }
.round-balls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 8px; }
.round-balls .plus { color: var(--muted); font-size: 20px; font-weight: bold; }
.row-balls { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 2px; }
.row-balls .plus { padding: 0 2px; color: var(--muted); font-weight: bold; }
.draws-table td { white-space: nowrap; }
.kv-table td:first-child { font-weight: bold; text-align: left; }
.kv-table td:last-child { text-align: left; }
.round-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.round-nav .btn { margin-top: 0; }
.stat-index h3 { margin: 0 0 10px; color: var(--brand); font-size: 16px; }

/* ───── 반응형 ───── */
@media (max-width: 1279px) {
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .span-2 { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
    .stat-grid, .plans { grid-template-columns: minmax(0, 1fr); }
    /* 좁은 화면에서 45개 라벨이 붙어 버린다 — 숫자를 세로로 세워 읽히게 한다 */
    .vaxis-all span { writing-mode: vertical-rl; text-orientation: upright; line-height: 1; letter-spacing: 0; }
    .insight-grid { grid-template-columns: minmax(0, 1fr); }
    .layout { gap: 16px; padding: 16px 12px; }
    .banner { padding: 10px 12px; }
    .page > .eyebrow { padding: 16px 12px 8px; }
    .page > .notice { padding: 0 12px; }
    #paywall, #premium { padding: 0 12px 16px; }
    .intro-doubt { padding: 0 12px 12px; }
    .patterns { grid-template-columns: 1fr; }
    .ball { width: 40px; height: 40px; font-size: 16px; }
    .tray { gap: 5px; }
}
