.lotto {
    display: grid;
    gap: 24px;
}

.lotto-header {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 22px;
    align-items: center;
}

.lotto-kicker {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 12px;
    color: var(--accent-lotto);
    margin: 0 0 10px;
}

.lotto-header h1 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 40px);
}

.lotto-sub {
    margin: 0;
    color: var(--muted);
}

.lotto-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px;
    background: var(--surface);
}

.lotto-card__title {
    margin: 0 0 12px;
    font-weight: 600;
}

.lotto-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    display: grid;
    gap: 6px;
}

.lotto-functions {
    display: grid;
    gap: 24px;
}

.lotto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.lotto-panel {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: grid;
    gap: 16px;
    box-shadow: var(--shadow-sm), var(--shadow-inset);
}

.lotto-panel--wide .lotto-chart {
    grid-template-columns: 60px minmax(0, 1fr);
}

.lotto-panel--wide .lotto-chart__plot {
    height: 220px;
}

.lotto-panel--wide .lotto-chart__ticks {
    min-height: 220px;
}

.lotto-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.lotto-panel__eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--accent-lotto);
}

.lotto-panel__sub {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.lotto-panel__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lotto-chip {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.lotto-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lotto-ball {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
}

.lotto-ball.range-a {
    background: rgba(247, 168, 165, 0.22);
}

.lotto-ball.range-b {
    background: rgba(253, 212, 177, 0.22);
}

.lotto-ball.range-c {
    background: rgba(151, 201, 170, 0.22);
}

.lotto-ball.range-d {
    background: rgba(133, 165, 216, 0.22);
}

.lotto-ball.range-e {
    background: rgba(196, 170, 220, 0.22);
}

.lotto-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.lotto-meta__title {
    margin: 0;
    font-weight: 600;
    font-size: 18px;
}

.lotto-meta__date {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.lotto-bonus {
    margin: 0;
    color: var(--muted);
}

.lotto-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lotto-form {
    display: grid;
    gap: 12px;
}

.lotto-field {
    display: grid;
    gap: 6px;
    font-size: 13px;
}

.lotto-field span {
    color: var(--muted);
    font-size: 12px;
}

.lotto-field input {
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
}

.lotto-field input:focus {
    border-color: rgba(52, 211, 153, 0.6);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

.lotto-result {
    border-top: 1px solid var(--line);
    padding-top: 16px;
    display: grid;
    gap: 12px;
}

.lotto-result__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.lotto-result__id {
    margin: 0;
    font-weight: 600;
}

.lotto-result__based {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.lotto-details summary {
    cursor: pointer;
    color: var(--muted);
}

.lotto-details pre {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 12px;
    font-size: 12px;
    overflow-x: auto;
    border: 1px solid var(--line);
}

.lotto-compare {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.lotto-metrics {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    display: grid;
    gap: 12px;
}

.lotto-metrics__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.lotto-metrics__title {
    margin: 0;
    font-weight: 600;
    font-size: 14px;
}

.lotto-metrics__sum {
    font-size: 12px;
    color: var(--muted);
}

.lotto-metric-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.lotto-metric-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    display: grid;
    gap: 6px;
}

.lotto-metric-card__label {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.lotto-metric-card__value {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
}

.lotto-odd-even {
    display: grid;
    gap: 8px;
}

.lotto-odd-even__labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
}

.lotto-odd-even__bar {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.2);
}

.lotto-odd-even__odd {
    background: rgba(247, 168, 165, 0.6);
}

.lotto-odd-even__even {
    background: rgba(151, 201, 170, 0.6);
}

.lotto-buckets {
    display: grid;
    gap: 8px;
}

.lotto-bucket {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

.lotto-bucket__label {
    font-weight: 600;
}

.lotto-bucket__bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    overflow: hidden;
    border: 1px solid var(--line);
}

.lotto-bucket__bar span {
    display: block;
    height: 100%;
    background: rgba(133, 165, 216, 0.7);
}

.lotto-bucket__value {
    text-align: right;
    font-weight: 600;
}

.lotto-chart {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.lotto-chart__y {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
    text-align: right;
}

.lotto-chart__ticks {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
}

.lotto-chart__plot {
    display: grid;
    grid-template-columns: repeat(45, minmax(0, 1fr));
    align-items: end;
    gap: 2px;
    height: 180px;
    padding: 0 4px 18px 6px;
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.lotto-chart__col {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
    height: 100%;
}

.lotto-chart__bar {
    display: block;
    width: 100%;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(
        180deg,
        rgba(133, 165, 216, 0.8),
        rgba(133, 165, 216, 0.2)
    );
    min-height: 2px;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.lotto-chart__bar:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.lotto-chart__x {
    font-size: 9px;
    color: var(--muted);
    text-align: center;
}

.lotto-batch {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.lotto-batch__item {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    display: grid;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.lotto-batch__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lotto-batch__title {
    margin: 0;
    font-weight: 600;
}

.lotto-batch__sub {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.lotto-empty {
    margin: 0;
    color: var(--muted);
}

.lotto-alert {
    border: 1px solid rgba(247, 116, 125, 0.4);
    background: rgba(247, 116, 125, 0.12);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.lotto-alert__title {
    margin: 0 0 6px;
    font-weight: 600;
}

.lotto-alert__message {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.lotto-history {
    display: grid;
    gap: 12px;
}

.lotto-history-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lotto-history-toggle__icon {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 10px;
}

.lotto-history-toggle__icon.is-open {
    transform: rotate(180deg);
}

.lotto-history__item {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.4fr) minmax(0, 0.2fr);
    gap: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.lotto-history__meta {
    color: var(--muted);
    font-size: 12px;
    display: grid;
    gap: 6px;
}

.lotto-history__body {
    display: grid;
    gap: 8px;
}

.lotto-history__params {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.lotto-history__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.lotto-foot {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.button.small {
    padding: 8px 12px;
    font-size: 12px;
}

.lotto-foot__link {
    color: var(--accent);
}

.button.danger {
    border-color: rgba(247, 116, 125, 0.5);
    color: #fbc4c8;
    background: rgba(247, 116, 125, 0.15);
}

/* ── 시뮬레이션 추천 (Best Picks) ────────────────────────────────────────── */

.lotto-chip--active {
    background: rgba(151, 201, 170, 0.2);
    border-color: rgba(151, 201, 170, 0.5);
    color: #97c9aa;
}

.lotto-sim-result {
    padding: 12px 14px;
    background: rgba(151, 201, 170, 0.08);
    border: 1px solid rgba(151, 201, 170, 0.3);
    border-radius: 14px;
    font-size: 13px;
    color: var(--muted);
    display: grid;
    gap: 4px;
}

.lotto-picks {
    display: grid;
    gap: 8px;
}

.lotto-pick {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
}

.lotto-pick__rank {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    text-align: center;
}

.lotto-pick__content {
    display: grid;
    gap: 6px;
}

.lotto-pick__score {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.lotto-pick__score-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

.lotto-pick__bar {
    height: 5px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    overflow: hidden;
    border: 1px solid var(--line);
}

.lotto-pick__bar span {
    display: block;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(151, 201, 170, 0.85),
        rgba(133, 165, 216, 0.85)
    );
    border-radius: 999px;
}

/* ── 통계 분석 (Analysis) ─────────────────────────────────────────────────── */

.lotto-analysis {
    display: grid;
    gap: 20px;
}

.lotto-analysis__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.lotto-analysis__group {
    display: grid;
    gap: 10px;
}

.lotto-analysis__label {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.lotto-analysis__label span {
    font-weight: 400;
    color: var(--muted);
    font-size: 11px;
}

.lotto-analysis__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

.lotto-analysis__stats strong {
    color: var(--text);
    margin-left: 4px;
}

/* ── 오버듀 번호 ─────────────────────────────────────────────────────────── */

.lotto-overdue {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.lotto-overdue__gap {
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
}

/* ── 신뢰도 배너 ─────────────────────────────────────────────────────────── */

.lotto-perf-banner {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    background: rgba(151, 201, 170, 0.06);
    border-color: rgba(151, 201, 170, 0.25);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.lotto-perf-banner__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(151, 201, 170, 0.85);
    flex-shrink: 0;
}

.lotto-perf-banner__items {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    flex: 1;
}

.lotto-perf-banner__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 16px;
}

.lotto-perf-banner__divider {
    width: 1px;
    height: 32px;
    background: var(--line);
    flex-shrink: 0;
}

.lotto-perf-banner__val {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.lotto-perf-banner__val.is-pos { color: #97c9aa; }
.lotto-perf-banner__val.is-neg { color: #f7a8a5; }
.lotto-perf-banner__val.is-prize { color: #fdd4b1; }

.lotto-perf-banner__lbl {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.04em;
}

/* ── 공략 리포트 ─────────────────────────────────────────────────────────── */

.lotto-report-history {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.lotto-report-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
}

.lotto-report-confidence {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.lotto-confidence-ring {
    flex-shrink: 0;
}

.lotto-report-confidence__title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
}

.lotto-report-confidence__factors {
    display: grid;
    gap: 7px;
}

.lotto-report-confidence__factor {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.lotto-report-confidence__factor-lbl {
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lotto-report-confidence__factor-val {
    text-align: right;
    color: var(--muted);
    font-weight: 600;
}

.lotto-report-pattern {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.lotto-report-pattern__title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
}

.lotto-report-pattern__stats {
    display: grid;
    gap: 10px;
}

.lotto-report-pattern__stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
}

.lotto-report-pattern__stat strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

/* 전략 카드 */
.lotto-strategy-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.lotto-strategy-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: rgba(133, 165, 216, 0.05);
    display: grid;
    gap: 10px;
}

.lotto-strategy-card__name {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: rgba(133, 165, 216, 0.9);
}

.lotto-strategy-card__desc {
    margin: 0;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.5;
}

/* ── 개인 패턴 분석 ──────────────────────────────────────────────────────── */

.lotto-personal-tendency {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.lotto-personal-tendency__badge {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(253, 212, 177, 0.4);
    background: rgba(253, 212, 177, 0.1);
    color: #fdd4b1;
    letter-spacing: 0.04em;
}

/* ── 구매 기록 ───────────────────────────────────────────────────────────── */

.lotto-purchase-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}

.lotto-purchase-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 18px;
    border-right: 1px solid var(--line);
    flex: 1;
    min-width: 100px;
}

.lotto-purchase-stat:last-child {
    border-right: none;
}

.lotto-purchase-stat__val {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.lotto-purchase-stat__val.is-pos { color: #97c9aa; }
.lotto-purchase-stat__val.is-neg { color: #f7a8a5; }
.lotto-purchase-stat__val.is-prize { color: #fdd4b1; }

.lotto-purchase-stat__lbl {
    font-size: 11px;
    color: var(--muted);
}

/* 구매 폼 */
.lotto-purchase-form {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
    display: grid;
    gap: 14px;
}

.lotto-purchase-form__title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}

.lotto-purchase-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.lotto-purchase-form__note {
    grid-column: span 2;
}

.lotto-purchase-form__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* 구매 목록 */
.lotto-purchase-list {
    display: grid;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}

.lotto-purchase-list__head {
    display: grid;
    grid-template-columns: 60px 100px 100px 100px minmax(0, 1fr) 120px;
    gap: 8px;
    padding: 10px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--line);
}

.lotto-purchase-row {
    display: grid;
    grid-template-columns: 60px 100px 100px 100px minmax(0, 1fr) 120px;
    gap: 8px;
    align-items: center;
    padding: 12px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--line);
    transition: background 0.15s ease;
}

.lotto-purchase-row:last-child {
    border-bottom: none;
}

.lotto-purchase-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.lotto-purchase-row__drw {
    font-weight: 600;
}

.lotto-purchase-row__note {
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lotto-purchase-row__actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.is-pos { color: #97c9aa; }
.is-neg { color: #f7a8a5; }
.is-prize { color: #fdd4b1; }

/* ── 반응형 ─────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .lotto-purchase-stats {
        flex-direction: column;
    }

    .lotto-purchase-stat {
        border-right: none;
        border-bottom: 1px solid var(--line);
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 14px;
    }

    .lotto-purchase-stat:last-child {
        border-bottom: none;
    }

    .lotto-purchase-list__head,
    .lotto-purchase-row {
        grid-template-columns: 56px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .lotto-purchase-list__head span:nth-child(n+3):nth-child(-n+5),
    .lotto-purchase-row span:nth-child(n+3):nth-child(-n+5) {
        display: none;
    }

    .lotto-purchase-form__note {
        grid-column: span 1;
    }

    .lotto-perf-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .lotto-perf-banner__items {
        width: 100%;
    }

    .lotto-perf-banner__item {
        padding: 0 10px;
    }
}

@media (max-width: 768px) {
    .lotto-header {
        grid-template-columns: 1fr;
    }

    .lotto-analysis__row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .lotto-pick {
        grid-template-columns: 24px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .lotto-report-top {
        grid-template-columns: 1fr;
    }

    .lotto-purchase-list__head,
    .lotto-purchase-row {
        grid-template-columns: 56px 90px 90px minmax(0, 1fr) 100px;
    }

    .lotto-purchase-list__head span:nth-child(4),
    .lotto-purchase-row span:nth-child(4) {
        display: none;
    }

    .lotto-header h1 {
        font-size: clamp(24px, 6vw, 32px);
    }

    .lotto-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 14px;
    }

    .lotto-panel {
        padding: 16px;
    }

    .lotto-panel__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .lotto-row {
        gap: 6px;
    }

    .lotto-ball {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .lotto-meta__title {
        font-size: 16px;
    }

    .lotto-history__item {
        grid-template-columns: 1fr;
        padding: 14px;
        gap: 12px;
    }
}

/* ═══════════════════════════════════════════════════════
   종합 추론 패널
═══════════════════════════════════════════════════════ */

.lotto-combined {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 기법별 추천 행 */
.lotto-combined__methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line, rgba(255,255,255,0.08));
    border-radius: 14px;
}

.lotto-combined__method {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.lotto-combined__method-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 200px;
}

.lotto-combined__method-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.lotto-combined__method-name {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}

.lotto-combined__method-weight {
    font-size: 11px;
    opacity: 0.6;
    font-weight: 400;
}

.lotto-combined__method-desc {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--text-muted, rgba(255,255,255,0.45));
}

.lotto-combined__method-nums {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* 최종 결과 */
.lotto-combined__final {
    padding: 20px;
    background: rgba(129, 140, 248, 0.06);
    border: 1px solid rgba(129, 140, 248, 0.25);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lotto-combined__final-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lotto-combined__final-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #818cf8;
    background: rgba(129, 140, 248, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.3);
    border-radius: 20px;
    padding: 3px 10px;
}

.lotto-combined__final-balls {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.lotto-combined__final-ball-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.lotto-combined__final-ball-wrap .lotto-ball {
    width: 52px;
    height: 52px;
    font-size: 18px;
}

.lotto-combined__vote-dots {
    display: flex;
    gap: 3px;
}

.lotto-combined__vote-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.2s;
}

.lotto-combined__vote-dot.is-on {
    background: #818cf8;
}

.lotto-combined__final-sub {
    margin: 0;
    font-size: 11px;
    color: var(--text-muted, rgba(255,255,255,0.4));
}

/* 볼 상태 */
.lotto-ball.is-dim {
    opacity: 0.35;
    transform: scale(0.92);
}

.lotto-ball.is-final {
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.5);
}

/* 점수 바 */
.lotto-combined__scores {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lotto-combined__scores-title {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, rgba(255,255,255,0.5));
    text-transform: uppercase;
    letter-spacing: .05em;
}

.lotto-combined__score-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lotto-combined__score-label {
    font-size: 12px;
    color: var(--text-muted, rgba(255,255,255,0.5));
    width: 72px;
    flex-shrink: 0;
}

.lotto-combined__score-weight {
    font-size: 11px;
    color: var(--text-muted, rgba(255,255,255,0.35));
    width: 28px;
    flex-shrink: 0;
    text-align: right;
}

.lotto-combined__score-bar-wrap {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.lotto-combined__score-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.lotto-combined__score-val {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-bright, #fff);
    width: 28px;
    text-align: right;
    flex-shrink: 0;
}

.lotto-combined__score-total {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted, rgba(255,255,255,0.5));
    text-align: right;
}

.lotto-combined__score-total strong {
    color: #818cf8;
    font-size: 16px;
}

.lotto-combined__disclaimer {
    margin: 0;
    font-size: 11px;
    color: var(--text-muted, rgba(255,255,255,0.35));
}

/* 이력 */
.lotto-combined__history {
    border-top: 1px solid var(--line, rgba(255,255,255,0.08));
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lotto-combined__history-title {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, rgba(255,255,255,0.45));
    text-transform: uppercase;
    letter-spacing: .05em;
}

.lotto-combined__history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--line, rgba(255,255,255,0.06));
    border-radius: 10px;
    flex-wrap: wrap;
}

.lotto-combined__history-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted, rgba(255,255,255,0.4));
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .lotto-combined__method {
        flex-direction: column;
        align-items: flex-start;
    }

    .lotto-combined__final-ball-wrap .lotto-ball {
        width: 42px;
        height: 42px;
        font-size: 15px;
    }

    .lotto-combined__final-balls {
        gap: 10px;
    }
}

/* ── Briefing UI ──────────────────────────────────────────────────────────── */
.briefing-header { padding: 16px; border-radius: 12px; background: rgba(129,140,248,0.08); margin-bottom: 16px; }
.briefing-header-row { display: flex; justify-content: space-between; align-items: center; }
.briefing-meta { display: flex; gap: 12px; color: #94a3b8; font-size: 0.85rem; margin-top: 4px; flex-wrap: wrap; }
.briefing-confidence strong { color: #e2e8f0; }
.briefing-tokens { font-family: monospace; }
.briefing-confidence-bar { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.briefing-confidence-bar > div { height: 100%; background: linear-gradient(90deg, #818cf8, #34d399); transition: width .3s; }
.briefing-summary { padding: 12px 16px; background: rgba(0,0,0,0.2); border-radius: 10px; margin-bottom: 16px; }
.briefing-summary h3 { margin: 0 0 8px; }
.briefing-3lines { margin: 0; padding-left: 20px; }
.briefing-hotcold { color: #fbbf24; margin-top: 8px; }
.briefing-warning { color: #f87171; margin-top: 8px; }
.pick-card { padding: 12px; border-radius: 10px; background: rgba(255,255,255,0.04); border-left: 3px solid #64748b; margin-bottom: 8px; }
.pick-card--안정 { border-left-color: #34d399; }
.pick-card--균형 { border-left-color: #fbbf24; }
.pick-card--공격 { border-left-color: #f87171; }
.pick-card-header { display: flex; justify-content: space-between; font-size: 0.85rem; color: #94a3b8; margin-bottom: 6px; }
.pick-card-balls { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ball { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: bold; color: #fff; }
.ball--1 { background: #fbbf24; } .ball--2 { background: #60a5fa; } .ball--3 { background: #f87171; }
.ball--4 { background: #94a3b8; } .ball--5 { background: #34d399; }
.pick-card-reason { margin: 0; font-size: 0.85rem; color: #cbd5e1; }
.briefing-empty { text-align: center; padding: 40px 20px; color: #94a3b8; }
.briefing-empty button { margin-top: 12px; padding: 8px 20px; }
.briefing-empty-hint { font-size: 0.85rem; }
.briefing-error { color: #f87171; margin-top: 8px; }
.curator-usage-footer { display: flex; gap: 12px; padding: 10px 14px; background: rgba(0,0,0,0.25); border-radius: 8px; font-size: 0.8rem; color: #94a3b8; margin-top: 24px; flex-wrap: wrap; font-family: monospace; }
@media (max-width: 768px) {
    .briefing-meta { font-size: 0.75rem; }
    .briefing-tokens { width: 100%; }
    .pick-card-balls { justify-content: center; }
}

/* ── Tab navigation ───────────────────────────────────────────────────────── */
.lotto-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.lotto-tabs button { padding: 8px 16px; background: transparent; border: none; color: #94a3b8; cursor: pointer; border-bottom: 2px solid transparent; }
.lotto-tabs button.active { color: #e2e8f0; border-bottom-color: #818cf8; }
.lotto-tab-body { padding-top: 8px; display: grid; gap: 24px; }
@media (max-width: 768px) {
    .lotto-tabs { overflow-x: auto; }
    .lotto-tabs button { white-space: nowrap; }

    /* 구매 이력 테이블 가로 스크롤 */
    .purchase-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .lotto-ball {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}
