/*
 * style.css
 * 토스(Toss) 스타일 디자인 시스템을 참고한 공용 스타일
 * - 흰 배경, 넓은 여백, 둥근 카드, 그림자 최소화, 큰 둥근 버튼, 깔끔한 타이포그래피
 *
 * 유지보수 메모: 새 "프로그램(기능)"을 추가할 때는 이 파일을 건드리지 말고
 * css/apps/ 폴더에 전용 스타일 파일을 추가해서 개별 페이지에서 로드하세요.
 * 공용 컴포넌트 클래스(.card, .btn, .section 등)를 최대한 재사용하는 것을 권장합니다.
 */

:root {
  color-scheme: light;
  --color-bg: #f2f4f6;
  --color-surface: #ffffff;
  --color-primary: #3182f6;
  --color-primary-dark: #1b64da;
  --color-primary-soft: #eef4ff;
  --color-text: #191f28;
  --color-text-sub: #4e5968;
  --color-text-muted: #8b95a1;
  --color-border: #eef0f2;
  --color-danger: #f04452;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-card: 0 2px 10px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 6px 20px rgba(15, 23, 42, 0.07);

  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "맑은 고딕", sans-serif;

  --max-width: 720px;
}

@font-face {
  font-family: "Pretendard";
  /* gh 경로는 404 (dist가 packages/ 아래로 이동됨) — npm 미러 경로 사용 */
  src: url("https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/variable/woff2/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

button {
  -webkit-tap-highlight-color: transparent;
}

/* 모바일 브라우저(삼성 인터넷 등)에서 12~15px 입력창에 포커스할 때
   자동 확대(줌)되는 것을 막기 위해 폼 요소는 16px 이상을 유지한다. */
input,
select,
textarea {
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin: 0 0 8px;
}

p {
  margin: 0 0 12px;
}

ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

/* ── 레이아웃 뼈대 ───────────────────────────────── */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 64px;
}

.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── 다음 추첨까지 카운트다운 (헤더 우측) ─────────── */
.draw-countdown {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.4;
}

.draw-countdown-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.draw-countdown-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--color-primary-dark);
  font-variant-numeric: tabular-nums;
}

.draw-countdown.is-today .draw-countdown-headline {
  font-size: 13.5px;
  font-weight: 800;
  color: #e8590c;
}

.draw-countdown.is-today .draw-countdown-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.draw-countdown.is-announced .draw-countdown-headline {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-primary-dark);
}

@media (max-width: 560px) {
  .draw-countdown {
    align-items: center;
    background: var(--color-bg);
    border-radius: 999px;
    padding: 7px 14px;
    align-self: center;
  }

  .draw-countdown-value {
    font-size: 13.5px;
  }

  .draw-countdown.is-today .draw-countdown-headline,
  .draw-countdown.is-announced .draw-countdown-headline {
    font-size: 12.5px;
  }
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo .logo-emoji {
  font-size: 22px;
  display: inline-flex;
  align-items: center;
}

.site-logo .logo-emoji svg {
  display: block;
  width: 22px;
  height: 22px;
}

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text-sub);
}

.site-nav a:hover,
.site-nav a.is-current {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

/* ── 상단 메뉴 드롭다운 (당첨결과/도구/번호별 분석/예측 리포트) ─ */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  font-family: inherit;
  border: none;
  background: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text-sub);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.is-current,
.nav-dropdown-trigger[aria-expanded="true"] {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.nav-caret {
  font-size: 10px;
  transition: transform 0.15s ease;
}

.nav-dropdown-trigger[aria-expanded="true"] .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
  padding: 6px;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 50;
}

.nav-dropdown-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text-sub);
  white-space: nowrap;
}

