/* 로또랩 메인 화면 — 디자인 시안(메인 화면 · 휴대폰 메인 화면) 구현 */
:root {
  --navy: #14284B;
  --gold: #E2A93B;
  --gold-dark: #B07D12;
  --bg: #F6F7FA;
  --white: #FFFFFF;
  --text: #1B2433;
  --muted: #4F5B70;
  --line: #D5DBE6;
  --on-navy: #C9D1E0;
  --chip: #E3E8F1;
  --notice: #FBF0D5;
  --ball-yellow: #F5B921;
  --ball-blue: #2F6FD6;
  --ball-red: #D9453A;
  --ball-gray: #6B7385;
  --ball-green: #1B7F42;
  --tabbar-h: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
html.big-text { font-size: 19px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: 'Noto Sans KR', system-ui, 'Malgun Gothic', sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--ball-blue); outline-offset: 2px; }
[hidden] { display: none !important; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.bg-soft { background: var(--bg); }
.small { font-size: 0.875rem; line-height: 1.6; color: var(--muted); }
.link-more {
  display: inline-flex; align-items: center; min-height: 48px;
  font-weight: 700; color: var(--navy); text-decoration: underline;
}

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px; border-radius: 12px;
  border: 2px solid transparent; font-size: 1.125rem; font-weight: 700;
  color: var(--navy); background: transparent; text-align: center;
}
.btn:hover { text-decoration: none; filter: brightness(0.96); }
.btn-gold { background: var(--gold); }
.btn-outline { border-color: var(--navy); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.25rem; }
.btn-block { display: flex; width: 100%; }

