/* 로또 화면 전용 (번호 생성·내 번호·명예의 전당·회차·번호 통계·당첨금·FAQ). common.css 다음에 읽는다. */

/* 화면 제목 줄: 제목 · 데이터 요약 · 최신화 배너 */
.pagehead { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 14px; }
.pagehead h1 { font-size: 22px; margin: 0; white-space: nowrap; }
.pagehead .sub { margin: 0; font-size: 12.5px; }
.pagehead .banner { flex: 1 1 320px; margin: 0; padding: 6px 12px; }
.pagehead .adslot-mobile { flex: 1 1 100%; margin: 0; }
/* ===== 번호판 + 광고 B 한 줄 (PC) =====
   번호판이 남는 폭을 쓰고 광고는 300px 고정이다. 폭을 고정하는 이유: 애드핏 ins 가
   width:100% 라서 부모 폭이 내용에 따라 정해지면 0 으로 접힌다.
   - 슬롯이 비었거나(.adslot:empty) 접히면(NO-AD 콜백 · 차단 감지) 번호판이 줄 전체를 쓴다.
   - 번호 칸과 광고 사이를 넉넉히 띄운다 — 번호를 누르다 광고를 잘못 누르면 안 된다 (애드핏 정책).
   - 내 번호 · 명예의 전당에서는 번호판이 숨겨져 광고만 남으므로 가운데에 둔다.
   1100px 이하는 PC 광고 자체가 없어 한 줄로 묶을 것이 없다 (아래에서 block 으로 푼다). */
.toprow { display: flex; align-items: flex-start; justify-content: center; gap: 20px; }
.toprow > .card { flex: 1 1 0; min-width: 0; }
.toprow > .adslot { flex: 0 0 300px; }
@media (max-width: 1100px) {
  .toprow { display: block; }
}
/* 번호판 밑의 [번호 생성] — 모바일 전용 (아래 "모바일" 미디어쿼리에서 켠다) */
.genquick { display: none; }
/* ===== 로또 번호 생성기 안내 (메인 맨 아래, 검색엔진용 본문) =====
   읽는 글이라 카드 안 다른 요소보다 줄 간격을 넉넉히 잡는다. */
