:root {
    --bg: #07131b;
    --panel: #0c1b25;
    --panel-2: #10232e;
    --line: rgba(180, 208, 219, .14);
    --text: #edf4f5;
    --muted: #8ea2ac;
    --lime: #c6f65b;
    --blue: #79a8ff;
    --ink: #0b1a21;
    --paper: #eef1ed;
    --radius: 18px;
    --shell: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.page-grid {
    position: absolute;
    inset: 0 0 auto;
    height: 820px;
    pointer-events: none;
    opacity: .32;
    background-image: linear-gradient(rgba(135, 171, 186, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(135, 171, 186, .055) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, #000, transparent 90%);
}
.topbar {
    position: relative;
    z-index: 5;
    width: min(calc(100% - 48px), var(--shell));
    height: 94px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 47px;
    height: 47px;
    border-radius: 12px;
    background: var(--lime);
    color: var(--ink);
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -1px;
}
.brand-name { font-size: 14px; font-weight: 800; letter-spacing: 2.2px; line-height: 1.3; }
.brand-name small { display: block; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: 1.5px; margin-top: 4px; }
.nav { display: flex; gap: 36px; color: #b8c6cc; font-size: 14px; }
.nav a { transition: color .2s; }
.nav a:hover { color: var(--lime); }
.live-badge { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #b7c5ca; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(198, 246, 91, .09); }
.live-badge.stale .live-dot { background: #ffba66; box-shadow: 0 0 0 5px rgba(255, 186, 102, .09); }

.hero { position: relative; display: grid; grid-template-columns: 1.4fr .8fr; gap: 90px; align-items: center; padding-block: 92px 104px; }
.eyebrow, .section-index, .section-kicker { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; letter-spacing: 1.8px; }
.eyebrow { display: flex; align-items: center; gap: 14px; color: var(--lime); font-size: 11px; font-weight: 700; }
.eyebrow-line { width: 44px; height: 1px; background: rgba(198, 246, 91, .4); }
.eyebrow span:last-child { color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 25px 0 24px; font-size: clamp(44px, 5.2vw, 70px); line-height: 1.14; letter-spacing: -3px; font-weight: 760; }
h1 em { color: var(--lime); font-style: normal; }
.hero-lead { max-width: 620px; color: #a8bac2; font-size: 17px; line-height: 1.9; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 28px; min-height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: 10px; font-weight: 650; font-size: 14px; transition: transform .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--lime); color: var(--ink); }
.button-primary:hover { background: #d4ff77; }
.button-ghost { border-color: var(--line); color: #d8e3e6; }
.button-ghost:hover { background: rgba(255,255,255,.04); }
.hero-notes { display: flex; gap: 28px; margin-top: 34px; color: var(--muted); font-size: 12px; }
.hero-notes span { display: flex; align-items: center; gap: 8px; }
.hero-notes b { color: #546c77; font-family: Consolas, monospace; font-size: 10px; }
.draw-card { position: relative; padding: 28px; border: 1px solid rgba(169, 201, 213, .18); border-radius: 22px; background: linear-gradient(145deg, rgba(19, 42, 54, .94), rgba(10, 26, 35, .96)); box-shadow: 0 30px 70px rgba(0,0,0,.24); overflow: hidden; }
.draw-card::after { content: ""; position: absolute; width: 200px; height: 200px; right: -100px; top: -100px; border-radius: 50%; background: rgba(198,246,91,.07); filter: blur(4px); }
.draw-card-top, .card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-kicker { color: var(--muted); font-size: 10px; }
.verified-badge, .small-tag { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 100px; padding: 3px 10px; color: #b9c8ce; font-size: 10px; white-space: nowrap; }
.verified-badge { color: var(--lime); border-color: rgba(198,246,91,.22); background: rgba(198,246,91,.06); }
.draw-period { margin-top: 28px; font-family: Consolas, monospace; font-size: 32px; font-weight: 700; letter-spacing: 1px; }
.draw-period small { margin-left: 8px; color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 400; }
.draw-date { color: var(--muted); font-size: 12px; }
.draw-numbers { display: flex; gap: 14px; margin: 27px 0 32px; }
.draw-numbers span { display: flex; align-items: center; justify-content: center; width: 80px; aspect-ratio: 1; border-radius: 50%; background: var(--lime); color: var(--ink); font-family: Consolas, monospace; font-size: 42px; font-weight: 800; box-shadow: inset 0 -7px 0 rgba(8, 25, 31, .09); }
.draw-numbers span:nth-child(2) { background: #eff4e8; }
.draw-numbers span:nth-child(3) { background: var(--blue); }
.draw-card-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.draw-card-bottom small { display: block; color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.draw-card-bottom strong { font-family: Consolas, monospace; font-size: 12px; font-weight: 500; }

.forecast-section { padding-bottom: 110px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.section-index { display: block; margin-bottom: 10px; color: var(--lime); font-size: 10px; font-weight: 700; }
.section-heading h2, .data-panel h2 { margin-bottom: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.3; letter-spacing: -1px; }
.target-period { text-align: right; }
.target-period span { display: block; color: var(--muted); font-size: 11px; }
.target-period strong { color: var(--lime); font-family: Consolas, monospace; font-size: 24px; letter-spacing: 1px; }
.forecast-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; }
.prediction-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.prediction-card { position: relative; min-width: 0; padding: 18px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; animation: rise .45s both; }
.prediction-card:first-child { border-color: rgba(198,246,91,.4); background: linear-gradient(160deg, rgba(198,246,91,.09), var(--panel) 58%); }
.prediction-card.compact { padding: 9px 8px; border-radius: 11px; }
.prediction-card.compact.top-five { border-color: rgba(198,246,91,.32); background: linear-gradient(160deg, rgba(198,246,91,.07), var(--panel) 62%); }
.prediction-card.compact .prediction-top { font-size: 9px; }
.prediction-card.compact .pattern-badge { padding: 1px 5px; font-size: 8px; }
.prediction-card.compact .prediction-numbers { margin: 12px 0 9px; gap: 4px; font-size: 29px; letter-spacing: -1px; }
.prediction-card.compact .prediction-meta { justify-content: center; gap: 9px; padding-bottom: 0; border-bottom: 0; font-size: 9px; }
.prediction-grid.dense { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.prediction-card.dense { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 4px; border-radius: 9px; }
.prediction-card.dense .prediction-rank { color: var(--muted); font-size: 8px; }
.prediction-card.dense .prediction-numbers { margin: 0; gap: 1px; font-size: 17px; letter-spacing: 0; }
.prediction-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.prediction-rank { font-family: Consolas, monospace; }
.pattern-badge { padding: 2px 7px; border-radius: 5px; background: rgba(255,255,255,.05); color: #b9c8ce; }
.prediction-numbers { display: flex; justify-content: center; gap: 7px; margin: 29px 0 26px; font-family: Consolas, monospace; font-size: clamp(30px, 3.1vw, 43px); font-weight: 750; line-height: 1; letter-spacing: -2px; }
.prediction-card:first-child .prediction-numbers { color: var(--lime); }
.prediction-meta { display: flex; justify-content: space-between; padding-bottom: 14px; color: var(--muted); font-size: 10px; border-bottom: 1px solid var(--line); }
.score-row { display: flex; justify-content: space-between; margin-top: 12px; font-size: 10px; color: var(--muted); }
.score-row b { color: #dce8eb; font-family: Consolas, monospace; font-weight: 500; }
.score-track { height: 3px; margin-top: 8px; border-radius: 4px; background: rgba(255,255,255,.06); overflow: hidden; }
.score-track i { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.model-card, .probability-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.card-title-row h3 { margin: 5px 0 0; font-size: 17px; }
.weight-list { margin-top: 25px; }
.weight-item { margin-bottom: 17px; }
.weight-item:last-child { margin-bottom: 0; }
.weight-label { display: flex; justify-content: space-between; gap: 10px; color: #b7c6cc; font-size: 11px; }
.weight-label b { color: var(--text); font-family: Consolas, monospace; font-weight: 500; }
.weight-track { height: 4px; margin-top: 8px; border-radius: 5px; background: rgba(255,255,255,.06); overflow: hidden; }
.weight-track i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.weight-item:nth-child(2) i, .weight-item:nth-child(4) i { background: var(--lime); }
.card-footnote { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.8; }
.coverage-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.coverage-bar small { display: block; color: var(--muted); font-size: 9px; }
.coverage-bar strong { display: block; margin-top: 4px; font-family: Consolas, monospace; font-size: 16px; color: var(--text); }
.coverage-bar div:nth-child(3) strong, .coverage-bar div:nth-child(4) strong { color: var(--lime); }
.probability-card { margin-top: 18px; }
.probability-table { margin-top: 24px; }
.probability-row { display: grid; grid-template-columns: 64px repeat(10, minmax(0, 1fr)); gap: 7px; align-items: center; margin-bottom: 7px; }
.probability-row:last-child { margin-bottom: 0; }
.position-label { color: #b7c6cc; font-size: 12px; }
.probability-cell { min-width: 0; padding: 8px 2px; border: 1px solid rgba(255,255,255,.05); border-radius: 8px; text-align: center; font-family: Consolas, monospace; }
.probability-cell b { display: block; font-size: 14px; line-height: 1.2; }
.probability-cell small { display: block; margin-top: 3px; font-size: 9px; opacity: .72; }
.probability-legend { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 15px; color: var(--muted); font-size: 9px; }
.legend-scale { width: 100px; height: 5px; border-radius: 4px; background: linear-gradient(90deg, rgba(198,246,91,.04), rgba(198,246,91,.9)); }
.section-disclaimer { margin: 16px 0 0; color: var(--muted); font-size: 11px; }
.data-loading { grid-column: 1 / -1; padding: 60px 20px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }

.backtest-section { padding: 100px 0 110px; background: var(--paper); color: var(--ink); }
.backtest-heading p { max-width: 640px; margin: 14px 0 0; color: #62727a; }
.backtest-section .section-index { color: #527200; }
.no-leak-badge { display: flex; align-items: center; gap: 9px; padding: 9px 14px; border: 1px solid #cbd5ca; border-radius: 100px; color: #44554c; font-size: 12px; white-space: nowrap; }
.no-leak-badge span { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 50%; background: #dff0c5; color: #416300; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.backtest-config { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin: 0 0 20px; padding: 16px 20px; border: 1px solid #d9e0da; border-radius: 14px; background: rgba(255,255,255,.62); }
.config-field { display: inline-flex; align-items: center; gap: 8px; color: #55656b; font-size: 12px; }
.config-field input { width: 92px; padding: 7px 10px; border: 1px solid #cbd5ca; border-radius: 8px; background: #fff; color: var(--ink); font-family: Consolas, monospace; font-size: 15px; font-weight: 700; text-align: center; }
.config-modes { display: inline-flex; align-items: center; gap: 16px; }
.config-check { display: inline-flex; align-items: center; gap: 6px; color: #45555b; font-size: 12px; cursor: pointer; }
.config-check input { width: 15px; height: 15px; accent-color: #416300; cursor: pointer; }
.config-hint { margin-left: auto; color: #718087; font-size: 10px; }
.stat-card { padding: 23px; border: 1px solid #d9e0da; border-radius: 15px; background: rgba(255,255,255,.62); }
.stat-card.stat-accent { background: var(--ink); color: #f3f7f4; border-color: var(--ink); }
.stat-label { display: block; color: #6e7d83; font-size: 11px; }
.stat-accent .stat-label { color: #9db0b7; }
.stat-value { display: block; margin: 12px 0 8px; font-family: Consolas, monospace; font-size: clamp(29px, 3.2vw, 42px); line-height: 1; letter-spacing: -1.5px; }
.stat-value small { font-size: .5em; }
.stat-accent .stat-value { color: var(--lime); }
.stat-detail { color: #7a898e; font-size: 10px; }
.stat-accent .stat-detail { color: #8fa3aa; }
.window-tabs { display: flex; gap: 8px; margin-top: 24px; }
.window-tab { padding: 8px 16px; border: 1px solid #d2dad3; border-radius: 8px; background: transparent; color: #617078; cursor: pointer; font-size: 12px; }
.window-tab.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.confidence-note { margin-top: 10px; color: #718087; font-size: 11px; }
.chart-card { margin-top: 24px; padding: 26px; border-radius: var(--radius); background: var(--ink); color: var(--text); }
.chart-legend { display: flex; gap: 18px; color: var(--muted); font-size: 11px; }
.chart-legend span::before { content: ""; display: inline-block; width: 16px; height: 3px; margin: 0 7px 3px 0; border-radius: 3px; }
.legend-direct::before { background: var(--lime); }
.legend-group::before { background: var(--blue); }
.trend-chart { width: 100%; min-height: 260px; margin-top: 20px; }
.trend-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-caption { color: #728a95; font-size: 10px; }
.records-card { margin-top: 18px; padding: 26px; border: 1px solid #d9e0da; border-radius: var(--radius); background: rgba(255,255,255,.65); }
.records-card .section-kicker { color: #718087; }
.records-card .small-tag { color: #65757b; border-color: #d6ded7; }
.table-wrap { margin-top: 20px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.records-card table { table-layout: fixed; min-width: 0; }
.records-card th:nth-child(1) { width: 26%; }
.records-card th:nth-child(2) { width: 18%; }
.records-card th:nth-child(3) { width: 20%; }
.records-card th:nth-child(4) { width: 20%; }
.records-card th:nth-child(5) { width: 16%; }
th { padding: 11px 12px; border-bottom: 1px solid #d8dfd9; color: #7a888d; text-align: left; font-size: 10px; font-weight: 500; }
td { padding: 15px 12px; border-bottom: 1px solid #e1e6e1; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
.record-period { display: block; font-family: Consolas, monospace; font-weight: 700; }
.record-date { display: block; color: #859197; font-size: 9px; }
.record-actual { font-family: Consolas, monospace; font-size: 17px; font-weight: 800; letter-spacing: 3px; }
.rank-cell { white-space: nowrap; }
.detail-button { padding: 4px 12px; border: 1px solid #ccd7cd; border-radius: 100px; background: transparent; color: #4d5e64; cursor: pointer; font-size: 10px; }
.detail-button:hover { border-color: #9fb39f; background: rgba(0,0,0,.03); }
.record-hit { font-family: Consolas, monospace; font-weight: 700; color: #3e5c08; }
.result-badge { display: inline-flex; padding: 3px 9px; border-radius: 100px; background: #e8ece8; color: #7b888c; font-size: 10px; }
.result-badge.hit { background: #dff0c5; color: #3e5c08; font-weight: 700; }
.records-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.year-select { display: inline-flex; align-items: center; gap: 8px; color: #5c6b71; font-size: 11px; }
.year-select select { padding: 6px 10px; border: 1px solid #d2dad3; border-radius: 7px; background: #fff; color: var(--ink); font-size: 12px; }
.records-hint { color: #7a898e; font-size: 10px; }
.records-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; color: #5c6b71; font-size: 11px; }
.pager-button { padding: 7px 16px; border: 1px solid #d2dad3; border-radius: 7px; background: transparent; color: #53646a; cursor: pointer; font-size: 11px; }
.pager-button:disabled { opacity: .4; cursor: default; }

.method-section { padding-block: 105px; }
.heading-aside { margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.method-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.method-grid article { padding: 23px 20px; border-top: 1px solid var(--line); background: rgba(255,255,255,.012); }
.method-grid article > span { color: var(--lime); font-family: Consolas, monospace; font-size: 11px; }
.method-grid h3 { margin: 28px 0 12px; font-size: 16px; }
.method-grid p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.9; }
.walkforward-card { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; align-items: center; margin-top: 50px; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.walkforward-copy h3 { margin: 8px 0 12px; font-size: 22px; }
.walkforward-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.flow-steps { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flow-steps > div { display: flex; align-items: center; gap: 10px; }
.flow-steps b { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid rgba(198,246,91,.3); border-radius: 50%; color: var(--lime); font-family: Consolas, monospace; font-size: 11px; }
.flow-steps span { color: #d6e1e4; font-size: 11px; white-space: nowrap; }
.flow-steps small { display: block; color: var(--muted); font-size: 9px; }
.flow-steps i { color: #47606c; font-style: normal; }
.data-section { padding-bottom: 100px; }
.data-panel { display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; padding: 40px; border-radius: 22px; background: var(--lime); color: var(--ink); }
.data-panel .section-index { color: #526b1d; }
.data-panel p { max-width: 480px; margin: 15px 0 0; color: #4b6025; font-size: 12px; }
.data-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0; }
.data-meta div { min-width: 0; }
.data-meta dt { color: #5c722f; font-size: 10px; }
.data-meta dd { margin: 4px 0 0; font-family: Consolas, monospace; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.source-links { grid-column: 1 / -1; display: flex; gap: 24px; padding-top: 20px; border-top: 1px solid rgba(11,26,33,.16); font-size: 11px; font-weight: 650; }
.source-links a:hover { text-decoration: underline; }
.footer { border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 200px 1fr auto; gap: 40px; align-items: center; padding-block: 34px; color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-mark { width: 38px; height: 38px; border-radius: 9px; font-size: 16px; }
.footer-brand strong { display: block; color: var(--text); font-size: 11px; letter-spacing: 1.5px; }
.footer-brand small { display: block; font-size: 9px; }
.footer p { max-width: 650px; margin: 0; font-size: 10px; }
.footer-inner > span { font-family: Consolas, monospace; font-size: 9px; white-space: nowrap; }
.noscript { position: fixed; bottom: 0; left: 0; right: 0; padding: 12px; background: #ffdc73; color: #332700; text-align: center; }
.error-box { grid-column: 1 / -1; padding: 24px; border: 1px solid #725044; border-radius: 12px; background: rgba(255,160,110,.06); color: #ffc6a5; }

.heading-actions { display: flex; align-items: flex-end; gap: 16px; }
.expand-button { padding: 9px 16px; border: 1px solid rgba(198,246,91,.34); border-radius: 9px; background: rgba(198,246,91,.08); color: var(--lime); font-size: 12px; font-weight: 650; cursor: pointer; transition: background .2s; }
.expand-button:hover { background: rgba(198,246,91,.16); }
.copy-button { padding: 9px 16px; border: 1px solid rgba(121,168,255,.4); border-radius: 9px; background: rgba(121,168,255,.1); color: #a8c6ff; font-size: 12px; font-weight: 650; cursor: pointer; transition: background .2s, color .2s; }
.copy-button:hover { background: rgba(121,168,255,.18); }
.copy-button.copied { border-color: rgba(198,246,91,.5); color: var(--lime); background: rgba(198,246,91,.1); }
.fullscreen-fab { position: fixed; right: 22px; bottom: 22px; z-index: 90; padding: 12px 20px; border: 0; border-radius: 100px; background: var(--lime); color: var(--ink); font-size: 13px; font-weight: 800; letter-spacing: .5px; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.fullscreen-fab:hover { background: #d4ff77; }
body.overlay-open { overflow: hidden; }
.coverage-overlay { position: fixed; inset: 0; z-index: 200; display: none; flex-direction: column; padding: 16px 20px 20px; background: #06121a; }
.coverage-overlay.open { display: flex; }
.overlay-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.overlay-title .section-kicker { color: var(--muted); }
.overlay-title strong { display: block; margin-top: 3px; font-size: 19px; }
.overlay-meta { display: flex; align-items: center; gap: 14px; color: #b7c6cc; font-size: 12px; }
.overlay-meta span { font-family: Consolas, monospace; }
.overlay-meta button { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: #dce8eb; font-size: 12px; cursor: pointer; }
.overlay-meta button:hover { background: rgba(255,255,255,.06); }
.overlay-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 10px; }
.overlay-grid.dense { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.overlay-grid.dense .overlay-cell { border-radius: 7px; gap: 0; }
.overlay-grid.dense .overlay-cell b { font-size: clamp(10px, 2.1vh, 22px); letter-spacing: 0; }
.overlay-grid.dense .overlay-rank { font-size: 8px; }
.overlay-cell { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.overlay-cell.top-five { border-color: rgba(198,246,91,.42); background: linear-gradient(160deg, rgba(198,246,91,.1), var(--panel) 60%); }
.overlay-cell b { font-family: Consolas, monospace; font-size: clamp(17px, 4.6vh, 42px); font-weight: 760; letter-spacing: -1px; line-height: 1.05; }
.overlay-cell.top-five b { color: var(--lime); }
.overlay-cell small { color: var(--muted); font-size: clamp(8px, 1.35vh, 11px); white-space: nowrap; }
.overlay-rank { font-family: Consolas, monospace; opacity: .75; }
.detail-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); grid-auto-rows: 46px; gap: 6px; overflow-y: auto; align-content: start; padding-right: 4px; }
.detail-grid .overlay-cell { border-radius: 8px; }
.detail-grid .overlay-cell b { font-size: 16px; letter-spacing: 0; }
.detail-grid .overlay-cell small { font-size: 8px; }
.detail-grid .overlay-cell.is-direct { border-color: rgba(198,246,91,.85); background: rgba(198,246,91,.14); }
.detail-grid .overlay-cell.is-direct b { color: var(--lime); }
.detail-grid .overlay-cell.is-group { border-color: rgba(121,168,255,.55); }
.detail-grid .overlay-cell.is-group b { color: #a8c6ff; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1100px) {
    .hero { gap: 40px; }
    .draw-numbers span { width: 65px; }
    .forecast-layout { grid-template-columns: 1fr; }
    .prediction-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
    .model-card { display: grid; grid-template-columns: 1fr 1.5fr; gap: 30px; }
    .model-card .card-footnote { grid-column: 1 / -1; margin-top: 0; }
    .weight-list { margin-top: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
    .method-grid { grid-template-columns: repeat(3, 1fr); }
    .walkforward-card { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 820px) {
    .shell, .topbar { width: min(calc(100% - 32px), var(--shell)); }
    .nav { display: none; }
    .hero { grid-template-columns: 1fr; padding-block: 60px 80px; }
    .hero-copy { max-width: 680px; }
    .draw-card { max-width: 520px; width: 100%; }
    .draw-numbers span { width: 82px; }
    .prediction-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .prediction-grid.dense { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .prediction-numbers { font-size: 42px; }
    .prediction-card.compact .prediction-numbers { font-size: 21px; }
    .coverage-bar { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .records-card table { min-width: 640px; }
    .method-grid { grid-template-columns: 1fr 1fr; }
    .data-panel { grid-template-columns: 1fr; gap: 30px; }
    .source-links { grid-column: auto; }
    .footer-inner { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 560px) {
    .topbar { height: 78px; }
    .brand-mark { width: 40px; height: 40px; font-size: 18px; }
    .brand-name { font-size: 12px; }
    .live-badge { font-size: 10px; }
    h1 { font-size: 43px; letter-spacing: -2px; }
    .hero { padding-top: 45px; gap: 45px; }
    .hero-lead { font-size: 14px; }
    .hero-actions { flex-direction: column; }
    .button { width: 100%; }
    .hero-notes { gap: 13px; font-size: 10px; }
    .draw-card { padding: 22px; }
    .draw-numbers { gap: 12px; }
    .draw-numbers span { width: 72px; font-size: 38px; }
    .section-heading { align-items: flex-start; }
    .section-heading h2 { font-size: 27px; }
    .target-period strong { font-size: 19px; }
    .prediction-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .prediction-grid.dense { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
    .prediction-card { padding: 16px; }
    .prediction-card.compact { padding: 8px 6px; }
    .prediction-numbers { margin-block: 24px; font-size: 44px; }
    .prediction-card.compact .prediction-numbers { margin-block: 7px; font-size: 20px; }
    .coverage-bar { padding: 14px; gap: 12px; }
    .model-card { display: block; padding: 20px; }
    .weight-list { display: block; margin-top: 24px; }
    .model-card .card-footnote { margin-top: 20px; }
    .probability-card { padding: 18px 12px; }
    .probability-row { grid-template-columns: 40px repeat(10, minmax(38px, 1fr)); gap: 5px; }
    .probability-table { overflow-x: auto; padding-bottom: 8px; }
    .probability-row { min-width: 500px; }
    .backtest-section { padding-block: 75px; }
    .backtest-heading { display: block; }
    .no-leak-badge { display: inline-flex; margin-top: 20px; }
    .stats-grid { gap: 8px; }
    .stat-card { padding: 17px 14px; }
    .stat-value { font-size: 28px; }
    .stat-detail { font-size: 9px; }
    .window-tabs { overflow-x: auto; padding-bottom: 4px; }
    .window-tab { white-space: nowrap; }
    .chart-card, .records-card { padding: 18px 12px; }
    .chart-card .card-title-row { display: block; }
    .chart-legend { margin-top: 12px; }
    .trend-chart { min-height: 200px; overflow-x: auto; }
    .trend-chart svg { min-width: 540px; }
    .records-card .card-title-row { padding-inline: 5px; }
    th, td { padding-inline: 9px; }
    .method-section { padding-block: 75px; }
    .heading-aside { display: none; }
    .method-grid { grid-template-columns: 1fr; gap: 0; }
    .method-grid article { padding-inline: 5px; }
    .method-grid h3 { margin-top: 12px; }
    .walkforward-card { padding: 24px 18px; }
    .flow-steps { align-items: flex-start; flex-direction: column; gap: 15px; }
    .flow-steps i { margin-left: 15px; transform: rotate(90deg); }
    .data-panel { padding: 26px 22px; }
    .data-meta { gap: 16px; }
    .source-links { flex-direction: column; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 820px) {
    .heading-actions { flex-direction: column; align-items: flex-end; gap: 10px; }
    .overlay-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(10, minmax(0, 1fr)); gap: 6px; }
    .coverage-overlay { padding: 12px 12px 14px; }
    .overlay-meta { gap: 8px; font-size: 11px; }
    .overlay-title strong { font-size: 15px; }
}

@media (max-width: 820px) {
    .records-card th, .records-card td { padding-inline: 6px; }
    .record-actual { font-size: 14px; letter-spacing: 1px; }
    .detail-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 42px; }
}