/* 상단 안내 줄 */
.topbar { background: var(--navy); color: var(--on-navy); font-size: 0.875rem; }
.topbar .container {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 8px; padding-top: 10px; padding-bottom: 10px;
}
.topbar-links { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.text-toggle {
  border: 0; background: none; padding: 0; color: inherit; font-size: inherit; font-weight: inherit;
}
.text-toggle:hover { text-decoration: underline; }

/* 헤더 */
.header { position: relative; background: var(--white); border-bottom: 1px solid var(--line); }
.header .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 2rem; font-weight: 900; letter-spacing: -0.02em; color: var(--navy); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { padding: 12px 10px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.menu-btn {
  display: none; width: 48px; height: 48px; padding: 0; border: 0; background: transparent;
  place-items: center;
}
/* 메뉴는 아래 화면을 밀어 내리지 않고 그 위에 겹쳐 뜬다. 햄버거(열렸을 땐 X)는 열린 메뉴 위에 그대로 보인다. */
.mobile-menu {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
  border-top: 1px solid var(--line); background: var(--white); padding: 8px 16px 16px;
  box-shadow: 0 14px 28px rgba(20, 40, 75, 0.2);
  /* 아래 탭 줄(--tabbar-h)에 가리지 않게 그 위까지만 늘어난다 */
  max-height: calc(100vh - 100px - var(--tabbar-h)); max-height: calc(100dvh - 100px - var(--tabbar-h)); overflow-y: auto; overscroll-behavior: contain;
}
.mobile-menu[hidden] { display: none; }
.header .menu-btn { position: relative; z-index: 70; }
.mobile-menu a {
  display: flex; align-items: center; min-height: 52px; padding: 0 4px;
  border-bottom: 1px solid var(--line); font-weight: 700; color: var(--navy);
}
/* 로그아웃·무료로 시작하기 버튼은 메뉴가 길어 스크롤되어도 아래에 붙어 잘리지 않는다 */
.mobile-menu .btn { margin-top: 16px; border-bottom: 2px solid transparent; position: sticky; bottom: 0; z-index: 2; box-shadow: 0 14px 0 0 var(--white), 0 -10px 12px -4px var(--white); }
.mobile-menu .btn-outline { background: var(--white); border-bottom-color: var(--navy); }   /* 위 .btn 의 투명 아래 테두리가 로그아웃 버튼 아랫변을 지우던 것을 막는다 */

/* 첫 화면 */
.hero .container { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px 40px; align-items: start; }
.hero-copy { min-width: 0; }
.hero .generator#generator { margin: 0; }
.hero .result-card { min-width: 0; }
/* PC: 왼쪽에 소개 + 설정(게임 수·분석 기준), 오른쪽에 추천 번호 */
@media (min-width: 900px) {
  .hero .container { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "copy result" "set result"; }
  .hero-copy { grid-area: copy; }
  .hero .generator#generator { grid-area: set; }
  .hero .result-card { grid-area: result; }
}
.badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--chip); color: var(--navy); font-size: 0.875rem; font-weight: 700;
}
.hero h1 {
  margin-top: 16px; font-size: 3rem; line-height: 1.25; font-weight: 900;
  letter-spacing: -0.02em; color: var(--navy);
}
.hero-lead { margin-top: 20px; font-size: 1.25rem; line-height: 1.7; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-copy .small { margin-top: 20px; }

/* 번호 생성 카드 */
.generator {
  min-width: 0; padding: 28px; border-radius: 24px;
  background: var(--white); border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(20, 40, 75, 0.08);
}
.generator h2 { font-size: 1.5rem; font-weight: 900; color: var(--navy); }
.field-label { margin: 20px 0 8px; font-size: 1rem; font-weight: 700; color: var(--text); }
.label-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.label-row .field-label { margin-right: auto; }
.all-check { display: inline-flex; align-items: center; gap: 6px; margin: 20px 0 8px; font-size: 0.875rem; color: var(--text); cursor: pointer; min-height: 28px; }
.all-check input { width: 18px; height: 18px; margin: 0; cursor: pointer; accent-color: #C9A227; }
.hero .all-check { margin: 12px 0 6px; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  min-width: 48px; min-height: 48px; padding: 0 18px; border: 2px solid var(--line);
  border-radius: 12px; background: var(--white); color: var(--text);
  font-size: 1rem; font-weight: 700;
}
.opt-num { padding: 0; font-size: 1.125rem; }
.opt[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: var(--white); }
.generator .btn-block { margin-top: 24px; }
/* 게임 수: 휠(위아래로 돌려 고름) + 숫자 입력칸 */
.count-picker { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.wheel-frame { position: relative; width: 100%; height: 132px; }
.wheel {
  height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: 14px; background: var(--white); outline: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 32%, #000 68%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 32%, #000 68%, transparent 100%);
}
.wheel::-webkit-scrollbar { display: none; }
.wheel:focus-visible { box-shadow: 0 0 0 3px var(--gold, #C9A227); }
.wheel ul { list-style: none; margin: 0; padding: 44px 0; }
.wheel li { height: 44px; display: grid; place-items: center; scroll-snap-align: center; font-size: 1.25rem; font-weight: 700; color: var(--muted); cursor: pointer; font-variant-numeric: tabular-nums; }
.wheel li.sel { color: var(--navy); font-size: 1.625rem; font-weight: 900; }
.wheel li.lock { opacity: 0.4; }
.wheel-bar { position: absolute; left: 8px; right: 8px; top: 44px; height: 44px; border-top: 2px solid var(--navy); border-bottom: 2px solid var(--navy); pointer-events: none; }
.count-input { position: relative; display: block; width: 100%; }
.count-input .input { display: block; width: 100%; text-align: center; font-size: 1.25rem; font-weight: 700; padding-inline: 3rem; }
.count-input .input::placeholder { font-size: 0.8125rem; font-weight: 500; color: var(--muted); opacity: 0.55; }
.count-unit { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); pointer-events: none; }
.count-hint { margin-top: 8px; color: var(--muted); }
.generator .result-label { margin: 20px 0 10px; }
.games { display: flex; flex-direction: column; gap: 11px; }
.balls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* 번호 생성 결과 목록: 순번 · 공 6개(가운데) · X 를 세 칸으로 나눠 한쪽으로 쏠리지 않게 한다 */
.game-row { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) 2.25rem; align-items: center; column-gap: 14px; }
.game-no { font-size: 0.875rem; font-weight: 700; color: var(--muted); text-align: right; }
.game-row .balls { width: 100%; gap: 8px; flex-wrap: nowrap; justify-content: center; }
.game-row .ball { width: 2.25rem; height: 2.25rem; font-size: 1rem; }
.game-x { justify-self: end; width: 36px; height: 36px; border: 1px solid var(--line, #D9DEE8); border-radius: 50%; background: #fff; color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer; }
@media (max-width: 640px) {
  .game-row { grid-template-columns: 1.4rem minmax(0, 1fr) 2rem; column-gap: 10px; }
  .game-row .balls { gap: 8px; }
  .game-row .ball { width: 1.8rem; height: 1.8rem; font-size: 0.875rem; }
  .game-x { width: 32px; height: 32px; }
}
.game-x:hover { background: #FCEBEB; border-color: #E24B4A; color: #A32D2D; }
.game-x:focus-visible { outline: 3px solid var(--gold, #C9A227); outline-offset: 2px; }
.games.scrolls { max-height: min(420px, 58vh); overflow-y: auto; padding-right: 6px; overscroll-behavior: contain; border-top: 1px solid var(--line, #D9DEE8); border-bottom: 1px solid var(--line, #D9DEE8); padding-top: 8px; padding-bottom: 8px; }

/* 번호 공 */
.ball {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 1.125rem; font-weight: 700; color: var(--white);
}
.ball-lg { width: 3.5rem; height: 3.5rem; font-size: 1.375rem; }
.ball.r1 { background: var(--ball-yellow); color: var(--navy); }
.ball.r2 { background: var(--ball-blue); }
.ball.r3 { background: var(--ball-red); }
.ball.r4 { background: var(--ball-gray); }
.ball.r5 { background: var(--ball-green); }
.plus { font-size: 1.5rem; font-weight: 700; color: var(--muted); }

/* 바로가기 */
.section-title { font-size: 1.75rem; font-weight: 900; color: var(--navy); }
.section-title-lg { font-size: 2rem; }
.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-top: 24px; }
.shortcut {
  min-height: 140px; padding: 24px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--bg); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; font-weight: 700; color: var(--navy); text-align: center;
}
.shortcut:hover { text-decoration: none; border-color: var(--navy); }
.icon { fill: none; stroke: var(--navy); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.icon .accent { stroke: var(--gold-dark); }

/* 최근 추첨 결과 */
.draw { padding-bottom: 32px; }
.draw .container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { padding: 32px; border-radius: 20px; background: var(--white); border: 1px solid var(--line); }
.card h2, .card-navy h2 { font-size: 1.5rem; font-weight: 900; color: var(--navy); }
.draw-card { flex: 1 1 340px; min-width: 0; }
.draw-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.draw-head span { font-size: 1rem; color: var(--muted); }
.draw-card .balls { gap: 10px; margin-top: 24px; }
.draw-card .small { margin-top: 16px; }
.draw-card .link-more { margin-top: 12px; }
.card-navy { flex: 1 1 300px; min-width: 0; padding: 32px; border-radius: 20px; background: var(--navy); color: var(--white); }
.card-navy h2 { color: var(--white); }
.card-navy p { margin-top: 12px; line-height: 1.6; color: var(--on-navy); }
.card-navy .btn { margin-top: 20px; min-height: 52px; padding: 0 24px; }

/* 광고 영역 */
.ad { padding: 0 0 56px; }
.ad-slot {
  height: 110px; border: 2px dashed #B8C0CF; border-radius: 12px; background: var(--white);
  display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--muted);
}

/* 패턴 마켓 */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head p { margin-top: 8px; line-height: 1.6; color: var(--muted); }
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.pattern {
  padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--white);
  display: flex; flex-direction: column; gap: 12px;
}
.tag {
  align-self: flex-start; padding: 4px 12px; border-radius: 999px;
  background: var(--gold); color: var(--navy); font-size: 0.875rem; font-weight: 700;
}
.pattern h3 { font-size: 1.375rem; font-weight: 900; color: var(--navy); }
.pattern p { font-size: 1rem; line-height: 1.6; color: var(--muted); }
.pattern .seller { font-size: 0.875rem; color: var(--muted); }
.pattern .price { font-size: 1.5rem; font-weight: 900; color: var(--navy); }
.pattern .btn { margin-top: auto; }
.market-more-mobile { display: none; }

/* 요금제 */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 1240px; margin-top: 28px; }
.plan-note { margin: 0; color: var(--muted); }
/* 요금제 카드 전체를 누를 수 있게: 카드 안 버튼의 링크가 카드 전체를 덮는다 (링크는 하나라 키보드·화면 낭독도 그대로) */
.plan { position: relative; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.plan .btn::after { content: ''; position: absolute; inset: 0; border-radius: 20px; }
.plan:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(23, 36, 58, 0.14); }
.plan:has(.btn:focus-visible) { outline: 3px solid #2F6FD6; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .plan { transition: none; } .plan:hover { transform: none; } }
.plan { padding: 32px; border-radius: 20px; background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.plan h3 { font-size: 1.5rem; font-weight: 900; color: var(--navy); }
.plan .amount { font-size: 2.25rem; font-weight: 900; color: var(--navy); }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.plan li { display: flex; align-items: center; gap: 10px; }
.plan li svg { flex: none; fill: none; stroke: var(--navy); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.plan .btn { margin-top: 8px; min-height: 52px; }
.plan-paid { background: var(--navy); border-color: var(--navy); color: var(--white); }
.plan-paid h3 { color: var(--white); }
.plan-paid .amount { color: var(--gold); }
.plan .amount .plan-year { display: block; font-size: 0.95rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
.plan-paid li svg { stroke: var(--gold); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* 커뮤니티 · 공지 */
.community .container { display: flex; flex-wrap: wrap; gap: 32px; }
.posts { flex: 2 1 560px; min-width: 0; }
.posts-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.posts-head a { font-size: 1rem; font-weight: 700; color: var(--navy); text-decoration: underline; }
.post-list { margin-top: 16px; border-top: 2px solid var(--navy); }
.post {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px; padding: 16px 4px; border-bottom: 1px solid var(--line);
}
.post strong { font-weight: 700; color: var(--navy); }
.post span { font-size: 0.875rem; color: var(--muted); }
.notices { flex: 1 1 300px; min-width: 0; padding: 28px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); }
.notices h2 { font-size: 1.5rem; font-weight: 900; color: var(--navy); }
.notice-list { margin-top: 12px; }
.notice-list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--navy); }
.notice-list a:last-child { border-bottom: 0; }

/* 건전 이용 안내 */
.responsible { background: var(--notice); padding: 24px 0; font-size: 1rem; line-height: 1.7; }
.responsible .lead { color: var(--navy); }

/* 하단 정보 */
.footer { background: var(--navy); color: var(--on-navy); padding: 40px 0 48px; }
.footer .container { display: flex; flex-direction: column; gap: 20px; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer .brand-name { font-size: 1.625rem; color: var(--white); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 1rem; font-weight: 700; color: var(--white); }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.footer p { font-size: 0.875rem; line-height: 1.8; }

/* 하단 탭 (휴대폰) */
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--white); border-top: 1px solid var(--line);
  padding: 6px 0 calc(10px + env(safe-area-inset-bottom));
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 56px; font-size: 0.875rem; font-weight: 700; color: var(--navy);
}
.tabbar a:hover { text-decoration: none; }
.tabbar .icon { stroke-width: 2.8; }

/* 좁은 화면: 헤더 메뉴 접기 */
@media (max-width: 1180px) {
  .nav, .header-actions .btn-gold { display: none; }
  .menu-btn { display: grid; }
}

/* 휴대폰 */
@media (max-width: 720px) {
  body { padding-bottom: var(--tabbar-h); }
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .topbar .container { padding-top: 8px; padding-bottom: 8px; line-height: 1.5; }
  .topbar-links a { display: none; }
  .header .container { padding-top: 10px; padding-bottom: 10px; flex-wrap: nowrap; }
  .brand { gap: 10px; }
  .brand svg { width: 42px; height: 40px; }
  .brand img { width: 47px; height: 40px; }
  .brand-name { font-size: 1.625rem; }
  .header-actions { gap: 4px; flex-wrap: nowrap; }
  .header-actions .btn-outline { border: 0; padding: 0 10px; font-size: 1rem; }

  .hero { padding: 32px 0 28px; }
  .hero .container { gap: 28px; }
  .hero h1 { margin-top: 14px; font-size: 2.125rem; line-height: 1.3; }
  .hero-lead { margin-top: 16px; font-size: 1.125rem; }
  .hero-actions { flex-direction: column; margin-top: 24px; }
  .hero-copy .small { margin-top: 16px; }
  .generator { padding: 20px; border-radius: 20px; }
  .generator h2 { font-size: 1.375rem; }
  .opt { padding: 0 16px; }
  .opt-num { padding: 0; }

  .section-title { font-size: 1.625rem; }
  .shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
  .shortcut { min-height: 120px; padding: 16px; gap: 10px; }
  .shortcut svg { width: 36px; height: 36px; }

  .draw { padding: 40px 0 24px; }
  .draw .container { gap: 16px; }
  .card, .card-navy { padding: 24px 20px; flex-basis: 100%; }
  .card h2, .card-navy h2 { font-size: 1.375rem; }
  .draw-card .balls { gap: 8px; margin-top: 20px; }
  .draw-card .ball-lg { width: 2.75rem; height: 2.75rem; font-size: 1.125rem; }
  .card-navy .btn { display: flex; }
  .ad { padding-bottom: 40px; }
  .ad-slot { height: 100px; }

  .section-head { margin-bottom: 0; }
  .section-head .link-more { display: none; }
  .market .container { padding: 0; }
  .section-head { padding: 0 16px; }
  .market-grid { display: flex; gap: 16px; overflow-x: auto; padding: 20px 16px 8px; scroll-snap-type: x proximity; }
  .pattern { flex: 0 0 270px; padding: 20px; gap: 10px; scroll-snap-align: start; }
  .pattern h3 { font-size: 1.25rem; }
  .pattern .price { font-size: 1.375rem; }
  .market-more-mobile { display: block; padding: 8px 16px 0; }

  .plans-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 20px; }
  .plan { padding: 24px 20px; gap: 14px; }
  .plan h3 { font-size: 1.375rem; }
  .plan .amount { font-size: 2rem; }

  .community .container { gap: 28px; }
  .posts-head h2 { font-size: 1.5rem; }
  .post { flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 2px; }
  .notices { padding: 20px; }
  .notices h2 { font-size: 1.375rem; }
  .responsible { padding: 20px 0; }
  .footer { padding: 32px 0 40px; }
  .footer .container { gap: 18px; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer .brand svg { width: 38px; height: 36px; }
  .footer .brand img { width: 42px; height: 36px; }
  .footer .brand-name { font-size: 1.5rem; }
  .tabbar { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (min-width: 900px) {
  /* 맨 위에서 한 화면에 다 들어오도록 PC 에서는 간격과 크기를 줄인다 */
  .hero { padding: 24px 0 20px; }
  .hero .container { gap: 16px 40px; }
  .hero h1 { margin-top: 10px; font-size: 2.25rem; }
  .hero-lead { margin-top: 10px; font-size: 1.0625rem; line-height: 1.6; }
  .hero-actions { margin-top: 14px; }
  .hero-actions .btn-lg { min-height: 44px; padding: 0 20px; font-size: 1rem; }
  .hero-copy .small { display: none; }
  .hero .generator { padding: 20px 24px; }
  .hero #generator { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .hero #generator h2 { grid-column: 1 / -1; }
  .hero .generator h2 { font-size: 1.25rem; }
  .hero .field-label { margin: 12px 0 6px; }
  .hero .count-picker { gap: 8px; }
  .hero .count-hint { display: none; }
  .hero .generator .btn-block { margin-top: 16px; }
  .hero .result-card .result-label { margin: 12px 0 8px; }
  /* 추천 번호 카드는 크기를 고정하고 목록만 안에서 스크롤한다. 왼쪽 설정 카드는 같은 높이까지 늘어난다 */
  .hero .container { align-items: stretch; }
  .hero .result-card { height: 740px; display: flex; flex-direction: column; }
  .hero .result-card .games { flex: 1 1 auto; min-height: 0; overflow-y: auto; max-height: none; overscroll-behavior: contain; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 6px 8px 0; }
  .hero .result-card .save-btn { flex: 0 0 auto; }
  .hero #generator { grid-template-rows: auto minmax(0, 1fr); align-items: stretch; }
  .hero-copy { align-self: start; }
  .hero .set-games, .hero .set-criteria { display: flex; flex-direction: column; min-height: 0; }
  .hero .set-games .count-picker { flex: 1 1 auto; min-height: 0; }
  .hero .set-games .wheel-frame { flex: 1 1 auto; height: auto; min-height: 132px; }
  .hero .wheel { position: absolute; inset: 0; height: auto; } /* 안쪽 내용 때문에 휠 틀이 커지지 않게 */
  .hero .wheel-bar { top: 50%; transform: translateY(-50%); }
  .hero .set-criteria .btn-block { margin-top: auto; }
}

/* 분석 기준 20개: 5열 4줄. 윗줄 인기 5개 · 가운데 보통 10개 · 아랫줄 비인기 5개 */
#criteriaOptions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
#criteriaOptions .opt { min-width: 0; min-height: 40px; padding: 0; font-size: 0.75rem; white-space: nowrap; }
#criteriaOptions .opt[data-tier="top"] { border-color: #C9A227; }
#criteriaOptions .opt[data-tier="low"] { border-style: dashed; }
#criteriaOptions .opt[aria-pressed="true"] { border-style: solid; }
.tier-hint { margin: 6px 0 0; color: var(--muted); line-height: 1.4; }
@media (min-width: 900px) {
  .hero #generator { grid-template-columns: 168px minmax(0, 1fr); }
  .hero .tier-hint { font-size: 0.75rem; }
}

/* 번호를 만들기 전 안내: 흐린 글자로 가운데에 */
.result-empty { margin: auto; padding: 36px 8px; text-align: center; color: var(--muted); opacity: 0.6; font-size: 1.0625rem; line-height: 1.7; }
.result-empty span { display: block; margin-top: 6px; font-size: 0.875rem; }
.games:has(.result-empty) { justify-content: center; }

/* 직접 마킹: 가로로 눕힌 실제 용지를 새 창처럼 띄운다 */
.open-slip { margin-top: 12px; }
.game-row.draft { opacity: 0.55; }
.game-row.draft.live { opacity: 1; background: #FFF7E3; border-radius: 12px; outline: 2px dashed #E3A93B; outline-offset: 2px; }
.ball-empty { display: inline-block; width: 2.25rem; height: 2.25rem; border: 2px dashed var(--line); border-radius: 50%; box-sizing: border-box; }
.game-row .ball-empty { width: 2.25rem; height: 2.25rem; }
.slip-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.62); }
.slip-win { position: absolute; top: 50%; transform: translateY(-50%); background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); }
.slip-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.slip-head strong { font-size: 1.0625rem; color: var(--navy); margin-right: 4px; }
.slip-head .pick-tabs { display: flex; gap: 6px; }
.slip-head .pick-tabs .opt { min-height: 36px; padding: 0 10px; font-size: 0.875rem; }
.slip-head .pick-tools { display: flex; gap: 6px; }
.slip-head .pick-tools .opt { min-height: 36px; min-width: 48px; padding: 0 10px; font-size: 0.875rem; }
.slip-head .pick-tools .btn-sm { min-height: 36px; }
.slip-close { margin-left: auto; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 1.375rem; line-height: 1; cursor: pointer; color: var(--text); }
.slip-win svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
.slip-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.slip-foot .pick-hint { flex: 1 1 240px; color: var(--text); font-weight: 700; margin: 0; }
.slip-foot .btn { min-height: 40px; }
body.slip-open { overflow: hidden; }
body.slip-open .result-card { position: relative; z-index: 1001; }
.slip-mini { display: none; }
.mini-row { display: flex; align-items: center; gap: 8px; }
.mini-row b { width: 1.2rem; color: var(--muted); font-size: 0.875rem; }
.mini-row.on b { color: var(--navy); }
.mini-row .ball { width: 1.75rem; height: 1.75rem; font-size: 0.8125rem; }
.mini-row .balls { gap: 5px; flex-wrap: nowrap; }
.mini-row .ball-empty { width: 1.75rem; height: 1.75rem; }
/* 폰: 한 게임을 크게 보여 주는 전체 화면 창 (용지는 가로로 눕힌 그림의 한 게임 부분) */
@media (max-width: 899px) {
  body.slip-open .result-card { position: static; z-index: auto; }
  .slip-modal { background: #fff; }
  .slip-win { inset: 0; top: 0; transform: none; width: 100%; height: 100%; border-radius: 0; box-shadow: none; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; box-sizing: border-box; }
  .slip-head strong { display: none; }
  .slip-head .pick-tabs { flex: 1 1 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .slip-head .pick-tools { flex: 1 1 auto; }
  .slip-win svg { flex: 1 1 0; min-height: 0; height: auto; width: 100%; border: 0; }
  .slip-win { overflow: hidden; }
  .slip-mini { flex: 0 0 auto; }
  .slip-foot { flex: 0 0 auto; }
  .slip-mini { display: grid; gap: 4px; margin-top: 6px; max-height: 96px; overflow-y: auto; }
  .slip-foot .pick-hint { flex: 1 1 100%; font-size: 0.8125rem; }
  .slip-foot .btn { flex: 1 1 0; }
}
#slipMarks, #slipPen, #slipZone, #slipSparks { pointer-events: none; } /* 마킹 선 위를 눌러도 아래 칸이 눌려서 다시 누르면 지워진다 */

/* 용지 넘기기: 용지 양옆 빈자리에 화살표 (용지를 가리지 않고, 테두리·배경 없이 글자만) */
.slip-sheet { font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.slip-stage { display: flex; align-items: stretch; gap: 4px; }
.slip-stage svg { flex: 1 1 0; min-width: 0; }
.slip-arrow { flex: 0 0 36px; align-self: center; height: 96px; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--navy); font-size: 2.75rem; line-height: 1; cursor: pointer; padding: 0 0 6px; }
.slip-arrow:hover:not(:disabled) { color: #E3A93B; }
.slip-arrow:disabled { opacity: 0.25; cursor: default; }
.slip-arrow:focus-visible { outline: 3px solid var(--gold, #C9A227); outline-offset: 2px; }
@media (max-width: 899px) {
  .slip-stage { flex: 1 1 0; min-height: 0; gap: 0; }
  .slip-arrow { flex-basis: 26px; font-size: 2.25rem; height: 80px; }
}
/* 마술지팡이: 반짝이는 별과 지나간 자리의 반짝이 */
.spark { transform-box: fill-box; transform-origin: center; animation: sparkPop 0.65s ease-out forwards; }
@keyframes sparkPop { 0% { opacity: 1; transform: scale(0.3) rotate(0deg); } 100% { opacity: 0; transform: scale(1.7) rotate(70deg); } }
.wand-tw polygon { transform-box: fill-box; transform-origin: center; animation: wandTw 0.45s ease-in-out infinite alternate; }
.wand-tw.t2 polygon { animation-delay: 0.15s; }
.wand-tw.t3 polygon { animation-delay: 0.3s; }
@keyframes wandTw { from { opacity: 0.35; transform: scale(0.7); } to { opacity: 1; transform: scale(1.25); } }


#resultCard { scroll-margin-top: 12px; }

/* 폰·태블릿: 용지를 화면 가득 (옆 여백 최소화), 위쪽 도구는 두 줄로 줄임 */
@media (max-width: 899px) {
  .slip-win { padding: 4px 2px calc(6px + env(safe-area-inset-bottom)); }
  .slip-head { gap: 4px; margin-bottom: 2px; padding: 0 4px; }
  .slip-sheet { order: 1; flex: 1 1 auto; align-self: center; }
  .slip-close { order: 2; margin-left: 0; width: 32px; height: 32px; font-size: 1.25rem; }
  .slip-head .pick-tabs { order: 3; flex: 1 1 100%; gap: 4px; }
  .slip-head .pick-tabs .opt { min-height: 32px; font-size: 0.8125rem; }
  .slip-head .pick-tools { order: 4; flex: 1 1 100%; gap: 4px; }
  .slip-head .pick-tools .opt, .slip-head .pick-tools .btn-sm { min-height: 32px; padding: 0 8px; font-size: 0.75rem; flex: 1 1 auto; white-space: nowrap; }
  .slip-arrow { flex-basis: 22px; font-size: 2rem; height: 64px; }
  .slip-mini { max-height: 64px; padding: 0 4px; }
  .slip-foot { gap: 6px; margin-top: 4px; padding: 0 4px; }
  .slip-foot .pick-hint { flex: 1 1 100%; font-size: 0.75rem; line-height: 1.3; }
  .slip-foot .btn { min-height: 38px; }
}

@media (max-width: 899px) { #slipZone { display: none; } } /* 폰·태블릿: 마킹 중인 게임의 파란 점선 테두리는 보이지 않게 */

/* 마킹하거나 용지를 넘겨도 용지 크기가 흔들리지 않게, 아래 줄들의 높이를 고정한다 */
.slip-foot .pick-hint { min-height: 2.7em; }
@media (max-width: 899px) { .slip-mini { height: 66px; max-height: none; overflow-y: auto; align-content: start; } .slip-foot .pick-hint { min-height: 2.7em; } }
@media (min-width: 900px) { .slip-fit-btn { display: none; } } /* 넓은 화면은 용지 전체가 항상 보인다 */
@media (max-width: 899px) { .slip-fit-btn { order: 1; min-height: 32px; padding: 0 10px; font-size: 0.75rem; white-space: nowrap; } }
/* 폰: 용지 높이를 최대한 확보해 옆 여백을 줄인다 */
@media (max-width: 899px) {
  .slip-mini { height: 34px; }
  .slip-foot .pick-hint { display: none; }
  .slip-arrow { flex-basis: 18px; font-size: 1.75rem; }
  .slip-stage { gap: 0; }
}
@media (min-width: 900px) { #slipCrop { display: none; } }


/* 웹(PC): 용지 창 위쪽 정렬 고정 - 제목 줄(제목·용지 번호·닫기) 아래에 버튼 줄(게임 탭·도구)을 가지런히.
   용지를 넘기거나 마킹해서 글자가 바뀌어도 위치가 움직이지 않게 폭과 높이를 고정한다. */
@media (min-width: 900px) {
  .slip-head { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "title label close" "tabs tools tools"; align-items: center; column-gap: 14px; row-gap: 8px; margin-bottom: 10px; }
  .slip-head strong { grid-area: title; margin: 0; white-space: nowrap; }
  .slip-sheet { grid-area: label; justify-self: end; min-width: 15em; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .slip-close { grid-area: close; margin: 0; flex: none; }
  .slip-head .pick-tabs { grid-area: tabs; display: grid; grid-template-columns: repeat(5, 68px); gap: 6px; flex: none; }
  .slip-head .pick-tabs .opt { width: 68px; padding: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .slip-head .pick-tools { grid-area: tools; display: flex; flex-wrap: nowrap; gap: 6px; justify-self: start; }
  .slip-head .pick-tools .btn-sm { white-space: nowrap; min-width: 120px; }
}

/* 웹: 제목·버튼 줄과 아래 줄의 좌우 끝선을 용지(마킹 영역) 끝선에 맞춘다 (화살표 자리만큼 안쪽) */
@media (min-width: 900px) {
  .slip-head, .slip-foot { padding-inline: 40px; }
}

/* 이번 회차 1등 예상 총 당첨금: 분홍 카드 */
.jp-sec { padding-top: 8px; padding-bottom: 8px; }
.jp-sec[hidden] { display: none; }
.jp-card { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 0; border: 2px solid #E0407A; border-radius: 24px; overflow: hidden; background: #FFF0F5; color: #7A1038; box-shadow: 0 8px 24px rgba(224, 64, 122, 0.14); }
.jp-round { padding: 24px 28px; background: #E0407A; color: #fff; display: flex; flex-direction: column; justify-content: center; }
.jp-kicker { margin: 0; font-size: 0.9375rem; font-weight: 700; opacity: 0.9; }
.jp-epsd { margin: 2px 0 12px; display: flex; align-items: baseline; gap: 6px; font-size: 1.125rem; font-weight: 700; }
.jp-epsd strong { font-size: 3rem; font-weight: 900; line-height: 1; letter-spacing: -0.02em; }
.jp-left-label { margin: 0; font-size: 0.875rem; opacity: 0.9; }
.jp-left { margin: 2px 0 0; font-size: 1.5rem; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.jp-prize { padding: 24px 28px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.jp-label { margin: 0; font-size: 1rem; font-weight: 700; color: #B0245A; }
.jp-amt { margin: 0; display: flex; align-items: baseline; gap: 6px; font-weight: 900; color: #C2185B; }
.jp-amt strong { font-size: clamp(1.75rem, 5.2vw, 3rem); line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.jp-amt span { font-size: 1.25rem; }
.jp-approx { margin: 0; font-size: 1.125rem; font-weight: 700; }
.jp-note { margin: 6px 0 0; font-size: 0.8125rem; color: #9B4A68; }
@media (max-width: 640px) {
  .jp-card { grid-template-columns: minmax(0, 1fr); border-radius: 20px; }
  .jp-round { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 16px 18px; }
  .jp-kicker { flex: 1 1 100%; }
  .jp-epsd { margin: 0; }
  .jp-epsd strong { font-size: 2.25rem; }
  .jp-left-label { margin-left: auto; }
  .jp-left { flex: 1 1 100%; text-align: right; font-size: 1.25rem; }
  .jp-prize { padding: 16px 18px 18px; }
}

/* 지난 회차 당첨 결과 배너 (남색 + 금색) */
.lr-sec { padding-top: 8px; padding-bottom: 8px; }
.lr-sec[hidden] { display: none; }
.lr-card { display: grid; grid-template-columns: minmax(170px, 200px) minmax(320px, 1fr) minmax(430px, 1.25fr); border: 2px solid #C9A227; border-radius: 24px; overflow: hidden; background: #FFFBEF; color: #17243A; box-shadow: 0 8px 24px rgba(23, 36, 58, 0.12); }
.lr-round { padding: 20px 26px; background: #17243A; color: #fff; display: flex; flex-direction: column; justify-content: center; }
.lr-kicker { margin: 0; font-size: 0.9375rem; font-weight: 700; color: #F2D27A; }
.lr-epsd { margin: 2px 0 4px; display: flex; align-items: baseline; gap: 6px; font-size: 1.125rem; font-weight: 700; }
.lr-epsd strong { font-size: 2.75rem; font-weight: 900; line-height: 1; }
.lr-date { margin: 0; font-size: 0.875rem; opacity: 0.85; }
.lr-body { padding: 18px 26px; display: flex; flex-direction: column; gap: 12px; justify-content: center; min-width: 0; }
.lr-balls .balls { flex-wrap: wrap; gap: 6px; }
.lr-ranks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.lr-rank { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.lr-rk { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #C9A227; color: #fff; font-weight: 800; font-size: 0.875rem; }
.lr-rk2 { background: #8A93A3; }
.lr-cnt { font-size: 0.9375rem; font-weight: 700; }
.lr-per { font-size: 0.8125rem; color: #5A6578; }
.lr-amt { font-size: 1.25rem; font-weight: 900; font-variant-numeric: tabular-nums; color: #8A5A00; flex: 1 1 100%; }
.lr-note { margin: 0; font-size: 0.8125rem; color: #566075; }
.lr-win { padding: 16px 24px 16px 8px; background: #FFFBEF; display: flex; flex-direction: column; min-width: 0; }
.lr-win-title { margin: 0 0 8px; font-size: 0.9375rem; font-weight: 800; color: #17243A; }
.lr-win-title small { font-weight: 600; font-size: 0.75rem; color: #6B7488; }
.lr-win-view { --lr-row: 44px; position: relative; height: calc(var(--lr-row) * 3); touch-action: pan-y; overscroll-behavior: contain; cursor: ns-resize; }
.lr-win-view[hidden] { display: none; }
.lr-win-scroll { height: 100%; overflow: hidden; background: transparent;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%); }
.lr-win-list { list-style: none; margin: 0; padding: var(--lr-row) 0; transition: transform 0.55s cubic-bezier(0.3, 0.7, 0.2, 1); }
.lr-win-list.jump { transition: none; }
.lr-win-list li { height: var(--lr-row); display: grid; grid-template-columns: 2.7rem minmax(0, 1fr) 11.5rem 7.5rem; align-items: center; gap: 10px; padding: 0 6px; font-size: 0.9375rem; font-weight: 700; color: #7A6A2F; }
.lr-win-list li.sel { touch-action: none; color: #17243A; font-weight: 900; font-size: 1.0625rem; }
.lr-win-list .lr-rk { white-space: nowrap; text-align: center; padding: 1px 6px; font-size: 0.8125rem; background: #D9CFA8; }
.lr-win-list li.sel .lr-rk { background: #C9A227; }
.lr-win-list li.sel .lr-rk2 { background: #8A93A3; }
.lr-win-balls { justify-self: start; } /* 번호는 항상 같은 왼쪽 선에서 시작 */
.lr-win-balls .balls { flex-wrap: nowrap; justify-content: flex-start; gap: 4px; }
.lr-win-balls .ball { width: 1.5rem; height: 1.5rem; font-size: 0.75rem; }
.lr-win-amt { text-align: right; }
.lr-win-balls .plus { font-size: 0.875rem; }
.lr-win-nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lr-win-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lr-win-list li.sel .lr-win-amt { color: #8A5A00; }
.lr-win-empty { margin: 0; font-size: 0.8125rem; line-height: 1.5; color: #6B7488; }
.lr-win-empty[hidden] { display: none; }
@media (max-width: 1180px) and (min-width: 641px) {
  .lr-card { grid-template-columns: minmax(180px, 220px) minmax(0, 1fr); }
  .lr-win { grid-column: 1 / -1; border-top: 2px solid #E9DDB0; padding: 14px 24px 16px; }
}
@media (max-width: 640px) {
  .lr-card { grid-template-columns: minmax(0, 1fr); border-radius: 20px; }
  .lr-win { border-top: 2px solid #E9DDB0; padding: 14px 14px 16px; }
  .lr-win-view { --lr-row: 62px; }
  .lr-win-list li { grid-template-columns: 2.6rem minmax(0, 1fr) auto; grid-template-areas: "rk nick amt" ". balls balls"; gap: 4px 8px; align-content: center; padding: 0 4px; font-size: 0.875rem; }
  .lr-win-list .lr-rk { grid-area: rk; }
  .lr-win-nick { grid-area: nick; }
  .lr-win-amt { grid-area: amt; }
  .lr-win-balls { grid-area: balls; }
  .lr-win-list li.sel { font-size: 0.9375rem; }
  .lr-win-balls .balls { gap: 2px; }
  .lr-win-balls .ball { width: 1.4rem; height: 1.4rem; font-size: 0.6875rem; }
  .lr-win-balls .plus { font-size: 0.75rem; }
  .lr-round { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 14px 18px; }
  .lr-kicker { flex: 1 1 100%; }
  .lr-epsd { margin: 0; }
  .lr-epsd strong { font-size: 2rem; }
  .lr-date { margin-left: auto; }
  .lr-body { padding: 14px 18px 16px; }
  .lr-ranks { grid-template-columns: minmax(0, 1fr); }
  .lr-amt { flex: 0 1 auto; }
}

/* 1등 예상 총 당첨금: 폭 900px 이상이면 헤더 빈 자리의 분홍 띠, 폰·좁은 화면은 바로가기 위의 분홍 카드 */
.jp-mini { display: none; }
.jp-mini[hidden] { display: none !important; }
@media (min-width: 900px) {
  #jackpotSec { display: none; }
  .jp-mini { display: flex; flex: 1 1 520px; align-items: center; gap: 6px 18px; flex-wrap: wrap; min-height: 56px; padding: 8px 14px; border: 2px solid #E0407A; border-radius: 16px; background: #FFF0F5; color: #7A1038; }
  .jp-mini small { font-size: 0.75rem; font-weight: 700; color: #B0245A; }
  .jp-mini b { font-variant-numeric: tabular-nums; font-weight: 900; }
  .jp-mini-round { padding: 4px 12px; border-radius: 999px; background: #E0407A; color: #fff; font-weight: 700; }
  .jp-mini-round strong { font-size: 1.25rem; font-weight: 900; }
  .jp-mini-left b { font-size: 1.0625rem; }
  .jp-mini-amt { flex: 1 1 auto; text-align: right; }
  .jp-mini-amt b { font-size: 1.375rem; color: #C2185B; }
  .jp-mini-amt i { font-style: normal; font-weight: 700; margin-left: 2px; }
  .jp-mini-buy { padding: 6px 14px; border: 2px solid #C2185B; border-radius: 10px; background: #fff; color: #C2185B; font-weight: 700; text-decoration: none; white-space: nowrap; }
  .jp-mini-buy:hover { background: #C2185B; color: #fff; }
  .jp-mini-buy:focus-visible { outline: 3px solid var(--gold, #C9A227); outline-offset: 2px; }
}
.jp-card[data-buy] { cursor: pointer; }
.jp-card[data-buy]:focus-visible { outline: 3px solid var(--gold, #C9A227); outline-offset: 3px; }
.jp-tap { margin: 10px 0 0; font-size: 0.875rem; font-weight: 700; color: #C2185B; }
.result-card.picking #cardGamesBtn { display: none; }


/* 폰·좁은 화면: 게임 수와 상관없이 추천 번호 목록 높이를 고정해 아래 버튼이 움직이지 않게 한다 */
@media (max-width: 899px) {
  .hero .result-card .games { height: min(420px, 58vh); overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line, #D9DEE8); border-bottom: 1px solid var(--line, #D9DEE8); padding: 8px 6px 8px 0; }
}

/* 안내 문구가 나타나도 위의 목록과 버튼이 움직이지 않게, 문구 자리를 항상 비워 둔다 */
#generatorNote { min-height: 2.7em; line-height: 1.35; margin: 6px 0 0; }
#generatorNote[hidden] { display: block !important; visibility: hidden; }

/* 컴퓨터 화면: 추천 번호 9게임이 스크롤 없이 보이도록 버튼과 줄 간격을 조금 줄인다 */
@media (min-width: 900px) {
  .hero .result-card .btn-block { min-height: 0; height: 40px; margin-top: 8px; padding-top: 0; padding-bottom: 0; }
  .hero .result-card .games { gap: 7px; padding: 6px 6px 6px 0; }
  .hero .result-card .result-label { margin: 8px 0 6px; }
  #generatorNote { min-height: 2.5em; margin-top: 4px; }
}

/* 수동입력 / 자동생성: 번호 생성 버튼을 둘로 나눈다 */
.gen-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.hero .generator .gen-actions .btn-block, .gen-actions .btn-block, .gen-actions .open-slip { margin-top: 0; }


/* 컴퓨터 화면: 두 버튼을 왼쪽 게임 입력창과 같은 높이로 맞추고 아래 끝선에 붙인다 */
@media (min-width: 900px) {
  .hero .set-criteria .gen-actions { margin-top: auto; padding-top: 16px; }
  .hero .set-criteria .gen-actions .btn-block, .hero .set-criteria .gen-actions .bp-open { height: 57px; min-height: 0; margin-top: 0; }   /* AI 추천 받기·직접 선택·수동입력·자동생성 네 버튼이 모두 같은 크기 */
}

/* 넓은 컴퓨터 화면: 분석 기법 버튼을 남는 자리만큼 키운다 */
@media (min-width: 1280px) {
  .hero #criteriaOptions { gap: 5px; }
  .hero #criteriaOptions .opt { min-height: 46px; font-size: 0.8125rem; letter-spacing: -0.03em; }
}

/* 중간 폭 컴퓨터 화면(900~1179px): 왼쪽 칸이 좁아 분석 기법 글자가 잘리므로
   게임 수를 위에, 분석 기법을 아래에 놓아 넓게 쓴다 */
@media (min-width: 900px) and (max-width: 1179px) {
  .hero #generator { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .hero .set-games .count-picker { flex: 0 0 auto; }
  .hero .set-games .wheel-frame { flex: 0 0 auto; height: 132px; }
  .hero .result-card { height: auto; min-height: 740px; } /* 왼쪽 카드와 아래 끝선을 맞춘다 */
}

/* 등수 트로피: 알약 대신 등수별 트로피 그림을 쓴다 (img/rank-N-128.png, -256.png) */
.lr-rk.lr-trophy, .lr-win-list .lr-rk.lr-trophy, .lr-win-list li.sel .lr-rk.lr-trophy { padding: 0; background: transparent; border-radius: 0; display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.lr-trophy img { display: block; width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(60, 40, 0, 0.22)); }
.lr-rkicon { display: inline-flex; align-items: center; gap: 4px; }
.lr-rkicon img { display: block; width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(60, 40, 0, 0.22)); }
.lr-rkicon b { font-size: 0.875rem; font-weight: 800; color: #17243A; }
.lr-rank { align-items: center; }
.lr-win-list { --lr-trophy: 38px; }
.lr-win-list .lr-trophy img { width: var(--lr-trophy); height: var(--lr-trophy); }
.lr-win-list li:not(.sel) .lr-trophy img { opacity: 0.7; filter: grayscale(0.2); }
.lr-win-list li { grid-template-columns: 2.9rem minmax(0, 1fr) 11.5rem 7.5rem; }
@media (max-width: 640px) {
  /* 모바일: 트로피가 두 줄 높이로 왼쪽에 서고, 그 줄 안에 [닉네임 · 당첨금] 아래 [번호]가 들어간다 */
  .lr-win-view { --lr-row: 72px; }
  .lr-win-list { --lr-trophy: 56px; }
  .lr-win-list li { grid-template-columns: 3.6rem minmax(0, 1fr) auto; grid-template-areas: "rk nick amt" "rk balls balls"; gap: 2px 8px; align-items: center; }
  .lr-win-list .lr-rk { grid-area: rk; align-self: center; justify-self: center; }
  .lr-win-list .lr-win-nick { align-self: end; }
  .lr-win-list .lr-win-amt { align-self: end; font-size: 1.125rem; font-weight: 900; }
  .lr-win-list li.sel .lr-win-amt { font-size: 1.3125rem; }
  .lr-win-list .lr-win-balls { align-self: start; }
  /* 번호는 칸을 맞춰 놓는다: n번째 공은 어느 줄에서든 같은 자리에 선다 (6번째 칸 = 2등 보너스 앞의 + 또는 1등 여섯째 번호, 7번째 칸 = 보너스) */
  .lr-win-list .lr-win-balls .balls { display: grid; grid-template-columns: repeat(7, 1.75rem); gap: 0; justify-content: start; justify-items: center; align-items: center; }
  .lr-win-list .lr-win-balls .ball { width: 1.5rem; height: 1.5rem; font-size: 0.75rem; }
  /* 1등은 금액이 길다: 글자를 조금 줄여 닉네임·번호와 가지런히 들어가게 한다 */
  .lr-win-list li.rk1 .lr-win-amt { font-size: 1rem; }
  .lr-win-list li.rk1.sel .lr-win-amt { font-size: 1.125rem; }
  .lr-trophy img { width: 32px; height: 32px; }
}

.lr-body > .lr-note { margin: 0 0 -2px; }

/* 지난 회차 당첨번호: 공 6개 + 보너스까지 어떤 폭에서도 한 줄로. 폭이 좁으면 공이 함께 작아진다 */
.lr-balls .balls { flex-wrap: nowrap; justify-content: flex-start; gap: clamp(3px, 1.2vw, 8px); }
.lr-balls .ball { flex: 0 1 2.75rem; width: auto; height: auto; min-width: 0; aspect-ratio: 1; font-size: clamp(0.75rem, 4.2vw, 1.125rem); }
.lr-balls .plus { flex: none; font-size: clamp(1rem, 4.5vw, 1.5rem); line-height: 1; }

/* 큰 글씨 보기: 글자가 커져도 버튼·칸 밖으로 넘치거나 낱말 중간에서 끊기지 않게 정리한다 */
html.big-text #criteriaOptions .opt { white-space: normal; line-height: 1.15; min-height: 48px; padding: 4px 2px; overflow-wrap: anywhere; }
html.big-text .dist-labels span { overflow-wrap: anywhere; line-height: 1.2; }
@media (max-width: 700px) {
  html.big-text #criteriaOptions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } /* 5열이면 낱말이 두 줄로 끊긴다 */
  html.big-text #criteriaOptions .opt { font-size: 0.8125rem; letter-spacing: -0.02em; }
  html.big-text .gen-actions { grid-template-columns: minmax(0, 1fr); } /* 수동입력·자동생성은 한 줄씩 넓게 */
  html.big-text .gen-actions .btn { white-space: nowrap; }
}

/* 큰 글씨 보기: 추천 번호 줄(게임 번호·공·✕)이 서로 가리지 않게 칸에 맞춰 줄인다 */
@media (max-width: 700px) {
  html.big-text .game-row { grid-template-columns: 2.1rem minmax(0, 1fr) 2rem; column-gap: 6px; }
  html.big-text .game-no { font-size: 0.75rem; text-align: center; letter-spacing: -0.03em; }
  html.big-text .game-row .balls { gap: 4px; }
  html.big-text .game-row .ball, html.big-text .game-row .ball-empty { flex: 1 1 0; min-width: 0; width: auto; height: auto; aspect-ratio: 1; font-size: 0.8125rem; }
  html.big-text .game-row .game-x { width: 2rem; height: 2rem; min-width: 0; flex: none; }
}

/* 폰: 추천 번호 목록 끝에서 화면 스크롤로 이어지게 하고, 길게 끌면(.released) 잠시 목록을 건너뛴다 */
@media (max-width: 700px) {
  .games, .games.scrolls, .hero .result-card .games { overscroll-behavior-y: auto; }
  .games.released { pointer-events: none; }
}

/* 용지 마킹 화면: 좌우 밀기를 받도록 세로 스크롤·확대만 브라우저에 맡긴다 */
.slip-stage { touch-action: pan-y pinch-zoom; }

/* 번호 생성 중 진행 표시 */
.gen-progress { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 220px; padding: 20px 8px; text-align: center; }
.gen-progress .gp-title { margin: 0; font-size: 1.25rem; font-weight: 800; color: var(--navy, #14284B); }
.gen-progress .gp-dots::after { content: ''; display: inline-block; width: 1.4em; text-align: left; animation: gpDots 1.2s steps(4, end) infinite; }
@keyframes gpDots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } 100% { content: '....'; } }
.gen-progress .gp-guide { margin: 0; font-size: 0.9375rem; color: var(--muted, #5B6475); line-height: 1.5; max-width: 22em; }
.gen-progress .gp-bar { width: min(100%, 320px); height: 14px; border-radius: 999px; background: #E8ECF3; overflow: hidden; }
.gen-progress .gp-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #E3B341, #C9A227); }
.gen-progress .gp-pct { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--navy, #14284B); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .gen-progress .gp-dots::after { animation: none; content: '…'; } }

/* 용지 넘길 때 지나가는 그라데이션 빛 */
.slip-stage { position: relative; overflow: hidden; }
.slip-wipe { position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,248,230,.75) 30%, rgba(255,255,255,.95) 50%, rgba(255,248,230,.75) 70%, rgba(255,255,255,0) 100%); }
.slip-mini .mini-row b { white-space: nowrap; min-width: 2.6em; } /* 'A-12' 같은 장 표시가 두 줄로 꺾이지 않게 */

/* 폰: 용지 가로 휠 – 앞·뒤 장 미리보기 (게임 수 휠처럼 작고 흐리게) */
.slip-ghost { position: absolute; z-index: 1; opacity: 0.35; cursor: pointer; }
.slip-ghost svg { display: block; width: 100%; height: 100%; pointer-events: none; }
.slip-ghost.left { transform-origin: right center; }
.slip-ghost.right { transform-origin: left center; }
.slip-stage #slipSvg { position: relative; z-index: 2; }
.slip-stage .slip-arrow { position: relative; z-index: 3; }

/* 용지 아래: 닫기 버튼은 없애고 '고른 게임 담기' 버튼만 폭 가득 고정한다.
   마킹 중인 번호는 버튼 바로 위 고정 칸에 보여 준다(비어 있어도 칸을 비워 둬 용지 크기가 흔들리지 않는다) */
.slip-foot .slip-mini { flex: 1 1 100%; min-width: 0; margin: 0; }
@media (max-width: 899px) {
  .slip-foot { flex-wrap: wrap; row-gap: 4px; margin-top: 6px; }
  .slip-foot .slip-mini, .slip-foot .slip-mini:empty { display: flex; height: 28px; max-height: none; overflow: hidden; padding: 0 2px; align-items: center; justify-content: center; }
  .slip-foot .mini-row { gap: 6px; }
  .slip-foot .mini-row .ball, .slip-foot .mini-row .ball-empty { width: 1.45rem; height: 1.45rem; font-size: 0.6875rem; flex: none; }
  .slip-foot .mini-row .balls { gap: 3px; }
  .slip-foot .mini-row b { min-width: 2.2em; width: auto; font-size: 0.8125rem; }
  .slip-foot #pickAdd { flex: 1 1 100%; min-height: 44px; padding: 0 14px; }
}

/* QR·번호 당첨 확인 결과: 당첨번호(보너스 포함)와 게임 번호를 화면 폭에 맞춰 크기를 줄여 항상 한 줄로 */
#checkResult .balls { flex-wrap: nowrap; gap: clamp(3px, 1.2vw, 8px); justify-content: flex-start; min-width: 0; max-width: 100%; }
#checkResult .ball { flex: 0 1 2.75rem; width: auto; height: auto; min-width: 0; aspect-ratio: 1; font-size: clamp(0.75rem, 4vw, 1.125rem); }
#checkResult .plus { flex: none; font-size: clamp(1rem, 4.5vw, 1.5rem); line-height: 1; }
#checkResult .game-item > * { min-width: 0; }
#checkResult .game-item > :first-child { flex: 1 1 auto; }
#checkResult .game-item .balls { width: 100%; }

/* QR 용지가 10장을 넘으면 10장씩 한 쪽으로 묶어 좌우로 넘긴다 */
.qr-pager { display: flex; align-items: flex-start; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; gap: 0; transition: height 0.2s ease; }
.qr-pager::-webkit-scrollbar { display: none; }
.qr-page { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; padding-right: 2px; }
.qr-pager-nav { scroll-margin-top: 84px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; padding: 8px 12px; background: #F4F6FA; border-radius: 12px; }
.qr-pager-hint { font-size: 0.8125rem; color: var(--muted); }
.qr-pager-dots { display: flex; gap: 6px; }
.qr-pager-dots i { width: 8px; height: 8px; border-radius: 50%; background: #C7CEDB; }
.qr-pager-dots i.on { width: 20px; border-radius: 4px; background: var(--navy); }
.qr-pager-count { font-size: 0.875rem; color: var(--navy); }

/* 카메라 아래 읽기 상태: 읽을 때마다 깜빡여 계속 읽는 중인 것을 보여 준다 */
.cam-status { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: #F4F6FA; color: var(--navy); font-weight: 700; font-size: 0.9375rem; line-height: 1.4; }
.cam-status.flash { animation: camFlash 0.9s ease-out; }
@keyframes camFlash { 0% { background: #FFE9A8; } 100% { background: #F4F6FA; } }

/* 상단 줄: 안내 문구는 맨 아래(푸터)로 옮기고 '큰 글씨 보기'만 오른쪽에 작게 둔다 */
.topbar .container { justify-content: flex-end; padding-top: 6px; padding-bottom: 6px; }
@media (max-width: 720px) {
  .topbar { font-size: 0.75rem; }
  .topbar .container { padding-top: 3px; padding-bottom: 3px; line-height: 1.3; }
  .topbar .text-toggle { padding: 3px 0; }
}
html.big-text .topbar { font-size: 0.75rem; }

/* 분석 → 기법 실험실 안내 줄 */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.cta-row > div { flex: 1 1 240px; min-width: 0; }
.cta-row .btn { flex: 0 0 auto; }
@media (max-width: 720px) { .cta-row .btn { flex: 1 1 100%; } }

/* 기법 실험실: 패턴·기법 섞기 */
.mix-now { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: #F4F6FA; color: var(--navy); font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.mix-title { margin-top: 18px; font-size: 1rem; color: var(--navy); }
.mix-title + .chip-row { margin-top: 8px; }
#mixCard .opt { min-height: 44px; padding: 0 14px; font-size: 0.9375rem; }
#mixCard .opt.lock { border-style: dashed; color: var(--muted); }
#mixCard .opt.armed { border-color: #C0392B; color: #C0392B; }
#mixCard .form-error { margin-top: 10px; }
#mixCard { scroll-margin-top: 12px; }

/* 분석 기법 민감도(세기): 칩 안의 점 3개와 단계별 색, 칩 아래 설명 */
#criteriaOptions .opt { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lv-dots { display: flex; gap: 3px; justify-content: center; margin-top: 3px; }
.lv-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
.lv-dots i.on { background: var(--gold, #E2A93B); }
#criteriaOptions .opt[data-level="1"] { background: #4A6296; }
#criteriaOptions .opt[data-level="2"] { background: #2C4680; }
#criteriaOptions .opt[data-level="1"]:not([data-tier="top"]) { border-color: #4A6296; }
#criteriaOptions .opt[data-level="2"]:not([data-tier="top"]) { border-color: #2C4680; }
.sense-now { margin: 10px 0 0; padding: 8px 12px; border-radius: 12px; background: #FFF7E3; border: 1px solid #F0DCA8; color: var(--text, #1F2A44); font-size: 0.875rem; line-height: 1.45; min-height: 3.6em; }
.sense-now b { display: block; color: var(--navy); }

/* 내 기록 머리말의 설정 버튼, 설정 화면 */
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.head-btn { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; white-space: nowrap; }
.set-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.set-links { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 14px; }
.set-links a { font-weight: 700; color: var(--navy); }

/* 포인트 충전, 포인트·판매 정산, 운영자 매매장부 */
.charge-box { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: #FFF7E3; border: 1px solid #F0DCA8; }
.charge-lead { margin: 0 0 10px; font-weight: 700; color: var(--navy); line-height: 1.5; }
.charge-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.charge-btns .opt { min-height: 44px; padding: 0 14px; font-size: 0.9375rem; background: #fff; }
.charge-btns .opt[aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
#pointAfter.short { color: #B3261E; }
.table td.num { text-align: right; }
.pt-plus { color: #0F5B2E; font-weight: 700; }
.pt-minus { color: #B3261E; font-weight: 700; }
.pt-scroll { max-height: 420px; overflow-y: auto; }
.ledger-refund td { color: var(--muted); }
.status-chip.gold { background: #FFF1CC; color: #6B4A00; }
#ledgerTabs .opt { min-height: 44px; padding: 0 14px; font-size: 0.9375rem; }

/* 큰 글씨 + 폰: '사진 올리기 (최대 100장)' 버튼이 두 줄로 끊기지 않게 */
@media (max-width: 480px) {
  html.big-text #photoLabel { white-space: nowrap; font-size: 1rem; padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 345px) {
  html.big-text #photoLabel { font-size: 0.875rem; padding-left: 8px; padding-right: 8px; }
}

/* 넓은 컴퓨터 화면(1180px 이상): 소개 글과 버튼을 왼쪽 옆 칸으로 옮기고,
   번호 생성 카드와 추천 번호 카드를 같은 크기로 나란히 놓는다 (위·아래 끝선과 폭이 같다) */
@media (min-width: 1180px) {
  .hero .container { grid-template-columns: 260px minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "copy set result"; gap: 24px; align-items: stretch; }
  .hero-copy { align-self: start; padding-top: 8px; }
  .hero h1 { font-size: 1.75rem; }
  .hero-lead { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  /* 번호 생성 카드는 폭이 좁아지므로 게임 수를 위에, 분석 기법을 아래에 놓는다 (중간 폭 화면과 같은 배치) */
  .hero #generator { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .hero .set-games .count-picker { flex: 0 0 auto; }
  .hero .set-games .wheel-frame { flex: 0 0 auto; height: 132px; }
  /* 추천 번호 카드는 번호 생성 카드 높이에 맞춰 늘어나고, 번호 목록만 안에서 스크롤한다 */
  .hero .result-card { height: auto; min-height: 600px; }
  .hero .result-card .games { flex: 1 1 0; }
  /* 페이지를 열었을 때(스크롤 전) AI 추천 받기 · 직접 선택 · 수동입력 · 자동생성 네 버튼이 모두 보이도록 번호 생성 카드를 낮춘다:
     게임 수 휠을 줄이고, 슬롯효과 스위치는 '분석 기법' 제목과 같은 줄 오른쪽으로 올린다. 카드가 낮아진 만큼 추천 번호 카드도 같이 낮아진다 */
  .hero .set-games .wheel-frame { height: 104px; min-height: 104px; }
  .hero .set-criteria .all-check.slotfx-pc { margin: 0 0 -36px auto; position: relative; z-index: 1; }
  .hero .set-criteria .gen-actions { padding-top: 12px; }
}

/* 홈: 자주 나온 번호 / 오래 나오지 않은 번호 (큰 공 5개와 횟수) */
.draw-stat { list-style: none; margin: 22px 0 0; padding: 0; display: flex; justify-content: space-between; gap: 8px; }
.draw-stat li { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.draw-stat .ball { width: clamp(42px, 11vw, 56px); height: clamp(42px, 11vw, 56px); font-size: clamp(1rem, 3.4vw, 1.25rem); }
.draw-stat small { font-size: 0.9375rem; font-weight: 800; color: var(--navy); }

/* 홈 커뮤니티 칸: 탭 4개(최신글·인기글·주간 베스트·월간 베스트) + 글 5개 */
.community .notices { flex: 1 1 100%; }
.hc { padding-top: 40px; padding-bottom: 40px; background: var(--white); }
.hc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hc-head .link-more { margin: 0; }
.hc-sub { margin: 6px 0 0; color: var(--muted); }
.hc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hc-tabs .opt { min-height: 44px; padding: 0 16px; }
.hc-tabs .opt[aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.hc-list { margin-top: 14px; border-top: 2px solid var(--navy); }
.hc-item { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--text); }
.hc-item:hover { background: var(--bg); }
.hc-rank { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 0.9375rem; font-weight: 800; }
.hc-main { min-width: 0; }
.hc-main strong { font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.hc-tag { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 999px; background: var(--chip); font-size: 0.8125rem; font-weight: 700; color: var(--text); }
.hc-cmt { font-style: normal; font-weight: 800; color: #B3261E; }
.hc-meta { font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.hc-note { margin: 10px 0 0; }
.hc-actions { margin-top: 16px; }
@media (max-width: 640px) {
  .hc-item { grid-template-columns: 2rem minmax(0, 1fr); }
  .hc-meta { grid-column: 2; white-space: normal; }
  .hc-tabs .opt { flex: 1 1 calc(50% - 8px); padding: 0 8px; }
}

/* 홈 커뮤니티: PC는 네 칸 게시판(조회·제목·닉네임·등록), 휴대폰은 탭 */
.hcb { display: none; }
@media (min-width: 641px) {
  .hcb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
  .hc-tabs, .hc-list, .hc-note { display: none; }
}
@media (min-width: 1100px) { .hcb { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hcb-col { background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.hcb-col h3 { margin: 0; padding: 14px 16px; background: var(--navy); color: #fff; font-size: 1.0625rem; font-weight: 900; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hcb-col h3 small { font-size: 0.75rem; font-weight: 600; opacity: 0.85; }
.hcb-col h3.hot { background: #B3261E; } .hcb-col h3.week { background: #1F4E9C; } .hcb-col h3.month { background: #7A4A00; }
.hcb-head, .hcb-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; align-items: center; padding: 0 12px; }
.hcb-head { min-height: 32px; background: #F3F5FA; font-size: 0.75rem; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); }
.hcb-head span:first-child, .hcb-row .v { text-align: center; }
.hcb-row { min-height: 52px; border-bottom: 1px solid #EEF0F5; color: var(--text); }
.hcb-row:last-child { border-bottom: 0; }
.hcb-row:hover { background: var(--bg); }
.hcb-row .v { font-size: 0.8125rem; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.hcb-row .t { min-width: 0; padding: 7px 0; }
.hcb-row .t strong { display: block; font-size: 0.9375rem; font-weight: 700; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hcb-row .t em { font-style: normal; font-weight: 800; color: #B3261E; margin-left: 4px; }
.hcb-row .t small { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hcb-row .t small .newd { color: #B3261E; font-weight: 800; }
.hcb-rk { display: inline-block; min-width: 1.25em; margin-right: 6px; color: #B3261E; font-weight: 900; }
.hcb-empty { margin: 0; padding: 28px 16px; text-align: center; color: var(--muted); }

/* 번호 생성 제목 줄: 컴퓨터 화면에서는 제목 오른쪽에 등급별 기법 수(내 등급은 진하게), 그 아래 한 줄에 테두리 뜻을 강조해서 보여 준다 */
.gen-note { display: none; }
@media (min-width: 900px) {
  .hero #generator .gen-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
  .hero #generator .gen-head h2 { margin: 0; }
  .gen-note { display: contents; }
  .gn-right { flex: 0 0 100%; margin-left: 0; text-align: left; }
  .gn-cap { display: block; margin-bottom: 3px; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
  .gn-limit { margin: 0; display: flex; justify-content: flex-start; gap: 4px; font-size: 0.8125rem; line-height: 1.4; }
  .gn-pill { padding: 2px 9px; border-radius: 999px; background: var(--chip); color: var(--muted); font-weight: 500; white-space: nowrap; }
  .gn-pill b { font-weight: 900; color: var(--navy); }
  .gn-pill.on { background: var(--navy); color: #fff; font-weight: 700; }
  .gn-pill.on b { color: var(--gold); }
  .gn-legend { flex: 0 0 100%; margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 4px; font-size: 0.75rem; line-height: 1.4; color: var(--text); white-space: nowrap; }
  .gn-key { padding: 1px 6px; border-radius: 8px; background: var(--white); font-weight: 700; color: var(--navy); white-space: nowrap; }
  .gn-top { border: 2px solid #C9A227; }
  .gn-low { border: 2px dashed #8A94A8; margin-left: 6px; }
  .hero .set-criteria .tier-hint { display: none; }   /* 컴퓨터는 제목 옆 안내를 쓴다 */
}

/* ---- 켜기/끄기 알약 스위치: 무엇을 켜고 끄는 기능은 모두 이 모양으로 켜짐·꺼짐을 보여 준다 ----
   버튼:  <button class="sw-btn" role="switch" aria-checked="true|false"><span class="sw"></span></button>
   체크칸: <label class="switch-row"><input type="checkbox" class="sw-input" role="switch"><span class="sw"></span> 글</label> */
.sw { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; min-width: 78px; height: 32px; padding: 0 12px 0 36px; border-radius: 999px; background: #D5DBE6; color: #4F5B70; font-size: 0.8125rem; font-weight: 900; line-height: 1; transition: background 0.2s, padding 0.2s; }
.sw::before { content: '꺼짐'; }
.sw::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20, 40, 75, 0.35); transition: left 0.2s; }
.sw-btn[aria-checked="true"] .sw, .sw-input:checked + .sw { background: var(--navy); color: #fff; padding: 0 36px 0 14px; }
.sw-btn[aria-checked="true"] .sw::before, .sw-input:checked + .sw::before { content: '켜짐'; }
.sw-btn[aria-checked="true"] .sw::after, .sw-input:checked + .sw::after { left: calc(100% - 28px); }
.sw-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.sw-btn:focus-visible { outline: none; }
.sw-btn:focus-visible .sw, .sw-input:focus-visible + .sw { outline: 3px solid #2F6FD6; outline-offset: 2px; }
.sw-input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.switch-row { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; }
/* 머리말의 작은 스위치(큰 글씨) */
.sw-mini .sw { min-width: 58px; height: 22px; padding: 0 8px 0 26px; font-size: 0.6875rem; }
.sw-mini .sw::after { top: 3px; left: 3px; width: 16px; height: 16px; }
.sw-mini[aria-checked="true"] .sw { padding: 0 26px 0 9px; }
.sw-mini[aria-checked="true"] .sw::after { left: calc(100% - 19px); }
.topbar .sw-btn[aria-checked="true"] .sw { background: var(--gold); color: var(--navy); }
.topbar .sw-text { color: var(--on-navy); }
@media (prefers-reduced-motion: reduce) { .sw, .sw::after { transition: none; } }

