/* ============================================
   LottoAI — Research Lab Design System v2
   Font Awesome 6 Free (CC BY 4.0)
   Google Fonts: Inter, Noto Sans KR, JetBrains Mono (SIL OFL 1.1)
   ============================================ */

:root {
    /* Surfaces */
    --bg-primary: #0a0b0e;
    --bg-secondary: #101218;
    --bg-card: rgba(19, 22, 29, 0.4);
    --bg-elevated: #181c25;
    --bg-sunken: #0d0f14;

    /* Borders */
    --border-hairline: #1e222c;
    --border-strong: #2a2f3c;
    --border-accent: rgb(var(--accent-rgb) / 0.35);

    /* Text — 가독성 향상 (전체적으로 밝게) */
    --text-primary: #ffffff;
    --text-secondary: #e0e4eb;
    --text-muted: #b6bcc8;
    --text-faint: #8890a0;

    /* Brand — 모든 accent 투명도는 --accent-rgb 를 통해 합성 (SSOT) */
    --accent-rgb: 34 211 164;
    --accent: rgb(var(--accent-rgb));
    --accent-dim: #1a9479;
    --accent-bright: #34e0b2;
    --accent-soft: rgb(var(--accent-rgb) / 0.08);
    --accent-soft-2: rgb(var(--accent-rgb) / 0.16);

    /* Secondary signals */
    --signal-blue: #3b82f6;
    --signal-amber: #f59e0b;
    --signal-red: #ef4444;

    /* Shadows — subtle, no neon */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);

    /* Radii */
    --r-xs: 4px;
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-xl: 16px;

    /* Fonts — 한글은 항상 Noto Sans KR로 fallback (mono엔 한글 글리프 없음) */
    --font-sans: 'Inter', 'Noto Sans KR', -apple-system, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, 'Noto Sans KR', monospace;
    --font-family: var(--font-sans);

    /* Legacy aliases (keep old selectors working) */
    --accent-green: var(--accent);
    --accent-blue: var(--signal-blue);
    --gradient-primary: linear-gradient(135deg, #22d3a4 0%, #14b87a 100%);
    --gradient-h: linear-gradient(90deg, #22d3a4 0%, #1a9479 100%);
    --shadow-soft: var(--shadow-sm);
    --shadow-glow: var(--shadow-md);
    --shadow-glow-strong: var(--shadow-lg);
    --border-glow: var(--border-accent);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ═══════════════════════════════════════════════
   전체 폰트 크기 향상 — 최소 13~14px 보장
   (모바일에서도 가독성 확실, 볼 숫자는 제외)
═══════════════════════════════════════════════ */
body { font-size: clamp(15px, 1.1vw, 17px); }
p, .section-desc, .section-header p { font-size: clamp(14px, 1.05vw, 16px); }

/* 작은 레이블류 → 최소 13px */
.section-badge,
.done-timer, .result-round,
.stat-label, .stat-label-sub,
.nav-link, .nav-link i,
.draw-round, .draw-bonus,
.freq-count, .freq-num,
.chart-tab, .chart-header h3,
.my-number-label, .my-number-date,
.disclaimer-banner p, .footer-copy,
.faq-question i,
.hiw-strategy-pct, .hiw-strategy-badge,
.radar-legend, .radar-legend-name, .radar-legend-val,
.radar-sub-label, .radar-sub-val, .radar-card-title, .radar-card-score,
.ratio-label, .range-label,
.blackout-step, .blackout-timer,
.btn-download-badge, .game-label,
.hiw-strategy-card h4, .hiw-filter-item strong,
.week-tab, .week-sub,
.toast { font-size: clamp(13px, 1.1vw, 14.5px); }

/* 본문 텍스트류 → 14~16px */
.hiw-strategy-card p, .hiw-filter-item span,
.faq-answer p, .blackout-desc,
.pick-instruction, .hero-subtitle { font-size: clamp(14px, 1.05vw, 16px); }

/* ::after 값 표시(홀짝/번호대) 크기 동기화 */
.ratio-row::after, .range-row::after { font-size: clamp(13px, 1.1vw, 14.5px) !important; }

/* 제목류 배지 — 사이즈 축소 */
.section-header h2 { font-size: clamp(16px, 1.9vw, 21px); }

/* 섹션 기본 본문 사이즈 상향 */
.section, header.hero, .page-end { font-size: clamp(15px, 1.1vw, 17px); }

/* ═══════════════════════════════════════════════
   Pool View Modal — 10만 추천번호 전체 보기 (iframe)
═══════════════════════════════════════════════ */
.pv-modal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 9500;
}
.pv-modal.open { display: block; }
.pv-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: pvModalFadeIn 0.25s ease;
}
.pv-modal-frame {
    position: absolute;
    inset: 24px;
    background: var(--bg-primary);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
    animation: pvModalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pv-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: var(--bg-primary);
    display: block;
}
.pv-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(239, 68, 68, 0.92);
    color: #fff;
    border: 1px solid rgba(239, 68, 68, 1);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.pv-modal-close i {
    font-size: 14px;
}
.pv-modal-close:hover {
    background: rgb(220, 38, 38);
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.55);
}
.pv-modal-close:active {
    transform: translateY(0);
}

@keyframes pvModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes pvModalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 768px) {
    .pv-modal-frame { inset: 8px; border-radius: 8px; }
    .pv-modal-close { top: 10px; right: 10px; padding: 8px 12px; font-size: 11px; }
}