.nav-dropdown-panel a:hover,
.nav-dropdown-panel a.is-current {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

/* ── 모바일 헤더 햄버거 메뉴 ─────────────────────── */
/* 데스크톱에서는 숨기고, 좁은 화면에서만 site-nav 대신 노출한다.
   (site-nav의 텍스트 메뉴 4개가 좁은 화면에서 오터치를 유발하는 문제 개선) */
.mobile-nav-dropdown {
  display: none;
}

.mobile-nav-toggle {
  font-family: inherit;
  border: none;
  background: var(--color-bg);
  color: var(--color-text-sub);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-nav-toggle[aria-expanded="true"] {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.mobile-nav-panel {
  min-width: 200px;
}

@media (max-width: 560px) {
  .site-nav {
    display: none;
  }

  .mobile-nav-dropdown {
    display: block;
  }
}

/* ── 그룹 메뉴(로또/랜덤 도구) 아코디언 ─────────────
   데스크톱 site-nav에서는 일반 .nav-dropdown(플라이아웃)으로 쓰고,
   모바일 ☰ 패널 안에서는 같은 마크업을 .nav-subdropdown으로 감싸
   펼침(inline accordion) 형태로 보여준다. */
.nav-subdropdown-trigger {
  width: 100%;
  font-family: inherit;
  border: none;
  background: none;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.nav-subdropdown-trigger:hover,
.nav-subdropdown-trigger[aria-expanded="true"] {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.nav-subdropdown-trigger[aria-expanded="true"] .nav-caret {
  transform: rotate(180deg);
}

.nav-subpanel {
  position: static;
  box-shadow: none;
  padding: 2px 0 2px 12px;
  margin: 0 0 2px;
  min-width: 0;
  border-left: 2px solid var(--color-border);
}

.nav-subpanel:not(.is-open) {
  display: none;
}

.nav-subpanel.is-open {
  display: flex;
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ── 카드 ────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
  margin-bottom: 16px;
}

.card + .card {
  margin-top: 4px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.card-sub {
  font-size: 14px;
  color: var(--color-text-sub);
  margin-bottom: 20px;
}

/* 히어로 카드 (메인 소개 + CTA) */
.hero-card {
  text-align: left;
  padding: 36px 28px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero-card h1 {
  font-size: 24px;
  line-height: 1.35;
}

.hero-card p {
  font-size: 14.5px;
  color: var(--color-text-sub);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.hero-actions .btn-primary {
  width: auto;
  min-width: 190px;
}

@media (max-width: 560px) {
  .hero-actions .btn-primary {
    width: 100%;
  }
}

.hero-sub-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text-sub);
  text-decoration: none;
}

.hero-sub-link:hover {
  color: var(--color-primary);
}

.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-trust-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-sub);
  background: var(--color-bg);
  padding: 6px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ── 홈 바로가기 그리드 ──────────────────────────── */
.quicklink-card {
  padding-top: 20px;
  padding-bottom: 20px;
}

.quicklink-title {
  font-size: 15px;
  margin-bottom: 2px;
}

.feature-item--link {
  display: block;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.feature-item--link:hover {
  background: var(--color-primary-soft);
  transform: translateY(-1px);
}

.feature-item--link .feature-sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-top: 3px;
}

/* ── 버튼 ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-md);
  padding: 15px 22px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.05s ease, filter 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  width: 100%;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-primary:disabled {
  background: #c6d6f6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.btn-secondary:hover {
  background: #dfeaff;
}

.btn-ghost {
  background: var(--color-bg);
  color: var(--color-text-sub);
}

.btn-ghost:hover {
  background: #e7eaed;
}

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

/* 원형 카운트 선택 버튼 (사다리타기 인원 수, 주사위 개수 등에서 재사용) */
.count-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg);
  color: var(--color-text-sub);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.count-btn:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.count-btn.is-active {
  background: var(--color-primary);
  color: #fff;
}

/* select (정밀도 선택) */
.select-field {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-sub);
  background: var(--color-bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

/* ── 아이콘 특징 리스트 (기능/유용한 대상 등) ───────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0 4px;
}

.feature-item {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 18px 16px;
}

.feature-item .feature-icon {
  font-size: 22px;
  margin-bottom: 8px;
  display: block;
}

.feature-item .feature-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

/* ── 안내/디스클레이머 박스 ──────────────────────── */
.notice-box {
  background: var(--color-primary-soft);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 12.5px;
  color: var(--color-text-sub);
  margin-top: 4px;
}

.notice-box.muted {
  background: var(--color-bg);
}

/* ── 상태 표시줄 / 로딩 바 ───────────────────────── */
.status-line {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 12px 0 0;
  min-height: 18px;
}

.loading-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--color-bg);
  overflow: hidden;
  margin: 4px 0 0;
  display: none;
}

.loading-bar.active {
  display: block;
}

.loading-bar-fill {
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: var(--color-primary);
  animation: loading-move 1s ease-in-out infinite;
}

@keyframes loading-move {
  0% { transform: translateX(-60%); }
  100% { transform: translateX(220%); }
}

/* ── 본문 텍스트 섹션(소개/정책 페이지 등) ───────── */
.prose h2 {
  font-size: 16.5px;
  margin-top: 26px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 14.5px;
  margin-top: 18px;
  margin-bottom: 6px;
}

.prose p,
.prose li {
  font-size: 14px;
  color: var(--color-text-sub);
}

.prose a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.prose .post-byline {
  margin: 0.15rem 0 1.35rem;
  font-size: 13px;
  color: var(--color-text-muted);
}

.prose .post-byline a {
  font-weight: 500;
}

.prose em {
  color: var(--color-text-muted);
  font-style: normal;
  font-size: 13px;
}

/* ── FAQ 목록 (여러 페이지 공용) ───────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item .faq-q {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.faq-item .faq-q::before {
  content: "Q. ";
  color: var(--color-primary);
}

.faq-item .faq-a {
  font-size: 13.5px;
  color: var(--color-text-sub);
}

.faq-item .faq-a::before {
  content: "A. ";
  color: var(--color-text-muted);
}

/* ── 주간 리포트 목록 (reports/index.html) ───────── */
.report-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.report-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.report-list-item:hover {
  background: var(--color-primary-soft);
}

.report-list-arrow {
  color: var(--color-primary);
  font-weight: 700;
}

/* ── 블로그 글 목록 (blog.html) ───────── */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.post-card {
  display: block;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 16px;
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.15s ease;
}

.post-card:hover {
  background: var(--color-primary-soft);
}

.post-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.post-card-excerpt {
  font-size: 13.5px;
  color: var(--color-text-sub);
  margin-bottom: 8px;
}

.post-card-date {
  font-size: 12px;
  color: var(--color-text-muted);
}

.post-back-link {
  display: inline-block;
  font-size: 12.5px;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-bottom: 12px;
}

.post-back-link:hover {
  color: var(--color-primary);
}

/* ── 공용 로또볼 컴포넌트 (여러 기능에서 재사용) ─── */
.lotto-balls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.lotto-ball {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex: 0 0 auto;
}

.lotto-ball.is-lg {
  width: 44px;
  height: 44px;
  font-size: 17px;
}

.lotto-ball.is-xl {
  width: 56px;
  height: 56px;
  font-size: 21px;
}

/* 로또 공식 번호대 색상 */
.ball-y { background: #fbc400; color: #5a4400; }
.ball-b { background: #69c8f2; }
.ball-r { background: #ff7272; }
.ball-g { background: #aaaaaa; }
.ball-gr { background: #b0d840; }

/* ── 회차 내비게이션 / 결과 카드 (results.html) ──── */
.round-nav-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.round-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg);
  color: var(--color-text-sub);
  font-size: 16px;
  cursor: pointer;
  flex: 0 0 auto;
}

.round-nav-btn:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

.round-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.round-select {
  flex: 1 1 auto;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-bg);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  text-align: center;
}

.result-card {
  text-align: center;
}

.result-round-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.result-round-title .accent {
  color: var(--color-primary);
}

.result-date {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.result-balls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.result-plus {
  font-size: 18px;
  color: var(--color-text-muted);
  font-weight: 700;
}

/* 좁은 화면에서는 당첨번호 6개 + 보너스가 한 줄에 다 안 들어가고 줄바꿈되던 문제를
   막기 위해 공(ball) 크기와 간격을 줄여 한 줄에 맞춘다. */
@media (max-width: 560px) {
  .result-balls-row {
    gap: 8px;
    flex-wrap: nowrap;
  }

  .result-balls-row .lotto-balls {
    gap: 4px;
    flex-wrap: nowrap;
  }

  .result-balls-row .lotto-ball.is-lg {
    width: 32px;
    height: 32px;
    font-size: 12.5px;
  }

  .result-plus {
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  .result-balls-row {
    gap: 5px;
  }

  .result-balls-row .lotto-balls {
    gap: 3px;
  }

  .result-balls-row .lotto-ball.is-lg {
    width: 28px;
    height: 28px;
    font-size: 11.5px;
  }
}

.ball-caption {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.result-balls-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── 등수별 당첨금 테이블 ────────────────────────── */
.prize-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.prize-table th,
.prize-table td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.prize-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 12px;
}

.prize-table td.amount {
  color: var(--color-primary-dark);
  font-weight: 700;
}

/* 좁은 화면에서는 표 대신 카드형 리스트로 바꿔 칸이 눌리거나 글자가
   어중간하게 줄바꿈되는 문제를 막는다. */
@media (max-width: 560px) {
  .prize-table thead {
    display: none;
  }

  .prize-table,
  .prize-table tbody,
  .prize-table tr,
  .prize-table td {
    display: block;
    width: 100%;
  }

  .prize-table tr {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 4px 14px;
    margin-bottom: 8px;
  }

  .prize-table tr:last-child {
    margin-bottom: 0;
  }

  .prize-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    text-align: right;
  }

  .prize-table tr td:last-child {
    border-bottom: none;
  }

  .prize-table td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-align: left;
    flex: 0 0 auto;
  }
}

/* ── 당첨번호 조회(체커) ─────────────────────────── */
.checker-inputs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.num-input {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid #c3c9d1;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-surface);
  /* 브라우저 기본 숫자 입력 스피너(위/아래 화살표)를 숨긴다.
     삼성 인터넷 등 일부 브라우저는 이 스피너를 원형 입력창 안에 이상하게 그려서
     레이아웃이 깨진 것처럼 보이게 한다. */
  -moz-appearance: textfield;
  appearance: textfield;
}

.num-input::-webkit-outer-spin-button,
.num-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.num-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* 좁은 화면에서 6칸이 한 줄에 안 들어가고 줄바꿈되던 문제 수정.
   font-size는 16px 미만으로 줄이면 일부 모바일 브라우저에서 포커스 시
   자동 확대(줌)가 발생하므로 16px을 유지하고, 크기/간격만 줄인다. */
@media (max-width: 560px) {
  .checker-inputs {
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: center;
  }

  .num-input {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 360px) {
  .checker-inputs {
    gap: 4px;
  }

  .num-input {
    width: 36px;
    height: 36px;
  }
}

.checker-result {
  margin-top: 16px;
}

.checker-result-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
}

.checker-rank {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.checker-rank.is-win {
  color: var(--color-primary);
}

.checker-detail {
  font-size: 13px;
  color: var(--color-text-sub);
}

/* ── 푸터 ────────────────────────────────────────── */
.site-footer {
  max-width: var(--max-width);
  margin: 8px auto 0;
  padding: 24px 20px 40px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-sub);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-copy {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ── 제외 번호 (통계·행운 추첨 공통) ─────────────── */
.exclude-numbers {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft, #f8f9fb);
}

.exclude-numbers-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.exclude-numbers-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.exclude-count {
  font-size: 13px;
  color: var(--color-text-sub);
}

.exclude-clear {
  margin-left: auto;
  padding: 4px 8px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}

.exclude-clear:hover {
  text-decoration: underline;
}

.exclude-numbers-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-sub);
}

.exclude-input-row {
  margin-bottom: 10px;
}

.exclude-input-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.exclude-input-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.exclude-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-size: 15px;
  color: var(--color-text);
  background: #fff;
}

.exclude-input:focus {
  outline: 2px solid rgba(49, 130, 246, 0.35);
  border-color: var(--color-primary);
}

.exclude-add-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.exclude-msg {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--color-text-sub);
}

.exclude-msg.is-error {
  color: #c0392b;
}

.exclude-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}

.exclude-chips-empty {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.exclude-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid #f5c6cb;
  border-radius: 999px;
  background: #fff5f5;
  color: #c0392b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.exclude-chip:hover {
  background: #ffe8e8;
}

.exclude-chip-x {
  font-size: 14px;
  line-height: 1;
  opacity: 0.75;
}

@media (max-width: 560px) {
  .exclude-input-wrap {
    flex-direction: column;
  }

  .exclude-add-btn {
    width: 100%;
  }
}

/* ── 반응형 ──────────────────────────────────────── */
@media (max-width: 560px) {
  .card {
    padding: 22px 18px;
    border-radius: var(--radius-md);
  }

  .hero-card h1 {
    font-size: 20px;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .site-nav a,
  .nav-dropdown-trigger {
    padding: 7px 8px;
    font-size: 12.5px;
  }

  .nav-dropdown-panel {
    min-width: 140px;
  }
}

@media (max-width: 380px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/*
 * lp-modal — 사이트 공용 확인 팝업(예/아니요).
 * 특정 페이지 전용이 아니라 필요한 곳(js/app-my-numbers.js 등)에서
 * DOM을 직접 만들어 붙이는 형태라 CSS만 공용으로 둔다.
 */
.lp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 25, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}

.lp-modal-box {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
  padding: 22px 20px 18px;
  box-sizing: border-box;
}

.lp-modal-msg {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--color-text);
  word-break: keep-all;
}

.lp-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.lp-modal-actions .btn {
  min-width: 76px;
}
