/* ==========================================================================
   서울로또명당 도구 페이지 (번호 조회 · 통계 · 데이터 · 구별 명당)
   redesign.css 의 색·구분선 규칙을 그대로 따름:
   상자·그림자·알약 배지 없이 1px 선과 여백, 강조색 하나
   로또 공 색만 동행복권 공 색(번호대별) 그대로 사용
   ========================================================================== */

.feature-container { max-width: 760px; margin: 0 auto; padding: 0 20px 32px; }

/* 로또 공 */
.ball { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 700; font-size: 15px; color: #fff; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.ball-sm { width: 28px; height: 28px; font-size: 13px; }
.ball-lg { width: 40px; height: 40px; font-size: 17px; }

/* ---------- 번호 조회 ---------- */
.picker { padding: 16px 0 4px; }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 12px 0 14px; }
.empty-ball-slot { width: 40px; height: 40px; border-radius: 50%; border: 1.5px dashed #c7cbd1; display: flex; align-items: center; justify-content: center; color: #a3a8b0; font-size: 13px; font-weight: 600; }
.picked-label { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0; }
.picked-label b { color: var(--ink); }

.balls-grid-45 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 4px 0 14px; }
@media (min-width: 640px) { .balls-grid-45 { grid-template-columns: repeat(9, 1fr); } }
.btn-ball { aspect-ratio: 1; min-height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 15px; font-weight: 600; color: var(--body); cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; }
.btn-ball:active { background: var(--soft); }
.btn-ball.selected { border-color: transparent; color: #fff; font-weight: 700; }

/* 하단 고정 버튼 줄 (모바일에서 엄지 위치) */
.selector-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 767px) {
  .selector-controls { position: sticky; bottom: 0; z-index: 10; margin: 0 -20px; padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
}
.btn-action { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px; border-radius: 6px; font-size: 15.5px; font-weight: 700; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; }
.btn-action-random { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-action-random:hover { background: #000; color: #fff; }
.btn-action-clear:hover { border-color: var(--ink); color: var(--ink); }

/* 결과 */
.check-result-card { display: none; padding: 8px 0 0; }
.result-header { padding: 18px 0 12px; border-top: 2px solid var(--ink); }
.result-title { font-size: 18px; font-weight: 800; color: var(--ink); }
.result-subtitle { font-size: 15px; line-height: 1.65; color: var(--body); margin-top: 6px; }
.result-subtitle strong { color: var(--ink); }
.result-stats-grid { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); margin: 0 0 8px; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-pill { margin: 0; padding: 12px 0; text-align: center; border-left: 1px solid var(--line); }
.stat-pill:first-child { border-left: 0; }
.stat-rank { font-size: 13px; font-weight: 700; color: var(--muted); }
.stat-rank small { display: block; font-size: 11px; font-weight: 500; }
.stat-val { font-size: 20px; font-weight: 800; color: var(--ink); margin-top: 2px; font-variant-numeric: tabular-nums; }
.win-p1 .stat-val { color: #c0392b; }
.timeline-title { font-size: 15px; font-weight: 700; color: var(--ink); margin: 18px 0 4px; }
.timeline-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-variant-numeric: tabular-nums; }
.timeline-item small { color: var(--muted); font-size: 13px; margin-left: 4px; }
.tl-rank { font-weight: 700; color: var(--ink); }
.tl-rank.is-first { color: #c0392b; }
.timeline-empty { padding: 12px 0; color: var(--muted); font-size: 14.5px; }

/* ---------- 통계 ---------- */
.cold-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 0; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cold-list li { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cold-weeks { font-size: 13px; color: var(--muted); }
.cold-weeks b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }

.hot-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.hot-list li { display: flex; align-items: center; gap: 12px; margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
.hot-bar { flex: 1; height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; }
.hot-bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.hot-count { flex: none; min-width: 52px; text-align: right; font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

.num-table { width: 100%; border-collapse: collapse; margin: 8px 0 0; font-size: 15px; border-top: 2px solid var(--ink); font-variant-numeric: tabular-nums; }
.num-table th { padding: 10px 4px; font-size: 13px; font-weight: 700; color: var(--muted); text-align: right; border-bottom: 1px solid var(--line); }
.num-table th:first-child, .num-table td:first-child { text-align: left; }
.num-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: right; color: var(--body); }
.num-table tr.is-cold td:last-child { color: #c0392b; font-weight: 700; }

/* ---------- 데이터 ---------- */
.dl-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.dl-list li { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.dl-title { font-size: 16.5px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.dl-desc { font-size: 14.5px; color: var(--muted); line-height: 1.6; margin: 0 0 12px; }
.dl-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 6px; color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.dl-btn:hover { background: var(--ink); color: #fff; }
.dl-btn small { font-weight: 500; color: inherit; opacity: 0.7; margin-left: 6px; }

.draw-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.draw-list li { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.draw-head { display: flex; align-items: baseline; gap: 8px; font-size: 15px; color: var(--ink); }
.draw-head span { font-size: 13px; color: var(--muted); }
.draw-balls { display: flex; align-items: center; gap: 5px; margin: 8px 0 6px; flex-wrap: wrap; }
.draw-balls .plus { color: var(--muted); font-size: 14px; margin: 0 2px; }
.draw-prize { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.loading { padding: 16px 0; color: var(--muted); font-size: 14.5px; }

/* ---------- 서버에서 그린 통계·안내 ---------- */
.jump-links { display: flex; gap: 6px 14px; flex-wrap: wrap; padding: 14px 0 2px; font-size: 14px; }
.jump-links a { color: var(--accent); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.sub-title { font-size: 14.5px; font-weight: 700; color: var(--muted); margin: 14px 0 0; }
.two-col { display: grid; grid-template-columns: 1fr; gap: 0 32px; }
@media (min-width: 640px) { .two-col { grid-template-columns: 1fr 1fr; } }
.oe-key { flex: none; width: 52px; font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ball-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.plain-list { margin: 8px 0 12px 1.2em; padding: 0; font-size: 15px; line-height: 1.7; color: var(--body); }
.plain-list li { margin: 0 0 6px; }
.section-note a, .plain-list a { color: var(--accent); }
.dl-cols { font-size: 13.5px; color: var(--muted); margin: -6px 0 12px; line-height: 1.6; }
.rank-table td:first-child { font-weight: 700; color: var(--ink); }
.rank-table th:nth-child(2), .rank-table td:nth-child(2) { text-align: left; }

/* 공 색 (번호판에서 고른 번호에도 적용되도록 맨 뒤에 둠) */
.ball-yellow { background: #f2b51b; }
.ball-blue { background: #3d7fd6; }
.ball-red { background: #e4513f; }
.ball-grey { background: #8a9099; }
.ball-green { background: #3faa5b; }