.seoinfo { font-size: 13.5px; line-height: 1.75; color: #444a60; }
.seoinfo h3 { font-size: 14.5px; color: #2b2f45; margin: 16px 0 6px; }
.seoinfo p { margin-bottom: 8px; }
.seoinfo ol, .seoinfo ul { margin: 0 0 8px 20px; }
.seoinfo li { margin-bottom: 4px; }
.seoinfo a { color: #3949ab; }
.seoinfo .hint { font-size: 12.5px; color: #77809a; margin: 12px 0 0; }
/* 원본은 1200x630 이다. 본문에서는 작게 보여 준다 (비율은 height:auto 가 지킨다) */
.seoinfo .seoimg { display: block; width: 100%; max-width: 420px; height: auto;
                   margin: 10px 0 4px; border-radius: 10px; border: 1px solid #e3e6f0; }
/* 묶음 제목 (분석 참고 등) */
.sectitle { font-size: 15px; color: #556; margin: 22px 4px 10px; }
/* ----- 모바일: 위쪽 바 + 아래 탭 + 서랍 ----- */
@media (max-width: 767px) {
  /* 접기는 PC 전용 */
  /* 번호 생성 화면의 제목은 위쪽 바의 사이트 이름과 똑같다. 화면에서는 감추되
     검색엔진·화면 낭독기는 읽을 수 있게 남긴다 (display:none 은 둘 다 못 읽는다). */
  body.view-gen .pagehead h1 { position: absolute; width: 1px; height: 1px; overflow: hidden;
                               clip-path: inset(50%); white-space: nowrap; }
  /* 여백·글자 크기는 .btn(common.css: 10px 22px · 15px, 높이 41px)을 그대로 쓴다.
     예전 한 파일(style.css)일 때 여기 적힌 padding:13px · font-size:16px 은 뒤쪽 .btn 에 덮여 쓰이지 않았고,
     폰 첫 화면에 번호판과 이 버튼이 들어오게 맞춘 높이(41px)도 그 상태로 잰 것이다 — 2026-11-22 파일을 나누며 뺌 */
  .genquick { display: block; width: 100%; margin-top: 10px; }
  .latestballs .bonus-label { display: none; }
}
.adslot-mobile { display: none; }
@media (max-width: 1100px) {
  .adslot-pc { display: none; }
  /* 데이터 요약(.sub)과 배너 사이에 들어간다.
     위쪽은 .sub 여백으로 충분하므로 아래 간격만 잡아 준다. */
  .adslot-mobile { display: flex; margin: 0 0 16px; }
}
/* ===== 면책 고지 =====
   PC 는 가로 폭이 넉넉하므로 문단을 세로로 쌓지 않고 가로로 이어 붙인다 (5줄 → 2~3줄).

   flex 로 붙이지 않고 문단을 inline 으로 흘리는 이유:
   flex 는 아이템(=문단) 통째로만 줄을 넘겨서, 긴 문단 하나가 안 들어가면 그 줄 뒤가
   통째로 비고 3줄이 된다. inline 이면 단어 단위로 끊겨 줄을 꽉 채운다.
   1101px 같은 좁은 PC 폭에서 차이가 크다. */
.disclaimer {
  margin-top: 8px;
  padding: 7px 12px 5px;
  border-top: 1px solid #dfe3ee;
  font-size: 11.5px;
  line-height: 1.55;
  color: #7a8296;
}
/* 문단을 한 줄기 텍스트로 흘린다. 항목 경계는 뒤에 붙는 가운뎃점이 맡는다. */
.disclaimer p { display: inline; margin: 0; }
.disclaimer p:not(:last-child)::after { content: ' · '; color: #c3cadb; }
.disclaimer strong { color: #5a6274; font-weight: 700; }
.disclaimer .help { color: #99a0b0; }
.disclaimer a { color: #7a8296; }
/* 개인정보처리방침 링크 — 법정 공개 항목이라 다른 문구보다 눈에 띄어야 한다 */
.disclaimer a.policy { color: #3949ab; text-decoration: underline; }
.disclaimer a.policy strong { color: #3949ab; }
/* 19세 이용불가 마크 */
.disclaimer .age {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: #c62828; color: #fff;
  font-size: 9px; font-weight: 700; letter-spacing: -.5px;
  vertical-align: -3px; margin-right: 3px;
}
/* 같은 메뉴 안의 페이지를 오가는 탭 (통계 요약 ↔ 번호별 통계) */
.doc .subtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.doc .subtabs a { padding: 6px 14px; border: 1px solid #c5cae9; border-radius: 18px; background: #fff;
                  font-size: 13px; font-weight: 600; color: #3949ab; text-decoration: none; }
.doc .subtabs a:hover { background: #f5f7ff; }
.doc .subtabs a.on { background: #3949ab; border-color: #3949ab; color: #fff; }
.doc .bigballs { margin: 6px 0 18px; }
.doc .bigballs .ball { width: 52px; height: 52px; min-width: 52px; font-size: 20px; }
.doc .titleball { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.doc .titleball .ball { width: 48px; height: 48px; min-width: 48px; font-size: 19px; }
.doc .titleball h1 { margin: 0; }
/* 로또 당첨번호 조회 (/rounds): 최신 회차 아래 줄 + 회차 조회 칸 */
.doc .latesthead { margin-top: 6px; }
.doc .latestmeta { font-size: 13.5px; color: #556; margin: -8px 0 16px; }
.doc .roundfind { background: #f8f9fd; border: 1px solid #e3e6f0; border-radius: 10px; padding: 14px 16px; margin: 0 0 18px; }
.doc .roundfind label { display: block; font-size: 14px; font-weight: 700; color: #334; margin-bottom: 8px; }
.doc .roundfind .row { display: flex; gap: 8px; }
.doc .roundfind input { flex: 1; min-width: 0; max-width: 260px; padding: 9px 12px; border: 1px solid #cfd4e2; border-radius: 8px;
                        font-size: 16px; background: #fff; }
/* 16px: 아이폰이 입력할 때 화면을 확대하지 않게 */
.doc .roundfind .btn { flex: none; padding: 9px 20px; }
.doc .ballcell { white-space: nowrap; }
.doc .ballcell .ball { display: inline-flex; width: 28px; height: 28px; min-width: 28px; font-size: 11.5px; margin: 1px 2px; vertical-align: middle; }
.doc .roundtable th { white-space: nowrap; }
.doc .roundtable a { color: #3949ab; font-weight: 700; text-decoration: none; }
.doc .statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 16px; }
.doc .stat { background: #f8f9fd; border: 1px solid #e3e6f0; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.doc .stat .k { font-size: 12px; color: #778; }
.doc .stat strong { font-size: 22px; color: #222; }
.doc .stat .sub { font-size: 12px; color: #889; }
.doc .companions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 16px; }
.doc .companion { display: flex; align-items: center; gap: 6px; background: #f8f9fd; border: 1px solid #e3e6f0;
                  border-radius: 20px; padding: 4px 12px 4px 4px; text-decoration: none; color: #333; font-size: 13px; }
.doc .companion .ball { width: 30px; height: 30px; min-width: 30px; font-size: 12px; }
.doc .numgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 12px 0 18px; }
.doc .numcard { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #f8f9fd;
                border: 1px solid #e3e6f0; border-radius: 10px; padding: 12px 6px; text-decoration: none; color: #333; }
.doc .numcard:hover { border-color: #5c6bc0; }
.doc .numcard .cnt { font-size: 14px; }
.doc .numcard .cnt strong { font-size: 18px; }
.doc .numcard .sub { font-size: 11.5px; color: #889; }
.doc .cta { background: linear-gradient(135deg, #fffdf5, #fff7e6); border: 1px solid #ffe0a3; border-radius: 12px;
            padding: 16px 18px; margin: 22px 0; text-align: center; }
.doc .cta p { margin-bottom: 10px; }
/* color 를 꼭 적어야 한다 — 안 적으면 .doc a (남색) 가 .btn (흰색) 을 이겨서
   파란 버튼 위에 남색 글자가 되어 안 읽힌다. */
.doc .cta .btn { display: inline-block; text-decoration: none; color: #fff; }
@media (max-width: 700px) {
  .doc .statgrid { grid-template-columns: repeat(2, 1fr); }
  .doc .numgrid { grid-template-columns: repeat(3, 1fr); }
  .doc .bigballs .ball { width: 40px; height: 40px; min-width: 40px; font-size: 16px; }
}
/* 폰: 당첨번호 6개 + 보너스가 한 줄에 들어가게 공을 줄인다 (40px 이면 보너스 공만 다음 줄로 떨어졌다) */
@media (max-width: 480px) {
  .doc .bigballs { gap: 5px; }
  .doc .bigballs .ball { width: 34px; height: 34px; min-width: 34px; font-size: 14px; }
}
@media (max-width: 359px) {
  .doc .bigballs { gap: 4px; }
  .doc .bigballs .ball { width: 29px; height: 29px; min-width: 29px; font-size: 12.5px; }
  .doc .bigballs .plus { margin: 0; }
  .doc .ballcell .ball { width: 23px; height: 23px; min-width: 23px; font-size: 10.5px; margin: 1px; }
}
.card.latest .latestlink { color: inherit; text-decoration: none; }
.card.latest .latestlink:hover { text-decoration: underline; }
.latestballs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.latestballs .ball { width: 38px; height: 38px; min-width: 38px; font-size: 15px; }
.latestballs .plus { color: #99a; font-weight: 700; margin: 0 2px; }
.latestballs .bonus-label { font-size: 11px; color: #889; margin-left: 4px; }
.sub { color: #667; font-size: 13px; margin-bottom: 20px; }
/* keep-all: 폰에서 줄이 넘어갈 때 "1·2 / 위" 처럼 낱말 중간에서 끊기지 않게 한다 */
.legend { font-size: 12px; color: #667; margin-bottom: 10px; word-break: keep-all; }
.legend span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin: 0 4px 0 10px; }
.grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; }
.num.include { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.num.exclude { background: #c62828; color: #fff; border-color: #c62828; text-decoration: line-through; }
.num.hot::after { content: '🔥'; position: absolute; top: -6px; right: -2px; font-size: 10px; }
.num.top::after { content: '⭐'; position: absolute; top: -6px; right: -2px; font-size: 10px; }
.num.top { border-color: #f9a825; box-shadow: 0 0 0 2px #ffe082; }
.banner { font-size: 13px; padding: 8px 14px; border-radius: 8px; margin-bottom: 16px; display: none; }
/* 상태 클래스가 붙어야 보인다. 세 클래스 모두 같은 flex 레이아웃을 쓴다
   (왼쪽=회차 메시지, 오른쪽=방문자 수). */
.banner.ok, .banner.new, .banner.fail {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 2px 14px;
}
.banner.ok { background: #e8f5e9; color: #2e7d32; }
.banner.new { background: #fff8e1; color: #b26a00; }
.banner.fail { background: #fdecea; color: #c62828; }
/* 메시지가 길면 줄바꿈되며 방문자 수를 아래로 밀어낸다 */
.banner-msg { flex: 1 1 auto; min-width: 0; }
/* 방문자 수는 숫자 중간에서 끊기지 않게 한 덩어리로 유지.
   색은 배너 상태색(초록/주황/빨강)을 그대로 물려받되 한 톤 흐리게 둔다. */
.banner-visitors { flex: 0 0 auto; white-space: nowrap; opacity: .72; }
.banner-visitors strong { font-weight: 700; }
/* 좁은 화면: 2줄로 쌓고 둘 다 왼쪽 정렬 */
@media (max-width: 700px) {
  .banner.ok, .banner.new, .banner.fail { flex-direction: column; align-items: flex-start; gap: 3px; }
  .banner-visitors { white-space: normal; }
}
.topballs { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.topballs .ball { width: 52px; height: 52px; min-width: 52px; font-size: 20px; }
.topdesc { font-size: 13px; color: #667; margin-left: 8px; flex: 1 1 160px; min-width: 0; }
.minibtn { background: #2e7d32; color: #fff; border: none; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; margin-left: auto; flex: 0 0 auto; white-space: nowrap; }
/* 6개가 항상 한 줄에 들어가도록 균등 6열 그리드 */
.poscols { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.poscol { min-width: 0; text-align: center; background: #f8f9fd; border: 1px solid #e3e6f0; border-radius: 10px; padding: 8px 3px; }
.poscol .plabel { font-size: 11px; color: #889; margin-bottom: 5px; font-weight: 600; }
.poscol .ball { width: 34px; height: 34px; min-width: 34px; font-size: 13px; margin: 0 auto 6px; }
.poscol .cand { font-size: 10px; color: #667; line-height: 1.6; white-space: nowrap; font-weight: 600; }
.poscol .cand em { font-style: normal; color: #a0a7ba; font-weight: 400; }
.posfoot { display: flex; align-items: center; margin-top: 12px; font-size: 13px; color: #667; }
.rtable { border-collapse: collapse; width: 100%; max-width: 420px; font-size: 13px; }
.rtable th, .rtable td { border: 1px solid #e3e6f0; padding: 6px 12px; text-align: center; }
.rtable th { background: #f8f9fd; color: #556; }
.rtable td.strong { font-weight: 700; color: #1a56db; }
.rpat { font-size: 12px; color: #889; margin-top: 10px; line-height: 1.7; }
.rcrow { margin-top: 12px; gap: 10px; }
.rcrow .rclabel { font-size: 13px; color: #667; }
.rcrow label { font-size: 13px; color: #445; }
.controls input.rc { width: 48px; padding: 5px; }
.rchint { font-size: 12px; color: #99a; margin-top: 6px; }
.controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.controls label { font-size: 14px; }
.controls input[type=number] { width: 64px; padding: 6px; border: 1px solid #ccd; border-radius: 6px; }
.game { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.game .label { width: 32px; color: #889; font-size: 12px; font-weight: 600; text-align: right; padding-right: 4px; flex: 0 0 auto; }
/* flex 컨테이너 안에서 가로가 눌려 타원이 되지 않도록 크기 고정 */
.ball { width: 40px; height: 40px; min-width: 40px; flex: 0 0 auto; box-sizing: border-box; aspect-ratio: 1 / 1;
        border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700;
        box-shadow: inset -3px -3px 6px rgba(0,0,0,.2); }
.b1 { background: #fbc400; }
.b2 { background: #69c8f2; }
.b3 { background: #ff7272; }
.b4 { background: #aaa; }
.b5 { background: #b0d840; }
.ball.fixed { outline: 3px solid #2e7d32; }
.hotlist { display: flex; flex-wrap: wrap; gap: 8px; }
.hotchip { background: #fff3e0; border: 1px solid #ffb74d; border-radius: 16px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
/* 당첨 내역 */
.winrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px; border-radius: 10px;
          background: #f8f9fd; border: 1px solid #e3e6f0; margin-bottom: 8px; }
.winrow .ball { width: 30px; height: 30px; min-width: 30px; font-size: 12px; }
.winrow .ball.hit { outline: 3px solid #2e7d32; }
.winrow .who { font-size: 12px; color: #667; font-weight: 600; flex: 0 0 auto; }
.winrow .detail { font-size: 11px; color: #99a; flex-basis: 100%; }
.rankbadge { font-size: 12px; font-weight: 700; color: #fff; border-radius: 14px; padding: 3px 10px; flex: 0 0 auto; }
.rank1 { background: #d32f2f; }
.rank2 { background: #e65100; }
.rank3 { background: #f9a825; }
.rank4 { background: #388e3c; }
.rank5 { background: #1976d2; }
.nowin { font-size: 13px; color: #889; }
/* ===== 닉네임 ===== */
.nickrow { align-items: center; margin-bottom: 10px; }
.nicklabel input { width: 180px; padding: 6px 10px; border: 1px solid #cdd3e3; border-radius: 8px;
                   font-size: 14px; font-family: inherit; }
.nicklabel input:focus { outline: none; border-color: #5c6bc0; box-shadow: 0 0 0 3px rgba(92,107,192,.15); }
.nickhint { font-size: 11px; color: #99a; }
/* 닉네임 누적 생성 건수 배지 */
.nickcount { font-size: 12px; font-weight: 700; color: #1a56db; background: #eaf0fe;
             border: 1px solid #c7d6f8; border-radius: 14px; padding: 4px 11px;
             flex: 0 0 auto; white-space: nowrap; }
.nickcount[hidden] { display: none; }
.nickcount.zero { color: #7a8296; background: #f0f2f8; border-color: #dfe3ee; }
/* 개인정보 패턴 경고 (전화번호·계좌번호 등). 뜨는 동안 생성 버튼이 잠긴다. */
.nickerr { font-size: 12px; font-weight: 700; color: #b3261e; background: #fdecea;
           border: 1px solid #f5c2bd; border-radius: 8px; padding: 5px 11px;
           flex: 0 0 auto; }
.nickerr[hidden] { display: none; }
.nicklabel input.invalid { border-color: #e57373; background: #fffafa; }
.nicklabel input.invalid:focus { border-color: #d32f2f; box-shadow: 0 0 0 3px rgba(211,47,47,.15); }
/* 당첨자 닉네임 배지 (당첨 내역 맨 왼쪽) */
.nickbadge { font-size: 12px; font-weight: 700; color: #3b3f58; background: #e8ecfb; border: 1px solid #c9d2f0;
             border-radius: 14px; padding: 3px 10px; flex: 0 0 auto; max-width: 130px;
             overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 24, 40, .55); z-index: 1000;
                  display: flex; align-items: center; justify-content: center; padding: 32px; }
.modal-backdrop[hidden] { display: none; }
/* 모달이 열려 있는 동안 뒤쪽 페이지 스크롤 잠금 (좁은 화면에서 body가 스크롤되는 것 방지) */
body.modal-open { overflow: hidden; }
.modal { background: #fff; border-radius: 14px; padding: 20px 24px 20px; width: 100%; max-width: 1200px;
         max-height: 100%; display: flex; flex-direction: column; min-height: 0;
         box-shadow: 0 12px 40px rgba(0,0,0,.28); border-top: 4px solid #ffd54f; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head h2 { font-size: 18px; margin-bottom: 4px; }
.modal .sub { margin-bottom: 14px; }
.modal h3 { font-size: 13px; color: #556; margin-bottom: 8px; }
.modal-close { background: none; border: none; font-size: 26px; line-height: 1; color: #99a;
               cursor: pointer; padding: 0 4px; border-radius: 8px; }
.modal-close:hover { color: #444; background: #f0f2f8; }
/* 모달 본문은 남는 높이를 차지하고 안에서 스크롤한다 (사용법 .howbody · 검증 .btbody) */
.modal-body { flex: 1; min-height: 0; }
/* ===== 명예의 전당 (/hall) =====
   예전에는 모달이었고 표 머리글을 모달 안에서 sticky 로 고정했다.
   지금은 페이지 본문이라 페이지가 스크롤된다 — sticky 를 두면 모바일 위쪽 바 밑에 깔린다. */
#hallRankTable th { position: static; }
#hallView .sub { margin-bottom: 12px; }
.htable { width: 100%; border-collapse: collapse; font-size: 12px; }
.htable th, .htable td { padding: 6px 8px; text-align: center; border-bottom: 1px solid #eef0f7; }
.htable th { color: #778; font-weight: 600; background: #f8f9fd; position: sticky; top: 0; z-index: 1; }
.htable td.nickcell { text-align: left; font-weight: 700; color: #3b3f58;
                      max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htable tr.first td { background: #fffbe9; }
.htable tr.first td.nickcell::before { content: '👑 '; }
.htable td.nowin { text-align: center; padding: 16px; }
/* ===== 추천 옵션 ===== */
.h2sub { font-size: 12px; font-weight: 400; color: #98a0b5; margin-left: 6px; }
.recobtns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.recobtn { background: #fff; color: #3b3f58; border: 1.5px solid #c3cadb; padding: 8px 12px; border-radius: 20px;
           font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.recobtn:hover { border-color: #c62828; color: #c62828; }
.recobtn.on { background: #c62828; border-color: #c62828; color: #fff; }
.recobtn .cnt { font-weight: 400; opacity: .8; font-size: 11.5px; margin-left: 4px; }
.recoinfo { margin: 0 0 10px; line-height: 1.6; }
.recoinfo .warn { color: #c62828; font-weight: 700; }
#recoCard .controls { margin-top: 4px; }
/* 검증 모달 */
.modal-bt { max-width: 860px; border-top-color: #c62828; }
.modal-body.btbody { display: block; overflow-y: auto; padding-right: 6px; }
#btTable td.optcell { text-align: left; font-weight: 600; color: #3b3f58; white-space: nowrap; }
#btTable tr.base td { background: #f3f5fb; color: #667; }
#btTable tr.combo td { background: #fff5f5; }
#btTable td.better { color: #2e7d32; font-weight: 700; }
#btTable td.worse { color: #c62828; font-weight: 700; }
.btnote { margin-top: 12px; line-height: 1.6; }
/* 순위표 닉네임 행: 클릭하면 아래에 회차별 상세 행이 펼쳐진다 */
.htable tr.rankrow { cursor: pointer; }
.htable tr.rankrow:hover td { background: #f3f5fb; }
.htable tr.rankrow td.nickcell::after { content: ' ▸'; color: #b0b6c8; font-size: 11px; }
.htable tr.rankrow.open td.nickcell::after { content: ' ▾'; }
.htable tr.detail td { padding: 0 0 10px; background: #fafbfe; text-align: left; }
/* 회차별 상세 표 (순위 행 아래) */
.rtable-detail { width: 100%; border-collapse: collapse; font-size: 11.5px; margin: 0; }
.rtable-detail th, .rtable-detail td { padding: 5px 8px; border-bottom: 1px solid #eef0f7; text-align: center; vertical-align: top; }
.rtable-detail th { color: #889; font-weight: 600; background: #f2f4fa; position: static; }
.rtable-detail td.condcell { text-align: left; color: #556; }
.rtable-detail td.condcell .conds { min-width: 0; }
.rtable-detail td.condcell .conds div { margin-bottom: 2px; }
.rtable-detail td.condcell .cwin { color: #2e7d32; font-weight: 700; }
.rtable-detail td.condcell .cnone { color: #aab; }
.rtable-detail .win { color: #d84315; font-weight: 700; }
.rtable-detail .pend { color: #aab; }
/* 회차별 당첨번호 목록 */
.histrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 7px 10px;
           border-radius: 10px; background: #f8f9fd; margin-bottom: 5px; }
.histrow .hround { font-size: 12px; font-weight: 700; color: #3b3f58; min-width: 58px; }
.histrow .hdate { font-size: 11px; color: #99a; min-width: 74px; }
.histrow .ball { width: 28px; height: 28px; min-width: 28px; font-size: 11.5px; }
.histrow .plus { color: #99a; font-size: 12px; margin: 0 2px; }
.histmore { width: 100%; margin-top: 6px; font-size: 12px; }
@media (max-width: 1100px) {
  .modal-backdrop { padding: 12px; }
}
/* ===== 모달: 사용법 =====
   읽는 글은 한 줄이 길면 눈이 되돌아올 자리를 놓친다. 폭을 줄인다. */
/* 검증 모달 위에서 열릴 수 있으므로 한 단계 위에 둔다 (둘 다 z-index:1000 이면 DOM 순서로 밀린다) */
#howModal { z-index: 1010; }
.modal-narrow { max-width: 620px; border-top-color: #3b82f6; }
.modal-body.howbody { display: block; overflow-y: auto; padding-right: 6px; }
.howbody::-webkit-scrollbar { width: 8px; }
.howbody::-webkit-scrollbar-track { background: #eceff7; border-radius: 8px; }
.howbody::-webkit-scrollbar-thumb { background: #c3cadb; border-radius: 8px; }
.howbody { scrollbar-width: thin; scrollbar-color: #c3cadb #eceff7; }
/* 번호(동그라미) + 본문 2열. 번호는 줄어들지 않게 고정폭 */
.howsteps { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.howsteps > li { display: flex; gap: 12px; align-items: flex-start;
                 padding: 12px 0; border-bottom: 1px solid #eef0f7; }
.howsteps > li:last-child { border-bottom: none; }
.hownum { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
          background: #3b82f6; color: #fff; font-size: 13px; font-weight: 700;
          display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.howtext { min-width: 0; }
/* .modal h3 (12px·회색)를 덮어쓴다 — 단계 제목은 본문보다 커야 눈에 걸린다 */
.modal .howtext h3 { font-size: 15px; color: #2b2f45; margin: 0 0 4px; }
.howtext p { font-size: 13.5px; line-height: 1.7; color: #444a60; margin: 0 0 4px; }
.howtext p:last-child { margin-bottom: 0; }
.howtext b { color: #1f2437; }
/* 부가 설명 — 본문보다 한 톤 죽여서 "안 읽어도 되는 줄"임을 보여 준다 */
.howtip { font-size: 12.5px; color: #6b7186; background: #f6f7fb;
          border-radius: 8px; padding: 7px 10px; margin-top: 6px; }
/* 색 3단계 설명. 실제 숫자판 색과 같은 값을 써야 대조하며 읽힌다 */
.howchips { list-style: none; margin: 8px 0 4px; padding: 0;
            display: flex; flex-wrap: wrap; gap: 6px 14px; }
.howchips li { display: flex; align-items: center; gap: 6px;
               font-size: 12.5px; color: #555b70; }
.howchip { width: 26px; height: 26px; border-radius: 7px; font-size: 12px; font-weight: 700;
           display: flex; align-items: center; justify-content: center; }
.chip-none { background: #f2f4fa; color: #555; border: 1px solid #dfe3ee; }
.chip-in   { background: #2e7d32; color: #fff; }
.chip-out  { background: #c62828; color: #fff; }
/* 사행산업 관련 고지는 푸터에도 있지만, 모달을 열면 푸터가 가려지므로 여기에도 둔다 */
.hownote { margin-top: 14px; padding: 12px 14px; border-radius: 10px;
           background: #fff8e6; border: 1px solid #ffe0a3;
           font-size: 12.5px; line-height: 1.7; color: #6b5320; }
@media (max-width: 480px) {
  .modal-narrow { padding: 16px 16px 16px; }
  .howsteps > li { gap: 10px; padding: 10px 0; }
  .modal .howtext h3 { font-size: 14px; }
  .howtext p { font-size: 13px; }
}
/* ===== 폰 화면(360px 등) =====
   가로로 6칸을 늘어놓는 두 영역이 카드 폭을 넘던 문제를 잡는다.
   폭 360px 기준으로 카드 안쪽은 272px 뿐이다. */
@media (max-width: 480px) {
  /* 생성 결과: 라벨 32 + 공 40×6 + 간격 8×6 = 320px 라 48px 넘쳤다.
     공을 고정폭 대신 남는 폭을 나눠 갖게 바꾼다 (원래 크기 40px는 넘지 않는다). */
  .game { gap: 5px; }
  .game .label { width: 24px; padding-right: 2px; }
  .game .ball {
    flex: 1 1 0;
    width: auto; min-width: 0; max-width: 40px;
    height: auto;            /* aspect-ratio가 정사각형을 유지해 준다 */
    font-size: 14px;
  }
  /* 자리별 최적 조합: 6열이면 한 칸이 40px라 34px 공과 테두리·여백이 칸을 넘쳤다.
     3열 2줄로 접는다 (1~6번째 순서는 그대로 읽힌다). */
  .poscols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .poscol { padding: 8px 4px; }
}
/* ----- PC, 세로가 짧은 화면 (노트북 · 배율 125% 등) -----
   1536x640 같은 화면에서는 [번호 생성] 버튼이 첫 화면 바로 아래로 잘렸다.
   번호판 칸 높이와 카드 사이 여백을 조금씩 줄여 버튼까지 한 화면에 넣는다.
   세로가 넉넉한 모니터에서는 위의 여유 있는 간격을 그대로 쓴다. */
@media (min-width: 1101px) and (max-height: 800px) {
  .pagehead { margin-bottom: 10px; }
  .pagehead h1 { font-size: 20px; }
  .latestballs .ball { width: 34px; height: 34px; min-width: 34px; font-size: 14px; }
  .legend { margin-bottom: 8px; }
  .grid { gap: 5px; }
  .nickrow { margin-bottom: 8px; }
}
@media (max-width: 1100px) {
  /* 푸터는 한 줄에 한 항목씩 쌓는다 */
  .disclaimer {
    margin-top: 20px; padding: 14px 4px 24px;
    font-size: 11.5px; line-height: 1.6;
  }
  .disclaimer p { display: block; }
  .disclaimer p + p { margin-top: 2px; }
  .disclaimer p:not(:last-child)::after { content: none; }
}
/* ----- 폰 화면(360px 등) -----
   좌우 여백을 줄여 번호 표와 공에 폭을 돌려준다. 아래 탭 글자는 5칸이 한 줄에 들어가게 줄인다.
   (padding 을 줄임말로 쓰면 메뉴용 위·아래 여백(body.has-nav)까지 덮으므로 좌우만 지정한다) */
@media (max-width: 480px) {
  .pagehead h1 { font-size: 19px; }
  .grid { gap: 5px; }
  .latestballs { gap: 5px; }
  .latestballs .ball { width: 32px; height: 32px; min-width: 32px; font-size: 13px; }
}
/* ----- 폰 화면: 명예의 전당 -----
   순위표는 8칸이라 360px(카드 안쪽 ≈ 300px)에서 칸 여백만 128px 를 먹는다.
   여기에 순위 행을 누르면 5칸짜리 상세 표가 colspan 안에 또 들어가는데, 조건 문구가
   길어 안쪽 표의 최소 폭이 바깥 표를 밀어 넓히고 카드 밖으로 삐져나갔다.
   → 바깥 표는 여백을 줄이고, 안쪽 표는 표를 버리고 회차별 카드로 세로 배치한다.
     (칸 이름은 lotto.js 가 data-label 로 넣어 준다) */
@media (max-width: 700px) {
  .modal { padding: 16px 14px; }
  .modal-head h2 { font-size: 16px; }
  .htable { font-size: 11.5px; }
  .htable th, .htable td { padding: 6px 3px; }
  .htable td.nickcell { max-width: 84px; }
  .htable tr.detail td { padding: 6px 0 10px; }
  /* 상세 표 → 카드. thead 는 없애고 tr 하나가 카드 하나 */
  .rtable-detail,
  .rtable-detail tbody,
  .rtable-detail tr,
  .rtable-detail td { display: block; width: 100%; box-sizing: border-box; }
  .rtable-detail thead { display: none; }
  .rtable-detail { font-size: 12px; overflow-wrap: anywhere; word-break: keep-all; }
  .rtable-detail tr { background: #fff; border: 1px solid #e6e9f2; border-radius: 8px;
                      padding: 6px 10px 8px; margin-bottom: 6px; }
  .rtable-detail tr:last-child { margin-bottom: 0; }
  .rtable-detail td { display: flex; align-items: flex-start; gap: 8px;
                      text-align: left; padding: 3px 0; border-bottom: none; }
  /* 칸 이름을 앞에 붙인다. 폭을 고정해 값이 세로로 줄 맞춰 보이게 */
  .rtable-detail td::before { content: attr(data-label); flex: 0 0 30px;
                              color: #889; font-weight: 600; }
  /* 회차는 카드 제목 역할이라 이름 없이 굵게 */
  .rtable-detail td.roundcell { padding-bottom: 5px; margin-bottom: 3px;
                                border-bottom: 1px solid #eef0f7; font-size: 13px; }
  .rtable-detail td.roundcell::before { content: none; }
  .rtable-detail td.condcell .conds { flex: 1 1 auto; }
}
/* ----- 모바일: 첫 화면 세로 압축 -----
   맨 위 광고(320x100)가 뜨면 번호판 밑 [번호 생성] 버튼이 아래 탭에 걸렸다 (375x812 기준).
   번호 칸은 누르기 좋은 높이(40px 안팎)를 지키는 선에서만 줄이고(위 480px 블록의 .num),
   나머지는 카드 사이 여백에서 덜어 낸다.
   파일 맨 아래에 두는 이유: .card · .legend 의 기본 규칙이 사이트 메뉴 블록보다 뒤에 있어서,
   그 블록 안에 적으면 기본 규칙에 덮인다. 기준 폭은 사이트 메뉴의 모바일 전환(767px)과 같다. */
@media (max-width: 767px) {
  .pagehead { gap: 6px 14px; margin-bottom: 10px; }
  /* "총 N회차 데이터 · 최근 10회차 트렌드 분석" 한 줄은 폰에서 뺀다. 같은 내용(최신 회차)이
     바로 아래 배너와 당첨번호 카드에 있고, 이 한 줄(약 26px) 때문에 작은 폰(360x740)에서 버튼이 가렸다. */
  .pagehead .sub { display: none; }
  .pagehead .banner { padding: 5px 12px; }
  .legend { margin-bottom: 8px; }
}
/* 세로가 짧은 폰(360x740 등)에서만 한 번 더 줄인다.
   실제 광고가 뜨고 배너가 두 줄(최신화 · 방문자 수)로 접히면 위 압축만으로는 버튼이 탭 밑으로 5px 들어갔다.
   번호 칸 37px 은 누를 수 있는 하한으로 보고 더 줄이지 않는다. 375x812 이상은 이 블록을 타지 않는다. */
@media (max-width: 767px) and (max-height: 780px) {
  .latestballs .ball { width: 30px; height: 30px; min-width: 30px; font-size: 12.5px; }
  .pagehead { margin-bottom: 8px; }
}

/* ===== 작은 폰 가로 밀림 (2026-11-22) ===== */
/* 폭 360px 미만: 모바일 광고(320px)가 본문 폭(화면 − 양옆 24px)보다 넓어 화면이 옆으로 12px 밀렸다 (홈 · 내 번호 · 명예의 전당).
   광고 줄만 화면 양끝까지 넓혀 가운데에 둔다 — 정보 페이지 .doc-ad(common.css)와 같은 방법. 높이는 그대로라 첫 화면 맞춤·자동 스크롤에 영향 없음.
   맨 위 광고(M)는 .pagehead 의 줄바꿈 flex 항목이라 폭을 flex-basis 로 준다 (음수 여백만으로는 넓어지지 않는다). */
@media (max-width: 359px) {
  .adslot-mobile { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
  .pagehead .adslot-mobile { flex-basis: 100vw; margin: 0 calc(50% - 50vw); }
  .adslot-mobile ins.kakao_ad_area { text-align: center; }
}
/* 칸이 많은 표(번호 페이지 '자리' 7칸, 통계 '구간' 6칸 — class="dtable tight")는 가장 작은 폰(360px 미만)에서
   글자를 조금 줄이고 첫 칸("최근 30회")의 줄바꿈을 허용한다. 칸 여백·첫 칸 폭은 common.css 의 400px 이하 규칙이 줄인다.
   이렇게 해도 320px 폰 카드 안쪽 폭(268px)에 겨우 들어간다 — 칸을 더 늘리지 말 것 */
@media (max-width: 359px) {
  .doc .dtable.tight { font-size: 11.5px; }
  .doc .dtable.tight tbody th { white-space: normal; word-break: keep-all; } /* "최근 30 / 회" 대신 "최근 / 30회" 로 끊기게 */
}
/* 번호 페이지 '최근에 나온 회차' 표: 첫 칸의 "(보너스)"를 회차 아래 줄로 — 한 줄로 두면 첫 칸이 넓어져 375px 폰에서도 표가 넘쳤다 */
@media (max-width: 480px) {
  .doc .roundtable tbody th .hint { display: block; }
}

/* 다음 회차 페이지 "N회 분석" (2026-11-22) — 오래 안 나온 번호: 공 아래 "N회째" */
.doc .roundfacts { padding-left: 20px; margin: 8px 0 6px; line-height: 1.7; }
.latestballs.coldballs { gap: 12px; margin: 4px 0 8px; }
.latestballs .cold { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.latestballs .cold small { font-size: 11.5px; color: #667; white-space: nowrap; }
