/* 회차별 당첨번호 페이지 디자인 (홈페이지와 같은 색과 글꼴) */
:root {
  --paper: #FFF4F6;
  --ink: #B3123A;
  --ink-deep: #8E0C2D;
  --ink-soft: #EFB7C6;
  --line: #E6CBD3;
  --text: #2A2530;
  --muted: #75656E;
  --big: clamp(38px, 11vw, 52px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 16px/1.6 "IBM Plex Sans KR", system-ui, sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--ink); }
:focus-visible { outline: 3px solid #1D4AA0; outline-offset: 3px; }

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  max-width: 880px;
  margin: 0 auto;
  padding: 16px 20px;
}
.top .home {
  font-family: "Black Han Sans", sans-serif;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
}
.top nav { display: flex; gap: 16px; font-weight: 600; font-size: .9375rem; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }

.wrap { max-width: 880px; margin: 0 auto; padding: 8px 20px 40px; }

h1 {
  margin: 12px 0 0;
  font-family: "Black Han Sans", sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1.1;
  color: var(--ink);
}
h2 {
  margin: 40px 0 12px;
  font-family: "Black Han Sans", sans-serif;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--ink);
}
.date { margin: 6px 0 0; color: var(--muted); }
.intro { margin: 8px 0 0; max-width: 40em; color: var(--muted); }

/* 공 */
.ball {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 27%, rgba(255,255,255,.85), rgba(255,255,255,0) 34%),
    radial-gradient(circle at 50% 45%, var(--c) 58%, var(--cd));
  box-shadow: inset -2px -3px 5px rgba(0,0,0,.18);
  width: 30px;
  height: 30px;
}
.ball span {
  display: grid;
  place-items: center;
  width: 62%;
  height: 62%;
  border-radius: 50%;
  background: #fff;
  color: var(--cd);
  font-family: "Black Han Sans", sans-serif;
  font-size: 12px;
  line-height: 1;
}
.c1 { --c: #FBC400; --cd: #8A6600; }
.c2 { --c: #3F7FE0; --cd: #1D4AA0; }
.c3 { --c: #F0503F; --cd: #B0261A; }
.c4 { --c: #9AA0A8; --cd: #545961; }
.c5 { --c: #43B460; --cd: #1F7536; }

.result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 18px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 6px;
}
.result .ball { width: var(--big); height: var(--big); }
.result .ball span { font-size: calc(var(--big) * .38); }
.result .plus { color: var(--muted); font-weight: 600; padding: 0 4px; }
.bonus-wrap { display: inline-flex; align-items: center; gap: 8px; }
.bonus-wrap small { color: var(--muted); font-size: .875rem; }

/* 표 */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 600; font-size: .875rem; color: var(--muted); background: #FFF9FA; }
td.num, th.num { text-align: right; }
td small { display: block; color: var(--muted); font-size: .8125rem; white-space: normal; }

/* 번호 분석 */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 0;
}
.facts div { padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.facts dt { font-size: .875rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 1.125rem; }

.counts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.counts li { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.note { margin: 10px 0 0; font-size: .875rem; color: var(--muted); }

/* 이동 */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
  font-weight: 600;
}
.pager a { text-decoration: none; }
.pager a:hover { text-decoration: underline; }
.cta {
  display: block;
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-family: "Black Han Sans", sans-serif;
  font-size: 1.3rem;
}

/* 전체 목록 */
.years { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.years a {
  padding: 6px 10px;
  border: 1.5px solid var(--ink-soft);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: .9375rem;
}
.list-balls { display: flex; align-items: center; gap: 4px; }
.list-balls .plus { color: var(--muted); padding: 0 2px; }
.list td a { font-weight: 600; }
@media (max-width: 560px) {
  th, td { padding: 10px 8px; }
  .list .wide { display: none; }
  .list-balls { gap: 3px; }
  .list-balls .ball { width: 25px; height: 25px; }
  .list-balls .ball span { font-size: 10px; }
  .list-balls .plus { padding: 0; }
}
@media (max-width: 360px) {
  th, td { padding: 8px 6px; font-size: .9375rem; }
  .list-balls { gap: 2px; }
  .list-balls .ball { width: 22px; height: 22px; }
  .list-balls .ball span { font-size: 9px; }
}

footer { padding: 8px 20px 32px; text-align: center; font-size: .875rem; color: var(--muted); }
footer p { margin: 4px auto; max-width: 40em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
