/* 회차별 당첨 번호 페이지 스타일. src/index.css 와 src/App.css 의 머리말·바닥글 규칙을 옮기고 회차 페이지 규칙을 더했다. 화면 앱 스타일을 바꾸면 함께 맞춘다. */
:root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  color: #25332a;
  background: #f7f8f4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --ink: #25332a;
  --muted: #596553;
  --accent: #3f6949;
  --border: #e4e8df;
  --wash: #eef3e9;
  --card-radius: 18px;
  --control-radius: 12px;
  --card-shadow: 0 4px 18px #25332a06;
  font-size: 16px;
  line-height: 1.5;
  color-scheme: light;
}
* { box-sizing: border-box; }
img, canvas, svg { max-width: 100%; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: #fff; cursor: pointer; }
button:disabled, input:disabled { opacity: .45; cursor: not-allowed; }
button, a, summary, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
input:not([type=checkbox]):not([type=range]):not([type=file]), select, textarea { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 7px; background: #fff; padding: 12px; font-size: 16px; }
input::placeholder, textarea::placeholder { color: #697465; }
textarea { resize: vertical; line-height: 1.7; }
select { cursor: pointer; }
input:not([type=checkbox]):not([type=range]):not([type=file]):focus, select:focus, textarea:focus { border-color: #8ca786; }
input[type=color] { max-width: 48px; padding: 3px !important; }
input[type=file] { max-width: 100%; }
@media (max-width: 760px) { input:not([type=color]), textarea, select { font-size: 16px !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
.site-header { height: 76px; background: #fff; border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1160px; height: 100%; margin: auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 22px; font-weight: 800; letter-spacing: -1px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--accent); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.header-actions { display: flex; align-items: center; gap: 22px; min-width: 0; }
.header-tag { font-size: 13px; color: var(--muted); }
.header-actions .language-button { width: auto; max-width: 180px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px; font-size: 13px; }
.menu { position: relative; }
.menu summary { cursor: pointer; list-style: none; font-size: 22px; padding: 8px; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 0; top: 45px; width: 220px; max-height: calc(100dvh - 90px); overflow-y: auto; padding: 8px; border-radius: 12px; background: #fff; border: 1px solid var(--border); box-shadow: 0 12px 40px #22332d12; z-index: 20; }
.menu nav a { display: block; padding: 12px; color: var(--ink); text-decoration: none; border-radius: 6px; font-size: 13px; }
.menu nav a:hover { background: var(--wash); }

.page-shell { max-width: 1104px; margin: auto; padding: 32px 28px 64px; }
.intro { margin-bottom: 24px; }
.intro h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.4; letter-spacing: -1px; margin: 0 0 8px; }
.intro p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.hint { color: var(--muted); font-size: 14px; line-height: 1.7; }
/* 게임 페이지 머리말: 전체 게임·분류 링크와 같은 분류의 게임 칩. 칩은 분류당 몇 개뿐이라 줄바꿈으로 390px 에서도 가로 스크롤이 없다. */
.game-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-width: 0; margin-bottom: 20px; }
.game-tabs-trail { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); white-space: nowrap; }
.game-tabs-trail a { display: inline-block; padding: 6px 0; color: var(--accent); font-weight: 650; text-decoration: none; }
.game-tabs-trail a:hover { text-decoration: underline; text-underline-offset: 4px; }
.game-links { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.game-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; max-width: 100%; padding: 8px 14px; color: var(--accent); background: #fff; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.game-links a:hover { border-color: var(--accent); }
.game-links a[aria-current=page] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 650; }
.item-presets button { padding: 12px 16px; color: var(--accent); background: white; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; font-size: 14px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.item-input, .game-placeholder { min-width: 0; padding: 24px; background: white; border: 1px solid var(--border); border-radius: 18px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-heading h2, .game-placeholder h2 { font-size: 18px; margin: 0; }
.text-button { padding: 10px; color: var(--accent); background: var(--wash); border-radius: 8px; }
.item-input textarea { display: block; }
.item-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.item-presets button { padding: 10px 12px; }
.input-error { color: #963e27; font-size: 14px; line-height: 1.7; }
.game-placeholder { min-height: 320px; display: grid; align-content: center; text-align: center; background: var(--wash); border-style: dashed; }
.game-placeholder p { margin: 14px 0 0; }
.site-footer { max-width: 1048px; margin: 0 auto; padding: 28px 0; border-top: 1px solid var(--border); }
.footer-top { display: flex; justify-content: space-between; gap: 24px; }
.footer-brand { font-weight: 700; }
.footer-brand small { color: var(--muted); font-weight: 400; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.site-footer a { color: var(--muted); font-size: 13px; text-decoration: none; }
.mandumon-apps h2 { font-size: 12px; font-weight: 600; color: var(--muted); margin: 12px; }
.footer-apps { margin-top: 24px; }
.footer-apps h2 { margin-left: 0; }
.menu-group { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.menu nav a[aria-current=page] { background: var(--wash); font-weight: 700; }
.menu nav .menu-category-link { padding: 8px 12px 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.menu nav .menu-category a:not(.menu-category-link) { padding-block: 9px; }
.language-picker { position: relative; display: flex; }
.language-code { display: none; }
.game-faq { margin-top: 32px; padding: 24px; background: white; border: 1px solid var(--border); border-radius: 18px; }
.game-faq h2 { margin: 0 0 16px; font-size: 18px; }
.game-faq details + details { border-top: 1px solid var(--border); }
.game-faq summary { padding: 16px 0; cursor: pointer; font-size: 14px; font-weight: 600; }
.game-faq p { font-size: 14px; line-height: 1.8; color: var(--muted); }
@media (max-width: 1120px) { .site-footer { margin: 0 28px; } }
@media (max-width: 760px) {
  .header-inner { padding: 0 20px; gap: 8px; }
  .header-tag { display: none; }
  .header-actions { gap: 8px; }
  .brand { font-size: 18px; gap: 6px; min-width: 0; }
  .brand-mark { flex-shrink: 0; width: 28px; height: 28px; }
  .page-shell { padding: 24px 16px 40px; }
  .intro { margin-bottom: 20px; }
  .intro h1 { font-size: 26px; margin-bottom: 8px; }
  .intro p { margin: 0; }
  .game-tabs { margin-bottom: 16px; gap: 4px 12px; }
  .game-links { gap: 6px; }
  .game-links a { padding: 8px 12px; font-size: 13px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .item-input, .game-placeholder { padding: 20px; }
  .footer-top { flex-direction: column; }
  .site-footer { margin: 0 20px; }
  .language-picker { width: 48px; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; }
  .language-code { display: block; font-size: 13px; font-weight: 650; }
  .header-actions .language-button { position: absolute; inset: 0; width: 100%; max-width: none; opacity: 0; padding: 0; }
  .language-picker:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
}


/* 회차별 당첨 번호 페이지(Worker 문자열 템플릿) 전용 */
.language-menu summary { font-size: 13px; font-weight: 650; min-width: 44px; min-height: 40px; border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; text-align: center; }
.language-menu nav { width: 200px; }
.language-menu nav a[aria-current] { background: var(--wash); font-weight: 700; }
.draw-page h1 { font-size: clamp(24px, 4vw, 32px); line-height: 1.4; letter-spacing: -.5px; margin: 8px 0; }
.draw-page h2 { font-size: 18px; margin: 0 0 12px; }
.draw-page a { color: var(--accent); text-underline-offset: 4px; }
.content-breadcrumb { font-size: 14px; color: var(--muted); }
.draw-meta, .lead { color: var(--muted); line-height: 1.7; margin: 0 0 20px; }
.draw-card, .draw-facts, .other-games, .lotto-notice { margin-top: 20px; padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--card-radius); box-shadow: var(--card-shadow); }
.draw-facts ul { margin: 0; padding-left: 20px; }
.draw-facts li { margin: 8px 0; line-height: 1.8; }
.draw-prize { margin: 12px 0 0; }
.balls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ball-group { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.ball { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #fff 0 6%, #ffffff85 24%, transparent 56%), var(--ball); box-shadow: inset 0 -4px 8px #182b4233, 0 2px 4px #25332a26; color: #203328; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #fff; }
.ball.is-bonus { color: #3b2553; }
.ball-plus { font-size: 20px; color: var(--muted); }
.is-small .ball { width: 32px; height: 32px; font-size: 13px; }
.is-small, .is-small .ball-group { gap: 4px; }
.draw-pager, .list-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.draw-pager a, .list-pager a { display: flex; flex-direction: column; min-height: 44px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; text-decoration: none; font-weight: 650; }
.draw-pager a[rel=next] { text-align: right; margin-left: auto; }
.draw-pager small { color: var(--muted); font-weight: 400; font-size: 13px; }
.list-pager > span { align-self: center; color: var(--muted); font-size: 14px; }
.draw-latest { margin: 12px 0 0; }
.lotto-notice { border-color: #e3d3a5; background: #fffbef; font-size: 14px; line-height: 1.8; }
.lotto-notice p { margin: 4px 0; }
.draw-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.draw-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 12px; background: #fff; text-decoration: none; font-weight: 650; }
.draw-links .cta { background: var(--accent); border-color: var(--accent); color: #fff; }
.other-games ul { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.table-scroll { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--card-radius); }
.draw-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.draw-table th, .draw-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.draw-table thead { background: var(--wash); }
.draw-table tbody th { font-weight: 650; }
@media (max-width: 760px) { .ball { width: 42px; height: 42px; font-size: 16px; } .draw-card, .draw-facts, .other-games, .lotto-notice { padding: 20px; } .draw-table th, .draw-table td { padding: 8px; } }