/* ═══════════════════════════════════════════════
   Pick Info Modal (블랙아웃 / 이미 받음 안내)
═══════════════════════════════════════════════ */
.pick-modal {
    display: none;
    position: fixed; inset: 0;
    z-index: 9000;
    align-items: center; justify-content: center;
    /* 모달 콘텐츠가 노치/홈바 영역에 가리지 않도록 safe-area padding */
    padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(20px + env(safe-area-inset-bottom, 0px)) 20px;
}
.pick-modal.open { display: flex; }
.pick-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: pickModalFadeIn 0.25s ease;
}
.pick-modal-panel {
    position: relative;
    width: 100%; max-width: 440px;
    background: rgba(13, 15, 20, 0.95);
    border: 1px solid var(--border-accent);
    border-radius: var(--r-lg);
    padding: 32px 28px 24px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgb(var(--accent-rgb) / 0.12);
    animation: pickModalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pick-modal-close {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px;
    background: transparent;
    border: 1px solid rgba(154, 163, 178, 0.2);
    border-radius: var(--r-xs);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}
.pick-modal-close:hover { color: var(--accent); border-color: var(--accent); }
.pick-modal-icon {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    font-size: 28px;
    box-shadow: 0 0 24px rgb(var(--accent-rgb) / 0.25);
}
.pick-modal-icon.blackout {
    background: rgba(245, 158, 11, 0.08);
    border-color: var(--signal-amber);
    color: var(--signal-amber);
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.25);
}
.pick-modal-icon.done {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--signal-blue);
    color: var(--signal-blue);
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.25);
}
.pick-modal-title {
    font-size: clamp(17px, 1.5vw, 20px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.pick-modal-reason {
    font-size: clamp(13.5px, 1.1vw, 15px);
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 20px;
}
.pick-modal-countdown {
    padding: 16px 20px;
    background: rgb(var(--accent-rgb) / 0.05);
    border: 1px solid rgb(var(--accent-rgb) / 0.2);
    border-radius: var(--r-md);
    margin-bottom: 18px;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.pick-modal-countdown-label {
    font-family: var(--font-mono);
    font-size: clamp(11px, 0.95vw, 12.5px);
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
.pick-modal-countdown-value {
    font-family: var(--font-mono);
    font-size: clamp(24px, 2.4vw, 32px);
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.04em;
    line-height: 1;
}
.pick-modal-detail {
    font-size: clamp(12.5px, 1vw, 13.5px);
    color: var(--text-muted);
    line-height: 1.7;
    text-align: left;
    padding: 12px 14px;
    background: rgba(154, 163, 178, 0.06);
    border-radius: var(--r-sm);
    margin-bottom: 20px;
}
.pick-modal-detail:empty { display: none; }
.pick-modal-ok {
    width: 100%;
    padding: 12px 16px;
    font-weight: 700;
    justify-content: center;
    background: var(--accent);
    color: #00110a;
    border: 1px solid var(--accent);
    border-radius: var(--r-sm);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: clamp(13.5px, 1.1vw, 15px);
    transition: all 0.2s;
}
.pick-modal-ok:hover {
    background: var(--accent-bright);
    border-color: var(--accent-bright);
    transform: translateY(-1px);
}

@keyframes pickModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes pickModalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

html {
    /* scroll-behavior: smooth 제거 — 모바일 터치 스크롤과 상호작용 시 스냅 백 현상 유발
       앵커 nav 클릭 시 부드러운 전환은 JS scrollIntoView({behavior:'smooth'}) 로 처리 */
    scroll-padding-top: 0;
    font-size: 16px;
    /* 모바일 overscroll 체인 차단 — 페이지 경계(hero/footer)에서의 rubber-band 최소화 */
    overscroll-behavior-y: auto;
}

body {
    font-family: var(--font-sans);
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "ss01", "cv11", "tnum";
    word-break: keep-all;
}

/* 한글이 포함된 작은 텍스트 — 시스템 한글 폰트 fallback 깔끔하게
   (Font Awesome 아이콘은 제외 — :not(i)로 아이콘 요소 보호) */
.section-desc,
.chart-tab, .radar-legend, .radar-sub-row, .radar-legend-name,
.week-tab, .week-sub, .pool-filter-tab {
    font-family: 'Noto Sans KR', 'Inter', -apple-system, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* Font Awesome 아이콘 폰트 강제 복원 */
.fa, .fas, .far, .fab, .fal, .fad, .fa-solid, .fa-regular, .fa-brands, .fa-light, .fa-duotone,
[class^="fa-"], [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}
.fab, .fa-brands { font-family: "Font Awesome 6 Brands" !important; }

/* Mono for numbers / codes / timestamps */
.mono, code, kbd, samp,
.section-badge,
.stat-value,
.done-timer strong,
.blackout-timer strong,
.draw-round,
.result-game-label,
.my-number-label,
.pool-row-index,
.freq-count,
.ratio-label,
.range-label {
    font-family: var(--font-mono);
    font-feature-settings: "tnum";
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-sunken); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-sm); }
::-webkit-scrollbar-thumb:hover { background: #3a4150; }

/* safe-area-inset-left/right: iPhone 가로 모드 노치 영역 회피 */
.container {
    max-width: 1180px; margin: 0 auto;
    padding: 0 calc(24px + env(safe-area-inset-right, 0px)) 0 calc(24px + env(safe-area-inset-left, 0px));
}

a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.75; }

/* ── Background: subtle technical grid ── */
#perf-bg {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-color: var(--bg-primary);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 64px 64px;
}
#perf-bg::after {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgb(var(--accent-rgb) / 0.06), transparent 60%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(59, 130, 246, 0.04), transparent 60%);
}

/* ── Navigation ── */
/* safe-area-inset-top: iOS 노치/다이나믹아일랜드/Android 상태바 아래로 콘텐츠 밀기 */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10, 11, 14, 0.7);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--border-hairline);
    padding: 14px 0;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
}
.nav-inner {
    max-width: 1180px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 700; color: var(--text-primary);
    letter-spacing: -0.01em;
}
.nav-logo:hover { opacity: 1; color: var(--text-primary); }
.nav-logo-icon {
    width: 30px; height: 30px; border-radius: var(--r-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--accent);
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
    display: flex; align-items: center; gap: 7px;
    padding: 8px 12px; border-radius: var(--r-sm);
    font-size: 12.5px; font-weight: 500; color: var(--text-secondary);
    letter-spacing: 0;
    transition: all 0.2s;
}
.nav-link i { font-size: 13.5px; opacity: 0.7; }
.nav-link:hover { color: var(--text-primary); background: var(--bg-elevated); opacity: 1; }
.nav-link.active { color: var(--accent); background: var(--accent-soft); }
.nav-link.active i { opacity: 1; }
.nav-actions { flex-shrink: 0; }
.nav-mobile-btn {
    display: none; flex-direction: column; gap: 4px;
    padding: 8px; background: none; border: none; cursor: pointer;
}
.nav-mobile-btn span { display: block; width: 20px; height: 2px; background: var(--text-secondary); border-radius: 1px; transition: all 0.3s; }
.nav-mobile-btn.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); background: var(--accent); }
.nav-mobile-btn.active span:nth-child(2) { opacity: 0; }
.nav-mobile-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); background: var(--accent); }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px;
    border: 1px solid transparent; border-radius: var(--r-sm);
    font-family: var(--font-sans); font-size: 13.5px; font-weight: 600;
    letter-spacing: 0;
    cursor: pointer; transition: all 0.2s;
    text-decoration: none; position: relative; overflow: hidden;
}
.btn i { font-size: 12px; }
/* Primary & Glass buttons — 통일된 ghost → filled 전환 */
.btn-primary,
.btn-glass {
    background: rgba(0, 0, 0, 0.3);
    color: var(--accent);
    border: 1px solid var(--accent);
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, letter-spacing 0.25s ease;
}
.btn-primary:hover,
.btn-glass:hover {
    background: var(--accent);
    color: #00110a;
    border-color: var(--accent);
    transform: translateY(-2px);
    letter-spacing: 0.08em;
    box-shadow: 0 8px 24px rgb(var(--accent-rgb) / 0.35), 0 0 0 1px var(--accent-bright) inset;
    opacity: 1;
}
.btn-primary:hover i,
.btn-glass:hover i { color: #00110a; }
.btn-shine { display: none; }
.btn-chip {
    padding: 7px 14px; font-size: 12px; font-weight: 500;
    background: var(--bg-elevated); border: 1px solid var(--border-hairline);
    color: var(--text-secondary); border-radius: var(--r-sm);
}
.btn-chip:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 14px 28px; font-size: 14.5px; }

/* Download / action button — flat professional */
.btn-download {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 12px 18px; margin-bottom: 10px;
    border: 1px solid var(--border-accent); border-radius: var(--r-sm);
    background: var(--accent-soft); color: var(--accent);
    font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
    letter-spacing: 0; cursor: pointer;
    transition: all 0.2s; position: relative; overflow: hidden;
}
.btn-download:hover { background: var(--accent-soft-2); border-color: var(--accent); }
.btn-action { flex: 1; min-width: 0; width: auto; margin-bottom: 0; padding: 11px 8px; font-size: 12px; }
.btn-download-badge {
    padding: 2px 6px; background: rgba(0, 0, 0, 0.3); border-radius: 3px;
    font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.5px;
}

/* ── Hero Section ── */
.hero {
    text-align: left;
    /* height 고정 대신 min-height — 콘텐츠가 크면 자연스럽게 늘어남, 스크롤 hijack 없음 */
    min-height: 100vh; min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    /* overflow:hidden 제거 — hero-bg 는 position:fixed 라 hero 바깥으로 안 넘침.
       hidden 유지 시 모바일 Safari 에서 scroll containment 부작용 가능 */
    padding: calc(100px + env(safe-area-inset-top, 0px)) calc(24px + env(safe-area-inset-right, 0px)) 420px calc(24px + env(safe-area-inset-left, 0px));
}

/* ── 전역 과학 분석 배경 애니메이션 (모든 섹션 공통) ── */
.hero-bg {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}
.hero-bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgb(var(--accent-rgb) / 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgb(var(--accent-rgb) / 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%);
    animation: hbgGridDrift 24s linear infinite;
}
.hero-bg-svg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    opacity: 0.9;
}
.hero-bg-svg .hbg-rings circle {
    transform-origin: 800px 450px;
    animation: hbgPulse 5s ease-in-out infinite;
}
.hero-bg-svg .hbg-rings circle:nth-child(1) { animation-delay: 0s; }
.hero-bg-svg .hbg-rings circle:nth-child(2) { animation-delay: 0.6s; }
.hero-bg-svg .hbg-rings circle:nth-child(3) { animation-delay: 1.2s; }
.hero-bg-svg .hbg-rings circle:nth-child(4) { animation-delay: 1.8s; }
.hero-bg-svg .hbg-nodes circle {
    animation: hbgNodeBlink 3.5s ease-in-out infinite;
}
.hero-bg-svg .hbg-nodes circle:nth-child(13) { animation-delay: 0.2s; }
.hero-bg-svg .hbg-nodes circle:nth-child(14) { animation-delay: 0.7s; }
.hero-bg-svg .hbg-nodes circle:nth-child(15) { animation-delay: 1.1s; }
.hero-bg-svg .hbg-nodes circle:nth-child(16) { animation-delay: 1.5s; }
.hero-bg-svg .hbg-nodes circle:nth-child(17) { animation-delay: 1.9s; }
.hero-bg-svg .hbg-nodes circle:nth-child(18) { animation-delay: 2.3s; }
.hero-bg-svg .hbg-nodes circle:nth-child(19) { animation-delay: 0.5s; }
.hero-bg-svg .hbg-nodes circle:nth-child(20) { animation-delay: 1.0s; }
.hero-bg-svg .hbg-nodes circle:nth-child(21) { animation-delay: 1.4s; }
.hero-bg-svg .hbg-nodes circle:nth-child(22) { animation-delay: 1.8s; }
.hero-bg-svg .hbg-nodes circle:nth-child(23) { animation-delay: 2.2s; }
.hero-bg-svg .hbg-scan {
    animation: hbgScan 6s linear infinite;
}
.hero-bg-svg .hbg-bars rect {
    animation: hbgBar 1.8s ease-in-out infinite;
    transform-origin: center bottom;
}
.hero-bg-svg .hbg-bars rect:nth-child(1) { animation-delay: 0s; }
.hero-bg-svg .hbg-bars rect:nth-child(2) { animation-delay: 0.15s; }
.hero-bg-svg .hbg-bars rect:nth-child(3) { animation-delay: 0.3s; }
.hero-bg-svg .hbg-bars rect:nth-child(4) { animation-delay: 0.45s; }
.hero-bg-svg .hbg-bars rect:nth-child(5) { animation-delay: 0.6s; }
.hero-bg-svg .hbg-bars rect:nth-child(6) { animation-delay: 0.1s; }
.hero-bg-svg .hbg-bars rect:nth-child(7) { animation-delay: 0.25s; }
.hero-bg-svg .hbg-bars rect:nth-child(8) { animation-delay: 0.4s; }
.hero-bg-svg .hbg-bars rect:nth-child(9) { animation-delay: 0.55s; }
.hero-bg-svg .hbg-bars rect:nth-child(10) { animation-delay: 0.7s; }

@keyframes hbgGridDrift {
    0%   { background-position: 0 0, 0 0; }
    100% { background-position: 48px 48px, 48px 48px; }
}
@keyframes hbgPulse {
    0%, 100% { opacity: 0.08; transform: scale(0.96); }
    50%      { opacity: 0.5;  transform: scale(1.04); }
}
@keyframes hbgNodeBlink {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 1; }
}
@keyframes hbgScan {
    0%   { transform: translateY(-120px); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(900px);  opacity: 0; }
}
@keyframes hbgBar {
    0%, 100% { transform: scaleY(0.4); }
    50%      { transform: scaleY(1.2); }
}

/* 모바일 성능 최적화 — background-position 애니메이션 + mask 조합이 모바일 GPU에 과부하 */
@media (max-width: 768px) {
    .hero-bg-grid {
        animation: none;
    }
    .hero-bg-svg .hbg-nodes circle {
        animation-duration: 5s;
    }
    .hero-bg-svg .hbg-bars rect {
        animation-duration: 2.4s;
    }
}

/* 사용자가 동작 감소를 선호하는 경우 */
@media (prefers-reduced-motion: reduce) {
    .hero-bg-grid,
    .hero-bg-svg * {
        animation: none !important;
    }
}
.hero-content { max-width: 980px; margin: 0 auto; position: relative; z-index: 1; }
.hero::before { content: none; }
.hero-title {
    font-size: clamp(22px, 3.4vw, 44px);
    font-weight: 700; line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 20px; text-align: center;
    color: #000000;
    text-shadow:
        0 0 8px rgb(var(--accent-rgb) / 0.9),
        0 0 16px rgb(var(--accent-rgb) / 0.6),
        0 0 28px rgb(var(--accent-rgb) / 0.35);
}
.hero-title strong { color: #000000; }
.hero-title .title-subline {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    text-shadow:
        0 0 4px rgb(var(--accent-rgb) / 0.5),
        0 0 10px rgb(var(--accent-rgb) / 0.3);
}
.title-gradient,
.title-rainbow {
    background: none !important;
    -webkit-text-fill-color: #e5e7eb !important;
    color: #e5e7eb !important;
    font-weight: 800;
    animation: none !important;
    text-shadow: none !important;
}
.title-green {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(154, 163, 178, 0.7);
    -webkit-text-fill-color: rgba(154, 163, 178, 0.7);
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 6px 14px;
    font-weight: 500;
    font-size: clamp(10px, 1.1vw, 13px);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-family: var(--font-mono);
    white-space: normal;
    line-height: 1.6;
    text-align: center;
    border: 1px solid var(--border-hairline);
    border-radius: var(--r-xs);
    z-index: 2;
}
.title-red {
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    font-weight: 800; font-size: 1em;
}
.title-rainbow { font-size: 1em; }
.title-select {
    display: inline-block;
    background: rgb(var(--accent-rgb) / 0.5);
    color: #000000;
    -webkit-text-fill-color: #000000;
    padding: 6px 16px;
    border-radius: var(--r-xs);
    font-weight: 800;
    letter-spacing: 0;
}
.title-select strong { color: #000000; -webkit-text-fill-color: #000000; }
@keyframes rainbowShift { to {} }

.hero-scroll {
    position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    animation: scrollBounce 2.4s ease-in-out infinite;
}
.scroll-mouse {
    width: 22px; height: 34px; border: 1.5px solid var(--border-strong);
    border-radius: 12px; display: flex; justify-content: center; padding-top: 6px;
}
.scroll-wheel {
    width: 2px; height: 6px; border-radius: 1px;
    background: var(--accent); animation: scrollWheel 2s ease-in-out infinite;
}
.hero-scroll span {
    font-family: var(--font-mono); font-size: 13px; font-weight: 500;
    letter-spacing: 0.25em; color: var(--text-muted);
}
@keyframes scrollBounce { 0%,100%{transform:translateX(-50%) translateY(0);} 50%{transform:translateX(-50%) translateY(6px);} }
@keyframes scrollWheel { 0%{opacity:1;transform:translateY(0);} 100%{opacity:0;transform:translateY(6px);} }

/* hero-subtitle: 섹션 타이틀(.section-header h2) 과 동일 사이즈/폰트/색상 통일 */
.hero-subtitle {
    display: block;
    max-width: 400px;
    width: 100%;
    margin: 20px auto 32px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
    font-size: clamp(16px, 1.9vw, 21px);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.5;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    text-align: center;
    background: #000000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 6px 16px;
    border: 1px solid #000000;
    border-radius: var(--r-lg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.hero-subtitle strong { color: #ffffff; font-weight: 800; }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-cta .btn-lg { min-width: 220px; justify-content: center; }

/* ── Sections ── */
/* fullpage(vh100) 완전 제거 — 자연 블록 플로우 */
.section {
    padding: 88px 0 32px;
    position: relative;
}
.section > .container { width: 100%; }

.section-header { text-align: center; margin-bottom: 32px; }
.section-badge {
    display: inline-block;
    padding: 5px 12px; margin-bottom: 14px;
    background: transparent;
    border: 1px solid var(--border-hairline);
    border-radius: var(--r-xs);
    font-family: var(--font-mono);
    font-size: 13px; font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    text-transform: uppercase;
}
.section-header h2 {
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
    font-size: clamp(16px, 1.9vw, 21px);
    font-weight: 800;
    letter-spacing: 0;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    background: #000000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    /* 모든 섹션 타이틀 박스 가로 통일: PC 400px 고정 / 반응형 자동 축소 */
    display: block;
    max-width: 400px;
    width: 100%;
    margin: 0 auto 12px;
    box-sizing: border-box;
    padding: 6px 16px;
    border-radius: var(--r-lg);
    line-height: 1.5;
    border: 1px solid #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.section-header h2 strong { color: #ffffff; font-weight: 800; }
.section-desc {
    font-size: 13px; color: var(--text-muted); font-weight: 400;
    max-width: 620px; margin: 0 auto; line-height: 1.6;
}

/* ── Streak Bar ── */
/* ── Pick Card ── */
/* 다른 섹션과 가로 라인 통일 — container(1180px) 따라감. 내부 컨텐츠는 가운데 정렬. */
.pick-card {
    margin: 0 auto;
    background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-radius: var(--r-lg); padding: 28px 28px 22px; text-align: center;
    box-shadow: var(--shadow-md);
    position: relative; overflow: hidden;
    transition: border-color 0.3s;
}

/* 모든 카드류 공통 blur (--bg-card 투명화에 따른 가독성 확보) */
.pick-card,
.stat-card,
.chart-card,
.hiw-cycle-step,
.hiw-strategy-card,
.hiw-filter-item,
.hiw-disclaimer,
.radar-card,
.faq-item,
.my-number-group,
.week-tab,
.week-card,
.draw-row {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.pick-card:hover { border-color: var(--border-strong); }
.pick-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.5;
}
.pick-card-glow { display: none; }

/* Pick Ready */
.pick-icon-wrap { position: relative; display: block; width: fit-content; margin: 4px auto 14px; }
.pick-rings { position: absolute; inset: -20px; pointer-events: none; }
.pick-ring {
    position: absolute; inset: 0; border: 1px solid var(--accent);
    border-radius: 50%; opacity: 0; animation: ringPulse 3s ease-out infinite;
}
.pick-ring-2 { animation-delay: 1s; }
.pick-ring-3 { animation-delay: 2s; }
@keyframes ringPulse { 0%{transform:scale(0.85);opacity:0.4;} 100%{transform:scale(1.8);opacity:0;} }

.pick-btn {
    width: 88px; height: 88px; border-radius: 50%;
    border: 1px solid #ff0000;
    background: #ff0000; color: #ffffff;
    font-size: 30px; cursor: pointer;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.15), var(--shadow-sm);
    position: relative;
    animation: btnTapHost 2.4s ease-in-out infinite;
}
/* 버튼 전체가 살짝 눌렸다가 튕겨오르는 호스트 애니메이션 */
@keyframes btnTapHost {
    0%, 35%   { transform: translateY(0)    scale(1); box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.15), var(--shadow-sm); }
    50%       { transform: translateY(2px)  scale(0.94); box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.3), 0 2px 6px rgba(0,0,0,0.5); }
    62%       { transform: translateY(-4px) scale(1.03); box-shadow: 0 0 0 8px rgba(255, 0, 0, 0.25), var(--shadow-md); }
    75%, 100% { transform: translateY(0)    scale(1); box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.15), var(--shadow-sm); }
}

/* 손가락 아이콘이 "터치" 제스처를 취하는 애니메이션 */
.pick-btn > i {
    display: inline-block;
    transform-origin: 50% 85%;
    animation: fingerTap 2.4s ease-in-out infinite;
}
@keyframes fingerTap {
    0%, 30%   { transform: translateY(-2px) rotate(-6deg) scale(1); }
    45%       { transform: translateY(-6px) rotate(-10deg) scale(1.05); }
    52%       { transform: translateY(4px)  rotate(2deg)  scale(0.9); }
    60%       { transform: translateY(6px)  rotate(4deg)  scale(0.88); }
    72%       { transform: translateY(-3px) rotate(-4deg) scale(1.02); }
    85%, 100% { transform: translateY(-2px) rotate(-6deg) scale(1); }
}

/* 터치 순간에 퍼지는 리플(ring 3번째 재사용 아닌 별도) */
.pick-btn::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0;
    pointer-events: none;
    animation: tapRipple 2.4s ease-out infinite;
}
@keyframes tapRipple {
    0%, 55%  { transform: scale(1);   opacity: 0; }
    60%      { transform: scale(1);   opacity: 0.6; }
    100%     { transform: scale(1.7); opacity: 0; }
}

.pick-btn:hover {
    background: var(--accent); color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 0 0 6px rgb(var(--accent-rgb) / 0.25), var(--shadow-md);
}
.pick-btn:hover > i,
.pick-btn:hover { animation-play-state: paused; }
.pick-btn:active { transform: scale(0.92); }

.pick-instruction {
    display: inline-block; font-family: var(--font-mono);
    font-size: 13.5px; font-weight: 500;
    color: var(--accent); background: transparent;
    border: 1px solid var(--border-accent);
    padding: 6px 14px; border-radius: var(--r-xs); margin-bottom: 4px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: none;
}

/* Loading */
.ai-analysis { padding: 18px 0; }
.analysis-spinner {
    position: relative; width: 64px; height: 64px; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
}
.spinner-orbit {
    position: absolute; inset: 0; border: 1.5px solid var(--border-hairline);
    border-top-color: var(--accent); border-radius: 50%; animation: spin 1.2s linear infinite;
}
.spinner-orbit-2 { inset: 7px; border-top-color: var(--signal-blue); animation-duration: 1.8s; animation-direction: reverse; }
.orbit-dot { display: none; }
@keyframes spin { to{transform:rotate(360deg);} }
.analysis-spinner > i { font-size: 22px; color: var(--accent); animation: brainPulse 1.2s ease-in-out infinite; }
@keyframes brainPulse { 0%,100%{opacity:0.4;} 50%{opacity:1;} }
.analysis-text {
    font-family: var(--font-mono); font-size: 12px; font-weight: 500;
    color: var(--text-secondary); margin-bottom: 18px;
    letter-spacing: 0.02em;
}
.analysis-progress { width: 100%; height: 2px; background: var(--bg-sunken); border-radius: 1px; overflow: hidden; margin-bottom: 20px; }
.progress-bar { height: 100%; width: 0%; background: var(--accent); border-radius: 1px; transition: width 0.4s; }
.progress-glow { display: none; }
.analysis-steps { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.analysis-steps .step {
    display: flex; align-items: center; gap: 5px;
    font-family: var(--font-mono); font-size: 13px; font-weight: 500;
    color: var(--text-muted); letter-spacing: 0.04em;
    text-transform: uppercase;
}
.analysis-steps .step.active { color: var(--accent); }
.analysis-steps .step.done { color: var(--accent-dim); }

/* Result */
.result-round {
    font-family: var(--font-mono);
    font-size: 13.5px; color: var(--text-muted);
    margin-bottom: 12px; font-weight: 500;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.result-games {
    display: flex; flex-direction: column;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-hairline);
    border-radius: var(--r-sm);
    max-height: 204px; /* 5 rows (row ≈ 40px + border) */
    overflow-y: auto;
    overflow-x: hidden;
    transition: border-color 0.2s;
}
.result-games::-webkit-scrollbar { width: 8px; }
.result-games::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
.result-games::-webkit-scrollbar-thumb { background: var(--border-accent); border-radius: 4px; }
.result-games::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.result-games:hover { border-color: var(--border-accent); }
.result-game-row {
    display: flex; align-items: center; justify-content: flex-start; gap: 6px;
    padding: 6px 12px;
    border-top: 1px solid var(--border-hairline);
    flex-wrap: nowrap;
}
.result-game-row:first-child { border-top: none; }
.result-game-label {
    font-family: var(--font-mono);
    font-size: 13px; font-weight: 600; color: var(--text-muted);
    min-width: 58px; letter-spacing: 0.06em; flex-shrink: 0;
    text-transform: uppercase;
}
.result-game-row .lotto-ball { width: 28px; height: 28px; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.result-game-row .lotto-ball::before { display: none; }

/* Lotto Ball — refined, subtle */
.lotto-ball {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-size: 16px; font-weight: 700; color: #fff;
    position: relative; animation: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 6px rgba(0, 0, 0, 0.3);
}
.lotto-ball::before { display: none; }
.lotto-ball::after { display: none; }
.ball-1 { background: linear-gradient(160deg, rgba(245, 158, 11, 0.3), rgba(180, 83, 9, 0.3)); }
.ball-2 { background: linear-gradient(160deg, rgba(59, 130, 246, 0.3), rgba(30, 64, 175, 0.3)); }
.ball-3 { background: linear-gradient(160deg, rgba(239, 68, 68, 0.3), rgba(153, 27, 27, 0.3)); }
.ball-4 { background: linear-gradient(160deg, rgba(107, 114, 128, 0.3), rgba(55, 65, 81, 0.3)); }
.ball-5 { background: linear-gradient(160deg, rgba(16, 185, 129, 0.3), rgba(4, 120, 87, 0.3)); }

.pick-progress {
    font-family: var(--font-mono);
    font-size: 18px; font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    text-align: center;
}
.pick-progress .pick-progress-cur { color: var(--accent); }
.pick-progress .pick-progress-sep { color: var(--text-faint); margin: 0 6px; }
.pick-progress .pick-progress-total { color: var(--text-muted); }

.result-actions { display: flex; justify-content: center; gap: 8px; margin-bottom: 0; flex-wrap: nowrap; }

/* Done State */
.done-icon { display: none; }
.done-text {
    font-family: var(--font-mono); font-size: 13.5px; font-weight: 500;
    color: var(--text-muted); margin-bottom: 10px;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.done-text strong {
    color: var(--accent); font-weight: 700; margin-left: 6px;
    font-size: 12px; letter-spacing: 0.08em;
}
.done-numbers { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.done-timer { font-size: 13.5px; color: var(--text-muted); margin-bottom: 8px; }
.done-timer strong { color: var(--accent); font-size: 16px; font-weight: 600; letter-spacing: 0.05em; }

/* Blackout */
.blackout-icon { font-size: 42px; color: var(--accent); margin-bottom: 18px; animation: brainPulse 2s ease-in-out infinite; }
.blackout-title {
    font-size: 18px; font-weight: 700; margin-bottom: 22px;
    letter-spacing: -0.01em;
}
.blackout-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; text-align: left; max-width: 340px; margin-left: auto; margin-right: auto; }
.blackout-step {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-mono); font-size: 13.5px;
    color: var(--text-muted); font-weight: 500;
    letter-spacing: 0.02em;
}
.blackout-step i { font-size: 12px; width: 16px; text-align: center; }
.blackout-step i.fa-check-circle { color: var(--accent); }
.blackout-step.active { color: var(--accent); }
.blackout-timer { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.blackout-timer strong { color: var(--accent); font-size: 24px; font-weight: 700; letter-spacing: 0.08em; }
.blackout-desc { font-size: 12px; color: var(--text-muted); line-height: 1.7; }

/* ── How It Works ── */
.how-it-works-section { }
/* 4단계 프로세스를 pick-card 와 동일한 톤의 큰 카드 하나로 감싸 시각적 통일 */
.hiw-cycle {
    display: flex; align-items: stretch; justify-content: center;
    gap: 8px; flex-wrap: wrap; margin-bottom: 40px;
    background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-radius: var(--r-lg); padding: 24px 20px;
    box-shadow: var(--shadow-md);
}
/* 개별 스텝은 내부 구획 — 자체 배경/테두리 없이 hover 시에만 살짝 강조 */
.hiw-cycle-step {
    flex: 1; min-width: 200px; max-width: 280px; text-align: left;
    padding: 16px 14px; background: transparent; border: 1px solid transparent;
    border-radius: var(--r-md); position: relative; transition: all 0.2s;
}
.hiw-cycle-step:hover { background: var(--accent-soft); border-color: var(--border-accent); }
.hiw-step-icon {
    width: 40px; height: 40px; margin: 0 0 14px 0; border-radius: var(--r-sm);
    background: var(--accent-soft); border: 1px solid var(--border-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: var(--accent);
}
.hiw-cycle-step h4 { font-size: clamp(15px, 1.3vw, 17px); font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; color: var(--text-primary); }
.hiw-cycle-step p { font-size: 12px; color: var(--text-muted); line-height: 1.6; font-weight: 400; }
.hiw-cycle-arrow { display: flex; align-items: center; padding-top: 44px; color: var(--text-faint); font-size: 12px; }
.hiw-subtitle { font-size: 17px; font-weight: 700; margin-bottom: 20px; letter-spacing: -0.01em; }
.hiw-subtitle i { color: var(--accent); margin-right: 8px; font-size: 14px; }
.hiw-strategies { margin-bottom: 40px; }
/* 10 전략 2열 그리드 — PC/모바일 모두 2열 (5행 × 2열)
   grid-auto-rows 제거: 각 카드 자연 높이 유지 (짧은 설명 카드 빈 공간 낭비 방지)
   같은 행의 두 카드는 align-items:stretch 로 동일 높이 (부분 정렬) */
/* 전체 10카드를 pick-card 톤의 큰 카드 하나로 감싸 시각적 통일 (생성과정 섹션과 동일 패턴) */
.hiw-strategy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    align-items: start;
    background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-radius: var(--r-lg); padding: 20px;
    box-shadow: var(--shadow-md);
}
/* 개별 전략 카드는 내부 구획 — 자체 배경/테두리 없이 hover 시에만 살짝 강조 */
.hiw-strategy-card {
    padding: 12px 14px; background: transparent; border: 1px solid transparent;
    border-radius: var(--r-sm); transition: all 0.2s;
}
.hiw-strategy-card:hover { background: var(--accent-soft); border-color: var(--border-accent); }
.hiw-strategy-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hiw-strategy-badge {
    width: 24px; height: 24px; border-radius: var(--r-lg);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-size: 14px; font-weight: 900;
    background: var(--accent) !important;
    color: #000000 !important;
    flex-shrink: 0;
}
.hiw-strategy-header h4 { font-size: clamp(15px, 1.3vw, 17px); font-weight: 700; flex: 1; color: var(--text-primary); }
.hiw-strategy-pct { font-family: var(--font-mono); font-size: clamp(14px, 1.2vw, 16px); font-weight: 700; color: var(--accent); }
.hiw-strategy-card p { font-size: 12px; color: var(--text-muted); line-height: 1.6; font-weight: 400; }
.hiw-filters { margin-bottom: 32px; }
/* 전체 4개 품질 필터를 pick-card 톤의 큰 카드 하나로 감싸 시각적 통일 (생성과정/전략 섹션과 동일) */
.hiw-filter-list {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px;
    background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-radius: var(--r-lg); padding: 20px;
    box-shadow: var(--shadow-md);
}
@media (max-width: 600px) {
    .hiw-filter-list { grid-template-columns: 1fr; padding: 12px; gap: 2px; }
}
/* 개별 필터 아이템은 내부 구획 — 투명 배경 + 테두리 제거, hover 시에만 accent-soft */
.hiw-filter-item {
    display: flex; gap: 12px; padding: 14px 16px;
    background: transparent; border: 1px solid transparent;
    border-radius: var(--r-sm); transition: all 0.2s;
}
.hiw-filter-item:hover { background: var(--accent-soft); border-color: var(--border-accent); }
.hiw-filter-item > i { color: var(--accent); font-size: clamp(16px, 1.4vw, 18px); margin-top: 2px; flex-shrink: 0; }
.hiw-filter-item strong { display: block; font-size: clamp(15px, 1.3vw, 17px); font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.hiw-filter-item span { font-size: clamp(13.5px, 1.1vw, 15px); color: var(--text-secondary); line-height: 1.7; }
.hiw-disclaimer {
    display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid rgb(var(--accent-rgb) / 0.45);
    border-left: 2px solid var(--accent);
    border-radius: var(--r-sm);
    box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.35), inset 0 0 12px rgb(var(--accent-rgb) / 0.08);
}
.hiw-disclaimer > i { color: var(--accent); font-size: 14px; margin-top: 2px; flex-shrink: 0; text-shadow: 0 0 8px rgb(var(--accent-rgb) / 0.6); }
.hiw-disclaimer p { font-size: 12px; color: var(--text-muted); line-height: 1.7; }

/* ── Pool Results (Your Results) ── */
.pool-results-section { }

.week-tabs {
    display: flex; gap: 6px; justify-content: center;
    margin-bottom: 20px; flex-wrap: wrap;
    padding-bottom: 2px;
}
.week-tab {
    display: flex; flex-direction: column; align-items: center;
    gap: 2px;
    padding: 8px 16px;
    background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-radius: var(--r-sm);
    cursor: pointer; transition: all 0.2s;
    min-width: 78px;
}
.week-tab:hover { border-color: var(--border-strong); }
.week-tab.active {
    background: var(--accent-soft); border-color: var(--border-accent);
}
.week-tab-label {
    font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
    letter-spacing: 0.02em;
}
.week-tab.active .week-tab-label { color: var(--accent); }
.week-tab-round {
    font-family: var(--font-mono);
    font-size: 13px; color: var(--text-muted); font-weight: 500;
    letter-spacing: 0.04em;
}
.week-tab.active .week-tab-round { color: var(--accent); opacity: 0.8; }

/* Week content container */
/* container(1180px) 를 그대로 따라가 stats-section / FAQ 와 가로 라인 통일.
   container 가 반응형으로 자동 축소되므로 별도 max-width 불필요. */
.week-content {
    margin: 0 auto;
    max-height: calc(100dvh - 260px);
    overflow-y: auto;
    padding-right: 4px;
}

/* Week header — draw info + winning numbers */
.week-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    padding: 16px 20px;
    background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-left: 2px solid var(--accent); border-right: 2px solid var(--accent);
    border-radius: var(--r-md); margin-bottom: 12px;
}
.week-header-left { display: flex; flex-direction: column; gap: 3px; }
.week-header-round {
    font-size: 15px; font-weight: 700; color: var(--text-primary);
    letter-spacing: -0.01em;
}
.week-header-date {
    font-family: var(--font-mono); font-size: 13px;
    color: var(--text-muted); letter-spacing: 0.03em;
}
.week-header-draw {
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.week-header-draw-label {
    font-family: var(--font-mono); font-size: 13px; font-weight: 600;
    color: var(--text-muted); letter-spacing: 0.12em;
    text-transform: uppercase; margin-right: 6px;
}
.week-header-draw .lotto-ball { width: 30px; height: 30px; font-size: 12px; }
.week-header-plus {
    font-family: var(--font-mono); font-size: 12px; font-weight: 700;
    color: var(--text-muted); margin: 0 2px;
}

/* Summary grid */
.week-summary {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
    margin-bottom: 14px;
}
.week-summary-cell {
    padding: 12px 8px;
    background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-radius: var(--r-sm); text-align: center;
    transition: all 0.2s;
}
.week-summary-cell.week-summary-total {
    background: var(--accent-soft); border-color: var(--border-accent);
}
.week-summary-cell.rank-1,
.week-summary-cell.rank-2,
.week-summary-cell.rank-3,
.week-summary-cell.rank-4,
.week-summary-cell.rank-5,
.week-summary-cell.rank-miss { border-color: var(--border-accent); }
.week-summary-num {
    font-family: var(--font-mono);
    font-size: 18px; font-weight: 700; line-height: 1;
    color: var(--text-primary); margin-bottom: 4px;
}
.week-summary-total .week-summary-num { color: #34d399; }
.rank-1 .week-summary-num { color: #34d399; }
.rank-2 .week-summary-num { color: #34d399; }
.rank-3 .week-summary-num { color: #34d399; }
.rank-4 .week-summary-num { color: #34d399; }
.rank-5 .week-summary-num { color: #34d399; }
.rank-miss .week-summary-num { color: #34d399; }
.week-summary-label {
    font-family: var(--font-mono);
    font-size: 13px; font-weight: 500;
    color: var(--text-muted); letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Games list */
.week-games { display: flex; flex-direction: column; gap: 4px; }
.week-game {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-radius: var(--r-sm);
    transition: all 0.2s;
}
.week-game:hover { border-color: var(--border-strong); }
.week-game.rank-1 {
    background: rgba(251, 191, 36, 0.04);
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.15);
}
.week-game.rank-2 { border-color: rgba(209, 213, 219, 0.3); }
.week-game.rank-3 { border-color: rgba(245, 158, 11, 0.35); }
.week-game.rank-4 { border-color: rgb(var(--accent-rgb) / 0.3); }
.week-game.rank-5 { border-color: rgba(52, 211, 153, 0.25); }

.week-game-rank {
    font-family: var(--font-mono);
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    min-width: 48px;
    padding: 4px 8px; border-radius: var(--r-xs);
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-sunken);
    border: 1px solid var(--border-hairline);
    flex-shrink: 0;
}
.week-game.rank-1 .week-game-rank { color: #00110a; background: #fbbf24; border-color: #fbbf24; }
.week-game.rank-2 .week-game-rank { color: var(--bg-primary); background: #d1d5db; border-color: #d1d5db; }
.week-game.rank-3 .week-game-rank { color: #00110a; background: #f59e0b; border-color: #f59e0b; }
.week-game.rank-4 .week-game-rank { color: #00110a; background: var(--accent); border-color: var(--accent); }
.week-game.rank-5 .week-game-rank { color: var(--accent); background: var(--accent-soft); border-color: var(--border-accent); }

.week-game-balls { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.week-game-balls .lotto-ball {
    width: 30px; height: 30px; font-size: 12px;
    opacity: 0.5;
    transition: all 0.2s;
}
.week-game-balls .lotto-ball.ball-matched {
    opacity: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 0 2px var(--accent), 0 2px 8px rgb(var(--accent-rgb) / 0.3);
    transform: scale(1.05);
}
.week-game-balls .lotto-ball.ball-bonus-match {
    opacity: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 0 2px #fbbf24;
}
.week-game-date {
    font-family: var(--font-mono); font-size: 13px;
    color: var(--text-muted); letter-spacing: 0.02em;
    flex-shrink: 0;
}

.week-pager {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; margin-top: 10px;
}
.week-pager-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-radius: var(--r-xs); color: var(--text-secondary);
    cursor: pointer; transition: all 0.2s;
    font-size: 12px;
}
.week-pager-btn:hover:not(:disabled) {
    border-color: var(--border-accent); color: var(--accent);
}
.week-pager-btn:disabled {
    opacity: 0.35; cursor: not-allowed;
}
.week-pager-info {
    font-family: var(--font-mono);
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    letter-spacing: 0.05em;
    min-width: 48px; text-align: center;
}
.week-pager-cur { color: var(--accent); }
.week-pager-sep { color: var(--text-faint); margin: 0 3px; }

.week-empty {
    text-align: center; padding: 48px 20px;
    background: var(--bg-card); border: 1px dashed var(--border-hairline);
    border-radius: var(--r-md);
    color: var(--text-muted);
}
.week-empty i { font-size: 24px; margin-bottom: 10px; display: block; color: var(--text-faint); }
.week-empty p { font-size: 13px; }

/* AI 10만 풀 결과 카드 */
.ai-pool-card {
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--accent-soft), transparent);
    border: 1px solid var(--border-accent);
    border-radius: var(--r-md); margin-bottom: 12px;
    position: relative;
}
.ai-pool-card.ai-pool-backtest::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgb(var(--accent-rgb) / 0.015) 10px, rgb(var(--accent-rgb) / 0.015) 20px);
    border-radius: var(--r-md);
}
.ai-pool-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px; gap: 10px; flex-wrap: wrap;
}
.ai-pool-title {
    font-size: 13px; font-weight: 700; color: var(--accent);
    display: flex; align-items: center; gap: 8px; letter-spacing: -0.01em;
}
.ai-pool-title i { font-size: 13px; }
.ai-pool-badge {
    font-family: var(--font-mono);
    font-size: 8px; font-weight: 600;
    padding: 2px 6px; border: 1px solid var(--border-accent);
    border-radius: var(--r-xs); color: var(--accent);
    letter-spacing: 0.1em;
}
.ai-pool-total {
    font-family: var(--font-mono); font-size: 13.5px;
    color: var(--text-muted); letter-spacing: 0.04em;
}
.ai-pool-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
}
.ai-pool-cell {
    padding: 8px 4px; text-align: center;
    background: var(--bg-sunken); border: 1px solid var(--border-hairline);
    border-radius: var(--r-xs);
}
.ai-pool-cell.rank-1,
.ai-pool-cell.rank-2,
.ai-pool-cell.rank-3,
.ai-pool-cell.rank-4,
.ai-pool-cell.rank-5,
.ai-pool-cell.rank-miss { border-color: var(--border-accent); }
.ai-pool-num {
    font-family: var(--font-mono);
    font-size: 15px; font-weight: 700; line-height: 1;
    color: var(--text-primary); margin-bottom: 3px;
}
.ai-pool-cell.rank-1 .ai-pool-num,
.ai-pool-cell.rank-2 .ai-pool-num,
.ai-pool-cell.rank-3 .ai-pool-num,
.ai-pool-cell.rank-4 .ai-pool-num,
.ai-pool-cell.rank-5 .ai-pool-num,
.ai-pool-cell.rank-miss .ai-pool-num { color: #34d399; }
.ai-pool-label {
    font-family: var(--font-mono);
    font-size: 12px; font-weight: 600;
    color: var(--text-muted); letter-spacing: 0.08em;
    text-transform: uppercase;
}
.ai-pool-view-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; margin-top: 10px; padding: 10px 14px;
    background: var(--bg-sunken); border: 1px solid var(--border-accent);
    border-radius: var(--r-sm);
    color: var(--accent); font-size: 12px; font-weight: 600;
    text-decoration: none; transition: all 0.2s;
    letter-spacing: -0.01em;
}
.ai-pool-view-btn:hover {
    background: var(--accent-soft); color: var(--accent); opacity: 1;
    transform: translateY(-1px);
}
.ai-pool-view-ext { font-size: 13px; opacity: 0.7; }
.pool-result-summary { margin-bottom: 24px; }
.pool-result-empty {
    text-align: center; padding: 40px 20px; color: var(--text-muted);
    background: var(--bg-card); border: 1px dashed var(--border-hairline);
    border-radius: var(--r-md);
}
.pool-result-empty i { font-size: 28px; margin-bottom: 12px; display: block; color: var(--text-faint); }
.pool-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 22px; }
.pool-summary-card {
    padding: 18px 16px; background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-radius: var(--r-md); text-align: left; transition: all 0.2s;
}
.pool-summary-card:hover { border-color: var(--border-accent); }
.pool-summary-rank {
    font-family: var(--font-mono);
    font-size: 13px; font-weight: 600; margin-bottom: 10px;
    letter-spacing: 0.1em; text-transform: uppercase;
}
.pool-summary-rank.rank-1 { color: #fbbf24; }
.pool-summary-rank.rank-2 { color: #d1d5db; }
.pool-summary-rank.rank-3 { color: #f59e0b; }
.pool-summary-rank.rank-4 { color: var(--accent); }
.pool-summary-rank.rank-5 { color: #34d399; }
.pool-summary-rank.rank-miss { color: var(--text-muted); }
.pool-summary-count {
    font-family: var(--font-mono);
    font-size: 26px; font-weight: 600; margin-bottom: 2px;
    letter-spacing: -0.02em; color: var(--text-primary);
}
.pool-summary-label {
    font-size: 13px; color: var(--text-muted);
    letter-spacing: 0.06em; text-transform: uppercase;
}
.pool-result-rows { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.pool-row {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    background: var(--bg-sunken); border: 1px solid var(--border-hairline);
    border-radius: var(--r-sm); font-size: 12px; flex-wrap: wrap; transition: border-color 0.2s;
}
.pool-row:hover { border-color: var(--border-accent); }
.pool-row-index {
    font-size: 13px; color: var(--text-muted); font-weight: 500;
    min-width: 56px; letter-spacing: 0.06em; text-transform: uppercase;
}
.pool-row-balls { display: flex; gap: 4px; flex-wrap: wrap; }
.pool-row-balls .lotto-ball { width: 28px; height: 28px; font-size: 11px; }
.pool-row-balls .lotto-ball.matched { box-shadow: 0 0 0 2px #fbbf24; }
.pool-row-rank {
    margin-left: auto; font-family: var(--font-mono);
    font-size: 13px; font-weight: 600; padding: 3px 8px; border-radius: var(--r-xs);
    letter-spacing: 0.06em; text-transform: uppercase;
}
.pool-row-rank.rank-1 { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.pool-row-rank.rank-2 { background: rgba(209, 213, 219, 0.1); color: #d1d5db; }
.pool-row-rank.rank-3 { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.pool-row-rank.rank-4 { background: var(--accent-soft); color: var(--accent); }
.pool-row-rank.rank-5 { background: rgba(52, 211, 153, 0.1); color: #34d399; }
.pool-row-rank.rank-miss { color: var(--text-muted); }
.btn-load-more { width: 100%; justify-content: center; margin-top: 8px; }

/* ── Stats Section ── */
.stats-section { }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.stats-grid.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card {
    padding: 18px 16px; background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-radius: var(--r-md); text-align: left; transition: all 0.2s;
    position: relative; overflow: hidden;
}
.stat-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: var(--accent); opacity: 0; transition: opacity 0.2s;
}
.stat-card:hover { border-color: var(--border-accent); }
.stat-card:hover::after { opacity: 0.6; }
.stat-value {
    font-size: 26px; font-weight: 600; margin-bottom: 4px;
    color: var(--text-primary); letter-spacing: -0.02em;
    line-height: 1;
}
.stat-label {
    font-size: 13px; color: var(--text-muted); font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase;
}

/* Chart Cards */
.chart-card {
    background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-radius: var(--r-md); padding: 18px 20px; margin-bottom: 10px;
}
.chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 12px; }
.chart-header h3 {
    font-size: 13px; font-weight: 600; letter-spacing: -0.01em;
    display: flex; align-items: center; gap: 8px;
    color: var(--text-primary);
}
.chart-header h3 i { color: var(--accent); font-size: 12px; }
.chart-controls { display: flex; gap: 4px; }
.chart-tab {
    padding: 6px 12px; border: 1px solid var(--border-hairline); border-radius: var(--r-xs);
    background: transparent; color: var(--text-muted);
    font-family: var(--font-mono); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all 0.2s;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.chart-tab:hover { border-color: var(--border-strong); color: var(--text-secondary); }
.chart-tab.active { background: var(--accent-soft); border-color: var(--border-accent); color: var(--accent); }

/* Frequency Chart — unified analytical style (thin) */
.freq-chart { display: grid; grid-template-columns: repeat(23, 1fr); gap: 10px 4px; }
@media (max-width: 900px) {
    .freq-chart { grid-template-columns: repeat(15, 1fr); }
}
@media (max-width: 600px) {
    .freq-chart { grid-template-columns: repeat(9, 1fr); }
}
.freq-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.freq-bar-wrap {
    width: 100%; height: 52px;
    background: none;
    border-radius: 0;
    display: flex; align-items: flex-end; justify-content: center;
    overflow: visible;
    position: relative;
}
.freq-bar-wrap::before {
    content: '';
    position: absolute; left: 50%; top: 0; bottom: 0;
    width: 3px;
    background: rgba(154, 163, 178, 0.1);
    border-radius: 2px;
    transform: translateX(-50%);
}
.freq-bar {
    position: relative;
    width: 3px;
    min-height: 1px;
    background: var(--axis-color, var(--accent));
    box-shadow: 0 0 6px var(--axis-color, var(--accent));
    border-radius: 2px;
    opacity: 0.95;
    transition: opacity 0.2s, box-shadow 0.2s;
}
.freq-bar:hover { opacity: 1; box-shadow: 0 0 10px var(--axis-color, var(--accent)); }
.freq-num {
    width: 100%;
    height: auto;
    border-radius: 0;
    display: flex; align-items: center; justify-content: center;
    background: none !important;
    font-family: var(--font-mono);
    font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
    color: var(--axis-color, var(--accent)) !important;
}
.freq-count {
    font-family: var(--font-mono);
    font-size: 13px; font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.02em;
}

/* Recent Draws */
.recent-draws { display: flex; flex-direction: column; gap: 4px; }
.draw-row {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid var(--border-hairline);
    border-radius: var(--r-sm); transition: border-color 0.2s;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.draw-row:hover { border-color: var(--border-accent); }
.draw-round { font-size: 13px; font-weight: 600; color: var(--accent); min-width: 48px; letter-spacing: 0.02em; }
.draw-balls { display: flex; gap: 4px; }
.draw-balls .lotto-ball { width: 26px; height: 26px; font-size: 11px; }
.draw-bonus { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em; margin-left: auto; }
/* 보너스 볼 — 배경만 흐리고 숫자는 흰색 그대로 유지 */
.draw-bonus .lotto-ball { width: 22px; height: 22px; font-size: 10px; color: #fff; }
.draw-bonus .lotto-ball.ball-1 { background: linear-gradient(160deg, rgba(245, 158, 11, 0.15), rgba(180, 83, 9, 0.15)); }
.draw-bonus .lotto-ball.ball-2 { background: linear-gradient(160deg, rgba(59, 130, 246, 0.15), rgba(30, 64, 175, 0.15)); }
.draw-bonus .lotto-ball.ball-3 { background: linear-gradient(160deg, rgba(239, 68, 68, 0.15), rgba(153, 27, 27, 0.15)); }
.draw-bonus .lotto-ball.ball-4 { background: linear-gradient(160deg, rgba(107, 114, 128, 0.15), rgba(55, 65, 81, 0.15)); }
.draw-bonus .lotto-ball.ball-5 { background: linear-gradient(160deg, rgba(16, 185, 129, 0.15), rgba(4, 120, 87, 0.15)); }

@media (max-width: 768px) {
    .draw-row { gap: 6px; padding: 6px 8px; }
    .draw-round { font-size: 11.5px; min-width: 38px; letter-spacing: 0; }
    .draw-balls { gap: 3px; }
    .draw-balls .lotto-ball { width: 22px; height: 22px; font-size: 10px; }
    .draw-bonus { gap: 2px; font-size: 10.5px; }
    .draw-bonus .lotto-ball { width: 18px; height: 18px; font-size: 9px; }
}

/* Stats Extra — unified thin-bar analytical style */
.stats-extra-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.ratio-chart, .range-chart {
    display: flex; flex-direction: column; gap: 14px;
    padding: 6px 2px;
}
.ratio-row, .range-row {
    display: grid;
    grid-template-columns: 84px 1fr 54px;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 13.5px;
}
.ratio-label, .range-label {
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.04em;
    white-space: nowrap;
    min-width: 0;
}
.ratio-bar-wrap, .range-bar-wrap {
    height: 3px;
    background: rgba(154, 163, 178, 0.12);
    border: none;
    border-radius: 2px;
    overflow: hidden;
    padding: 0;
}
.ratio-bar, .range-bar {
    height: 100%;
    background: var(--axis-color, var(--accent));
    box-shadow: 0 0 6px var(--axis-color, var(--accent));
    border-radius: 2px;
    min-width: 0;
    color: transparent;
    font-size: 0;
    padding: 0;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.ratio-bar.odd  { --axis-color: #f59e0b; }
.ratio-bar.even { --axis-color: #3b82f6; }

/* 수치는 바 밖 우측에 JetBrains Mono 스타일로 JS에서 data-val 속성 기반 출력 */
.ratio-row::after, .range-row::after {
    content: attr(data-val);
    font-family: var(--font-mono);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: right;
    letter-spacing: 0.02em;
}

/* ── My Numbers (not used but preserved) ── */
.my-numbers-section { }
.my-numbers-list { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-icon-wrap {
    width: 56px; height: 56px; margin: 0 auto 16px; border-radius: var(--r-md);
    background: var(--bg-card); border: 1px solid var(--border-hairline);
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    color: var(--text-faint);
}
.empty-state p { font-size: 14px; margin-bottom: 18px; }
.my-number-group {
    background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-radius: var(--r-md); overflow: hidden; transition: border-color 0.2s;
}
.my-number-group:hover { border-color: var(--border-accent); }
.my-number-group-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--border-hairline);
}
.my-number-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; flex-wrap: wrap; }
.my-number-label { font-size: 13px; font-weight: 600; color: var(--accent); min-width: 48px; letter-spacing: 0.1em; text-transform: uppercase; }
.my-number-date { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.my-number-balls { display: flex; gap: 4px; flex-wrap: wrap; }
.my-number-balls .lotto-ball { width: 28px; height: 28px; font-size: 11px; }
.my-number-delete {
    margin-left: auto; background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 12px; padding: 6px 10px; border-radius: var(--r-xs); transition: all 0.2s;
}
.my-number-delete:hover { color: var(--signal-red); background: rgba(239, 68, 68, 0.08); }

/* ── FAQ ── */
.faq-section { }
/* container(1180px) 를 그대로 따라가 다른 stats-section 들과 가로 라인 통일.
   container 가 반응형으로 자동 축소되므로 별도 max-width 불필요. */
.faq-list { margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.faq-item {
    background: var(--bg-card); border: 1px solid var(--border-hairline);
    border-radius: var(--r-md); overflow: hidden; transition: border-color 0.2s;
}
.faq-item:hover { border-color: var(--border-strong); }
.faq-item.open { border-color: var(--border-accent); }
.faq-question {
    width: 100%; padding: 18px 20px; background: transparent; border: none;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    font-family: var(--font-sans); font-size: 14px; font-weight: 600;
    color: var(--text-primary); cursor: pointer; text-align: left;
}
.faq-question i { color: var(--text-muted); transition: all 0.3s; flex-shrink: 0; font-size: 13.5px; }
.faq-item.open .faq-question i { transform: rotate(180deg); color: var(--accent); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; }
.faq-item.open .faq-answer { max-height: 500px; padding: 0 20px 18px; }
.faq-answer p { color: var(--text-secondary); font-size: 13px; line-height: 1.75; margin-bottom: 10px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer strong { color: var(--text-primary); }

/* ── Disclaimer + Footer (page end) ── */
.page-end {
    display: flex; flex-direction: column; justify-content: flex-end;
    background: var(--bg-sunken);
    border-top: 1px solid var(--border-hairline);
}
.disclaimer-banner { padding: 20px 0; border-bottom: 1px solid var(--border-hairline); }
.disclaimer-banner .container { display: flex; gap: 12px; align-items: flex-start; }
.disclaimer-banner > .container > i { color: var(--signal-amber); font-size: 14px; margin-top: 2px; flex-shrink: 0; }
.disclaimer-banner p { font-size: 14px; color: var(--text-muted); line-height: 1.75; }
.disclaimer-banner strong { color: var(--text-secondary); }

/* safe-area-inset-bottom: iOS 홈 인디케이터 바 아래로 footer 콘텐츠 밀기 */
.footer { padding: 40px 0 calc(28px + env(safe-area-inset-bottom, 0px)); }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; flex-wrap: wrap; margin-bottom: 28px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-logo h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.footer-brand p { color: var(--text-muted); font-size: 12px; line-height: 1.75; max-width: 360px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); font-size: 12px; font-weight: 500; }
.footer-links a:hover { color: var(--accent); opacity: 1; }
.footer-bottom { border-top: 1px solid var(--border-hairline); padding-top: 18px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-copy { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); letter-spacing: 0.04em; }

/* ── Toast ── */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--bg-elevated); border: 1px solid var(--border-strong);
    border-radius: var(--r-md); padding: 12px 20px;
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg);
    z-index: 10000; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast-icon {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    color: #00110a; font-size: 13px; flex-shrink: 0;
}

/* ── Landscape Warning ── */
.landscape-warning { display: none; position: fixed; inset: 0; z-index: 99999; background: var(--bg-primary); align-items: center; justify-content: center; }
.landscape-content { text-align: center; color: var(--text-secondary); }
.landscape-content i { font-size: 42px; color: var(--accent); display: block; margin-bottom: 14px; animation: rotatePhone 2s ease-in-out infinite; }
@keyframes rotatePhone { 0%,100%{transform:rotate(0deg);} 25%{transform:rotate(90deg);} 50%{transform:rotate(90deg);} 75%{transform:rotate(0deg);} }
.landscape-content p { font-size: 16px; font-weight: 600; }
@media(orientation:landscape) and (max-height:500px) { .landscape-warning { display: flex; } }

/* ── Responsive ── */
@media(max-width:768px) {
    /* 모바일 스크롤 성능 — backdrop-filter fixed 요소가 매 프레임 재합성 비용 큼 */
    /* nav 는 fixed + 전체 스크롤 동안 항상 보이므로 blur 제거 + 더 불투명한 solid 배경으로 대체 */
    .nav {
        background: rgba(10, 11, 14, 0.95);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .nav-links {
        display: none; position: fixed; top: 56px; left: 0; right: 0;
        flex-direction: column; background: rgba(10, 11, 14, 0.98);
        border-bottom: 1px solid var(--border-hairline); padding: 12px;
    }
    .nav-links.open { display: flex; }
    .nav-mobile-btn { display: flex; }
    .hero { padding: 80px 16px 260px; }
    /* .hero::before 제거됨 */
    .hero-scroll { display: none; }
    .hero-content { max-width: 100%; }
    .title-green {
        white-space: normal;
        letter-spacing: 0.15em;
        font-size: 9px;
        padding: 5px 10px;
        line-height: 1.5;
        bottom: 60px;
    }
    .hero-title { word-break: keep-all; }
    .hero-subtitle {
        width: auto;
        max-width: 100%;
        word-break: keep-all;
        padding: 6px 12px;
        margin: 16px auto 24px;
    }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn-lg { min-width: 0; width: 100%; }
    .section {
        padding: 72px 0 32px;
    }
    /* hero 는 랜딩이라 한 뷰포트 정도는 채워줌 (강제 아닌 최소) */
    .hero { min-height: 100dvh; }
    .section-header { margin-bottom: 12px; }
    .section-header h2 { font-size: 16px; margin-bottom: 6px; padding: 5px 14px; }
    .section-desc { font-size: 12px; margin-bottom: 0; }
    .chart-card { padding: 12px 14px; margin-bottom: 6px; }
    .chart-header { margin-bottom: 8px; gap: 6px; }
    /* freq chart 전용: 상단 여백 더 압축 */
    #stats-freq.section { padding-top: 48px; }
    #stats-freq .freq-chart { gap: 6px 4px; }
    #stats-freq .freq-bar-wrap { height: 38px; }
    .pick-card { padding: 18px 18px 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
    .freq-chart { grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); }
    .freq-num { width: 20px; height: 20px; font-size: 8px; }
    .chart-header { flex-direction: column; align-items: flex-start; }
    .stats-extra-grid { grid-template-columns: 1fr; }
    .footer-top { flex-direction: column; }
    .footer-bottom { flex-direction: column; }
    .hiw-cycle { flex-direction: column; align-items: stretch; gap: 4px; margin-bottom: 16px; }
    .hiw-cycle-step { max-width: 100%; padding: 12px 14px; }
    .hiw-cycle-step h4 { margin-bottom: 4px; }
    .hiw-cycle-step p { line-height: 1.5; }
    .hiw-cycle-arrow {
        padding: 0;
        justify-content: center;
        transform: rotate(90deg);
        align-self: center;
        height: 12px;
    }
    .hiw-strategy-grid { grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 12px; }
    .hiw-strategy-card { padding: 8px 10px; }
    .hiw-strategy-header { gap: 6px; margin-bottom: 4px; }
    .hiw-strategy-badge { width: 20px; height: 20px; font-size: 11px; }
    .hiw-strategy-header h4 { font-size: 12px; }
    .hiw-strategy-pct { font-size: 11px; }
    .hiw-strategy-card p { font-size: 10.5px; line-height: 1.4; }
    .hiw-filter-list { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .hiw-filter-item { padding: 8px 10px; gap: 8px; }
    .hiw-filter-item > i { font-size: 13px; margin-top: 1px; }
    .hiw-filter-item strong { font-size: 12px; margin-bottom: 2px; }
    .hiw-filter-item span { font-size: 10.5px; line-height: 1.4; }
    .hiw-disclaimer { padding: 10px 12px; margin-top: 12px !important; }
    .hiw-disclaimer p { font-size: 10.5px; line-height: 1.5; }
    .week-tabs { gap: 4px; margin-bottom: 8px; }
    .week-tab { min-width: 52px; padding: 4px 8px; gap: 0; }
    .week-tab-label { font-size: 11px; }
    .week-tab-round { font-size: 10px; }
    .week-content { max-height: none; padding-right: 0; }
    .ai-pool-card { padding: 8px 10px; margin-bottom: 6px; }
    .ai-pool-header { margin-bottom: 6px; }
    .ai-pool-title { font-size: 11px; }
    .ai-pool-total { font-size: 11px; }
    .ai-pool-grid { gap: 3px; }
    .ai-pool-cell { padding: 5px 2px; }
    .ai-pool-num { font-size: 12px; margin-bottom: 2px; }
    .ai-pool-label { font-size: 11px; }
    .ai-pool-view-btn { margin-top: 6px; padding: 6px 10px; font-size: 11px; }
    .week-header {
        padding: 8px 10px; gap: 6px; margin-bottom: 6px;
        border-left-width: 1px; border-right-width: 1px;
    }
    .week-header-round { font-size: 12px; }
    .week-header-date { font-size: 10px; }
    .week-header-draw-label { font-size: 10px; margin-right: 3px; }
    .week-header-draw .lotto-ball { width: 22px; height: 22px; font-size: 10px; }
    .week-header-plus { font-size: 10px; }
    .week-summary {
        grid-template-columns: repeat(7, 1fr);
        gap: 3px; margin-bottom: 6px;
    }
    .week-summary-cell { padding: 6px 2px; }
    .week-summary-num { font-size: 13px; margin-bottom: 2px; }
    .week-summary-label { font-size: 9px; letter-spacing: 0.04em; }
    .result-games { max-height: 155px; }
    .result-game-row { padding: 4px 8px; gap: 4px; }
    .result-game-label { min-width: 50px; font-size: 11px; }
    .result-game-row .lotto-ball { width: 22px; height: 22px; font-size: 10px; }
    .week-games { gap: 2px; }
    .week-game { flex-wrap: nowrap; gap: 4px; padding: 4px 6px; }
    .week-game-rank { font-size: 9.5px; min-width: 34px; padding: 2px 4px; }
    .week-game-balls { gap: 3px; }
    .week-game-balls .lotto-ball { width: 20px; height: 20px; font-size: 9.5px; }
    .week-game-date { display: none; }
}
@media(max-width:480px) {
    .container { padding: 0 16px; }
    .hero-title { font-size: 20px; }
    .stats-grid { gap: 8px; }
    .stat-card { padding: 16px 14px; }
    .stat-value { font-size: 22px; }
    .section-header h2 { font-size: 15px; }
}

/* ── Selection ── */
::selection { background: var(--accent); color: #00110a; }

/* ── Scroll Reveal ── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════
   6-Axis Radar Analysis (Stats section)
═══════════════════════════════════════════════ */
.radar-wrap {
    width: 100%; max-width: 720px; margin: 0 auto 24px;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.radar-svg {
    width: 100%; height: auto; max-height: 440px;
    overflow: visible;
}
.radar-grid { fill: none; stroke: rgba(154, 163, 178, 0.15); stroke-width: 1; }
.radar-axis { stroke: rgba(154, 163, 178, 0.18); stroke-width: 1; }
.radar-scale-label {
    fill: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px; font-weight: 700; letter-spacing: 0.1em;
    paint-order: stroke;
    stroke: rgba(0, 0, 0, 0.7);
    stroke-width: 3;
    stroke-linejoin: round;
}
.radar-polygon {
    fill: var(--accent-soft);
    stroke: var(--accent);
    stroke-width: 1;
}
.radar-dot { stroke: #0a0b0e; stroke-width: 1; }
.radar-legend {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 10px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13.5px;
    letter-spacing: 0.05em;
    width: 100%;
    max-width: 520px;
}
.radar-legend-item {
    display: flex; align-items: center; gap: 10px;
    color: var(--text-secondary);
}
.radar-legend-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.radar-legend-name { flex: 1; }
.radar-legend-val { color: var(--text-primary); font-weight: 700; }

.radar-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    margin-bottom: 32px;
}
.radar-card {
    background: var(--bg-card);
    border: 1px solid rgba(154, 163, 178, 0.1);
    border-radius: 10px;
    padding: 18px 20px;
    position: relative;
    transition: border-color 0.3s, transform 0.3s;
}
.radar-card:hover {
    border-color: rgba(154, 163, 178, 0.25);
    transform: translateY(-2px);
}
.radar-card-head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 12px; margin-bottom: 12px;
    border-bottom: 1px solid rgba(154, 163, 178, 0.1);
}
.radar-card-title {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 13px; font-weight: 500;
    letter-spacing: 0.02em;
    display: flex; align-items: center; gap: 8px;
}
.radar-card-title::before {
    content: ''; width: 10px; height: 10px; border-radius: 50%;
    background: var(--axis-color, var(--accent));
    box-shadow: 0 0 8px var(--axis-color, var(--accent));
}
.radar-card-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px; font-weight: 700;
    color: var(--axis-color, var(--accent));
    letter-spacing: 0.02em;
}
.radar-sub-list {
    display: flex; flex-direction: column; gap: 9px;
}
.radar-sub-row {
    display: grid;
    grid-template-columns: 84px 1fr 44px;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13.5px;
}
.radar-sub-label {
    color: var(--text-muted);
    letter-spacing: 0.02em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.radar-sub-bar-wrap {
    height: 3px;
    background: rgba(154, 163, 178, 0.12);
    border-radius: 2px;
    overflow: hidden;
}
.radar-sub-bar {
    height: 100%;
    background: var(--axis-color, var(--accent));
    border-radius: 2px;
    box-shadow: 0 0 6px var(--axis-color, var(--accent));
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.radar-sub-val {
    color: var(--text-secondary);
    font-weight: 700;
    text-align: right;
}

@media (max-width: 900px) {
    .radar-cards { grid-template-columns: repeat(2, 1fr); }
    .radar-legend { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .radar-cards { grid-template-columns: 1fr; }
    .radar-legend { grid-template-columns: 1fr 1fr; font-size: 13px; gap: 8px 12px; }
    .radar-sub-row { grid-template-columns: 70px 1fr 38px; font-size: 13px; }
}

/* Fullpage Dots / Page Number / Settings Panel / Nav Position 전체 제거됨 (v1.16.59) —
   앱화 준비 + 일반 사용자 노출 미필요 기능 정리 */
