:root {
  color-scheme: light;
  --ink: #252d29; --muted: #69726e; --line: #e5e8e5; --accent: #dc6545;
  --blue: #c65336; --green: #35644f; --red: #b43e32; --surface: #f8f9f7;
  font-family: "Noto Sans Thai", "Leelawadee UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: #fff; color: var(--ink); font-size: 15px; line-height: 1.75; }
a { color: inherit; text-underline-offset: 4px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { letter-spacing: 0; }
h1, h2 { font-family: "Noto Serif Thai", serif; font-weight: 500; margin: 0; line-height: 1.5; }
h1 { font-size: 40px; }
h2 { font-size: 26px; }
h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.6; }
.site-header, main, .site-footer { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.site-header { min-height: 100px; display: flex; justify-content: space-between; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-size: 20px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; flex: 0 0 36px; }
.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a { padding: 12px 0; color: var(--muted); font-size: 14px; text-decoration: none; border-bottom: 1px solid transparent; white-space: nowrap; }
.main-nav a:hover, .text-link:hover, .site-footer a:hover { color: var(--accent); }
.main-nav a.active { color: var(--ink); border-color: var(--accent); }
main { padding: 40px 0 72px; }
main:focus { outline: none; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 500; margin: 0 0 12px; }
.eyebrow::before { content: ""; width: 24px; height: 1px; flex: 0 0 24px; background: var(--accent); }
.lead { color: var(--muted); font-size: 16px; line-height: 1.95; margin: 18px 0 0; max-width: 600px; }
.hint, .meta, .small-note, .source-line { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 8px 0 0; }
.source-line { margin-top: 22px; overflow-wrap: anywhere; }
.button, .ghost-button, .icon-button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 44px; padding: 10px 22px; border: 1px solid var(--ink); border-radius: 2px; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: 500; transition: background 160ms, border-color 160ms, color 160ms; }
.button { background: var(--ink); color: #fff; }
.button:hover, .button:focus-visible { background: #b94e32; border-color: #b94e32; color: #fff; }
.ghost-button, .icon-button { background: transparent; color: var(--ink); border-color: #cdd3ce; }
.ghost-button:hover, .icon-button:hover { border-color: var(--accent); color: #b94e32; background: #fff8f5; }
.icon-button { width: 44px; height: 44px; padding: 0; font-size: 24px; }
button:disabled { opacity: .45; cursor: default; }
:is(a, button, input, select, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.section { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.section-head, .toolbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; }
.section-head p { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.scan-hero { position: relative; min-height: 450px; padding: 42px 0; background: url("/assets/lottery-modern.webp") right center / 52% auto no-repeat; }
.hero-copy { max-width: 53%; }
.scan-hero h1 { font-size: 46px; line-height: 1.45; }
.scan-hero h1 span { display: block; font-size: 32px; color: #c65336; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 24px; }
.text-link { font-size: 14px; }
.hero-points { margin: 24px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 2; }
.hero-points li::marker { color: var(--accent); }
.hero-caption { position: absolute; right: 6%; bottom: 16px; font-size: 12px; color: var(--muted); }
.trust-strip { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.batch-story { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.batch-story h2 { font-size: 30px; }
.batch-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.batch-steps article > span { display: block; font-size: 12px; color: #c65336; margin-bottom: 16px; }
.batch-steps p { font-size: 13px; color: var(--muted); line-height: 1.9; }
.latest-results { padding: 24px 0; border-block: 1px solid var(--line); }
.latest-heading > div { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; }
.latest-heading .eyebrow { display: none; }
.latest-heading h2 { font-size: 24px; }
.latest-date { margin: 0; color: var(--muted); font-size: 14px; white-space: nowrap; }
.latest-prizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 20px 0; }
.latest-prize { min-width: 0; text-align: center; padding: 12px; border-left: 1px solid var(--line); }
.latest-prize:first-child { border-left: 0; }
.latest-numbers { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 14px; min-height: 48px; font-variant-numeric: tabular-nums; }
.latest-numbers strong { font-size: 28px; font-weight: 600; line-height: 1.3; }
.latest-prize-first .latest-numbers strong { color: #c65336; font-size: 38px; }
.latest-prize h3 { font-size: 13px; margin-top: 6px; font-weight: 500; }
.latest-prize p { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.latest-all { width: 100%; background: transparent; color: var(--ink); border-color: #cdd3ce; }
.latest-all span { font-size: 22px; line-height: 1; }
.latest-all:hover, .latest-all:focus-visible { color: #fff; background: var(--ink); border-color: var(--ink); }
.tool-shell { padding-top: 4px; }
.check-top, .check-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.check-top { align-items: stretch; }
.check-top-main { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding-block: 4px; }
.check-intro h1 { font-size: 36px; }
.check-intro .hint { max-width: 480px; }
.field { display: grid; gap: 8px; margin-top: 28px; }
label { font-size: 13px; font-weight: 600; }
input, select { width: 100%; min-width: 0; min-height: 50px; padding: 10px 14px; border: 1px solid #cdd3ce; border-radius: 2px; background: #fff; color: var(--ink); }
input::placeholder { color: #929b95; }
.check-latest { min-width: 0; }
.check-latest .latest-results { height: 100%; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); }
.check-latest .latest-heading > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.check-latest .latest-heading h2 { font-family: "Noto Sans Thai", sans-serif; font-size: 17px; font-weight: 600; white-space: nowrap; }
.check-latest .latest-date { font-size: 13px; }
.check-latest .latest-prizes { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 0; }
.check-latest .latest-prize { padding: 10px 6px; }
.check-latest .latest-prize:nth-child(3) { border-left: 0; }
.check-latest .latest-prize:nth-child(n+3) { border-top: 1px solid var(--line); }
.check-latest .latest-numbers { min-height: 38px; }
.check-latest .latest-numbers strong { font-size: 24px; }
.check-latest .latest-prize-first .latest-numbers strong { font-size: 34px; }
.check-latest .latest-prize h3 { margin-top: 2px; }
.check-latest .latest-prize p { display: none; }
.check-latest .latest-all { min-height: 40px; padding: 7px 12px; }
.check-methods { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.check-methods h2 { font-family: "Noto Sans Thai", sans-serif; font-size: 20px; font-weight: 500; margin-bottom: 16px; }
.scan-section, .manual-section { min-width: 0; }
.scan-drop { position: relative; display: grid; align-content: center; gap: 8px; min-height: 176px; padding: 24px 16px; text-align: center; border: 1px dashed #abb6ae; background: var(--surface); cursor: pointer; }
.scan-drop > span { font-size: 18px; font-weight: 500; }
.scan-drop small { font-size: 12px; font-weight: 400; color: var(--muted); }
.scan-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.scan-drop.dragging, .scan-drop:focus-within { background: #fff4ef; border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 3px; }
.scan-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; width: 100%; max-height: 240px; overflow-y: auto; margin-top: 12px; padding: 4px; }
.scan-preview a { display: block; min-width: 0; background: var(--surface); }
.scan-preview img { display: block; width: 100%; height: 88px; object-fit: contain; }
.image-check-results { margin-bottom: 20px; }
.image-check-result { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.image-check-result img { display: block; width: 80px; height: 96px; object-fit: contain; background: var(--surface); }
.image-check-result h3 { font-size: 13px; overflow-wrap: anywhere; }
.image-check-result .hint { overflow-wrap: anywhere; }
.scan-preview[hidden], .scan-review[hidden] { display: none; }
.privacy-note { margin: 12px 0 4px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.privacy-note a { color: #a8442c; }
.upload-privacy { margin-top: 12px; font-size: 12px; color: var(--muted); }
.upload-privacy summary { cursor: pointer; }
#scan-button { margin-top: 14px; }
#scan-status { margin-top: 12px; font-size: 13px; white-space: pre-line; overflow-wrap: anywhere; }
.ticket-inputs { display: grid; gap: 10px; }
.ticket-number { min-height: 52px; font-size: 20px; font-variant-numeric: tabular-nums; }
.add-ticket { margin-top: 12px; }
.scan-review { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.scan-review-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.scan-review-heading h2 { font-size: 22px; }
.scan-review-heading span { font-size: 13px; color: var(--muted); }
.scan-numbers { max-height: 520px; overflow-y: auto; margin-top: 16px; padding: 8px; }
.scan-image-result { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.scan-image-result:first-child { padding-top: 0; }
.scan-image-result:last-child { border-bottom: 0; }
.scan-image-result > a { align-self: start; }
.scan-image-result img { display: block; width: 100%; height: 160px; object-fit: contain; background: var(--surface); }
.scan-image-content { min-width: 0; }
.scan-image-content h3 { font-size: 13px; overflow-wrap: anywhere; padding-inline: 8px; }
.scan-number-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 8px; padding: 8px; }
.scanned-number { font-size: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.scanned-number:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: inset 0 0 0 1px var(--accent); }
.camera-button { margin-top: 12px; }
.camera-dialog { box-sizing: border-box; width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.camera-dialog::backdrop { background: #16251fd0; }
.camera-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.camera-heading h2 { margin: 0; font-size: 22px; }
#camera-close { font-size: 24px; width: 40px; height: 40px; padding: 0; }
#camera-video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #252d29; }
.camera-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.check-all { width: 100%; margin-top: 28px; min-height: 48px; }
.modal-open { overflow: hidden; }
.result-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box; border: 1px solid #e5e8e5; border-radius: 8px; padding: 24px; color: #252d29; background: #fff; box-shadow: 0 24px 90px #252d2940; text-align: center; overflow: auto; }
.result-dialog[open] { animation: result-reveal .35s ease-out; }
.result-dialog::backdrop { background: #16251fd0; backdrop-filter: blur(5px); }
.modal-close { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border: 1px solid #e5e8e5; border-radius: 50%; background: white; color: #252d29; font-size: 24px; cursor: pointer; z-index: 2; }
.modal-close:hover { background: #252d29; color: #fff; }
.modal-art { height: 132px; position: relative; margin: 0 auto 12px; width: 210px; }
.modal-art img { width: 100%; height: 100%; object-fit: contain; animation: result-reveal .55s ease-out; }
.modal-date { color: #69726e; margin: 0 0 8px; font-size: 13px; }
.result-dialog h2 { font-size: 22px; line-height: 1.5; margin: 0; }
.modal-total { font-size: 32px; line-height: 1.3; font-weight: 700; color: #35644f; margin: 12px 0 8px; overflow-wrap: anywhere; }
.is-winner .modal-total { color: #c65336; }
.modal-summary { font-size: 14px; margin: 0 0 18px; color: #69726e; }
.modal-rows { max-height: 220px; overflow: auto; text-align: left; border-top: 1px solid #e5e8e5; border-bottom: 1px solid #e5e8e5; }
.modal-rows .match-item { padding: 12px 0; gap: 12px; }
.modal-rows .money { font-size: 14px; }
.result-dialog .hint { font-size: 12px; margin: 16px 0; }
.modal-done { width: 100%; }
.read-issues { max-height: 180px; overflow: auto; text-align: left; padding: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.read-issues p { margin: 0 0 8px; }
.read-issues p:last-child { margin-bottom: 0; }
.ad-section { margin: 36px 0; padding-top: 16px; border-top: 1px solid var(--line); min-width: 0; }
.ad-label { font-size: 11px; color: var(--muted); text-align: center; margin: 0 0 8px; }
.ad-section:has(.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.result-sparkles { position: absolute; inset: 0; pointer-events: none; }
.result-sparkles i { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; background: #35644f; transform: rotate(calc(var(--i) * 30deg)) translateY(-68px); animation: sparkle .8s ease-out both; animation-delay: calc(var(--i) * 25ms); }
.is-winner .result-sparkles i:nth-child(even) { background: #dc6545; }
@keyframes result-reveal { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes sparkle { from { opacity: 0; transform: rotate(calc(var(--i) * 30deg)) translateY(-20px) scale(0); } to { opacity: .75; transform: rotate(calc(var(--i) * 30deg)) translateY(-68px) scale(1); } }
@media (max-width: 480px) { .result-dialog { padding: 20px 16px; } .result-dialog h2 { font-size: 19px; } .modal-total { font-size: 28px; } .modal-art { height: 108px; } }
@media (prefers-reduced-motion: reduce) { .result-dialog[open], .modal-art img, .result-sparkles i { animation: none; } .result-dialog::backdrop { backdrop-filter: none; } }
.check-availability:empty { display: none; }
.result-panel { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.result-empty { display: grid; place-items: center; align-content: center; min-height: 160px; padding: 24px; gap: 10px; background: var(--surface); text-align: center; color: var(--muted); font-size: 13px; }
.result-empty strong { color: var(--ink); font-size: 18px; font-weight: 500; }
.alert { margin-top: 16px; padding: 16px; border-left: 3px solid var(--red); background: #fff4f0; color: var(--red); }
.alert.success { background: #f0f6f2; color: var(--green); border-color: var(--green); }
.alert.warning { border-color: #aa7724; color: #795815; background: #fffaed; }
.draw-warning { display: grid; gap: 4px; }
.draw-warning span { font-size: 13px; }
.match-list { display: grid; margin-top: 16px; }
.match-item { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--line); padding: 16px 0; }
.match-item strong, .match-item span { display: block; }
.match-item span { font-size: 13px; color: var(--muted); }
.money { color: var(--green); font-weight: 600; }
.prize-catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catalog-item { padding: 24px 20px 24px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.catalog-item .amount { font-size: 13px; color: var(--muted); margin: 6px 0 16px; }
.catalog-item .reward { font-size: 20px; font-weight: 500; }
.catalog-item:first-child .reward { color: #c65336; }
.faq { padding-top: 32px; }
.faq h2 { margin-bottom: 20px; }
.faq details { padding: 20px 0; border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 500; }
.faq p { color: var(--muted); font-size: 14px; max-width: 840px; line-height: 1.9; }
.toolbar h1, .draw-detail-page h1 { font-size: 34px; }
.pager { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.draw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.draw-card { display: flex; align-items: center; justify-content: space-between; min-width: 0; gap: 12px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.draw-card > div { min-width: 0; }
.draw-card .ghost-button { flex-shrink: 0; padding-inline: 12px; font-size: 13px; }
.draw-detail { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-bottom: 28px; }
.stat { min-width: 0; }
.stat span { font-size: 13px; color: var(--muted); }
.stat strong { display: block; font-size: 28px; margin-top: 6px; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat:first-child strong { color: #c65336; }
.prize-group { padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--line); }
.prize-group h2 { font-size: 24px; }
.number-cloud { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-top: 16px; }
.number-pill { padding: 9px 12px; text-align: center; background: var(--surface); font-variant-numeric: tabular-nums; font-weight: 500; }
.number-pill.pending { color: var(--muted); border: 1px dashed #cdd3ce; background: transparent; }
.contact-page, .privacy-page { max-width: 880px; padding-top: 16px; min-height: 55vh; }
.contact-email { display: inline-block; color: #b94e32; font-size: 28px; margin: 24px 0 36px; overflow-wrap: anywhere; }
.contact-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; border-top: 1px solid var(--line); padding-top: 28px; }
.contact-topics h2 { font-size: 22px; }
.contact-topics p, .privacy-page p { color: var(--muted); line-height: 1.95; }
.contact-page > .ghost-button { margin-top: 28px; }
.privacy-page h2 { font-size: 24px; margin-top: 32px; }
.site-footer { padding: 30px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-identity .brand { font-size: 18px; }
.footer-identity span { color: var(--muted); font-size: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: 12px; color: var(--muted); }
.site-footer nav a { text-decoration: none; }
.footer-note { flex-basis: 100%; }
.state-panel { display: grid; place-items: center; min-height: 320px; padding: 24px; text-align: center; color: var(--muted); }
.loader { width: 32px; height: 32px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1100px) {
  .check-top, .check-methods { gap: 28px; }
  .check-latest .latest-heading h2 { font-size: 15px; }
  .check-latest .latest-date { font-size: 12px; }
  .scan-hero h1 { font-size: 40px; }
  .scan-hero h1 span { font-size: 28px; }
  .draw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .site-header, main, .site-footer { width: calc(100% - 40px); }
  .main-nav { gap: 20px; }
  .check-top { grid-template-columns: 1fr; gap: 24px; }
  .check-top-main { gap: 0; }
  .check-latest .latest-heading h2 { font-size: 18px; }
  .check-latest .latest-date { font-size: 14px; }
  .batch-story { grid-template-columns: 1fr; gap: 24px; }
  .scan-hero { min-height: 400px; }
  .scan-hero h1 { font-size: 36px; }
  .scan-hero h1 span { font-size: 25px; }
  .prize-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .latest-prizes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .latest-prize:nth-child(3) { border-left: 0; }
  .latest-prize:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .site-header { min-height: 0; padding: 20px 0 0; gap: 14px; flex-wrap: wrap; }
  .brand { font-size: 18px; }
  .main-nav { width: 100%; justify-content: space-between; gap: 12px; }
  .main-nav a { font-size: 12px; padding-block: 12px; }
  main { padding: 28px 0 48px; }
  h1, .check-intro h1, .toolbar h1, .draw-detail-page h1 { font-size: 30px; }
  h2 { font-size: 23px; }
  .scan-hero { min-height: 0; padding: 0 0 220px; background-position: center bottom; background-size: 320px auto; }
  .hero-copy { max-width: none; }
  .scan-hero h1 { font-size: 34px; }
  .scan-hero h1 span { font-size: 26px; }
  .hero-caption { display: none; }
  .hero-actions { gap: 16px; }
  .batch-steps { grid-template-columns: 1fr; gap: 20px; }
  .batch-steps article { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .batch-steps article > span { margin-bottom: 8px; }
  .latest-heading h2 { font-size: 21px; }
  .latest-numbers strong { font-size: 24px; }
  .latest-prize-first .latest-numbers strong { font-size: 34px; }
  .check-latest .latest-results { padding: 16px 14px; }
  .check-latest .latest-heading h2 { font-size: 16px; }
  .check-latest .latest-date { font-size: 12px; }
  .check-latest .latest-prize-first .latest-numbers strong { font-size: 30px; }
  .check-methods { grid-template-columns: 1fr; gap: 28px; margin-top: 28px; }
  .manual-section { padding-top: 24px; border-top: 1px solid var(--line); }
  .section { margin-top: 36px; padding-top: 24px; }
  .catalog-item { padding: 20px 12px 20px 0; }
  .catalog-item h3 { font-size: 14px; }
  .catalog-item .reward { font-size: 17px; }
  .toolbar, .section-head { align-items: start; flex-wrap: wrap; gap: 20px; }
  .draw-grid { grid-template-columns: 1fr; }
  .stats-row { gap: 12px; }
  .stat strong { font-size: 20px; }
  .number-cloud { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .number-pill { padding-inline: 4px; font-size: 14px; }
  .contact-topics { grid-template-columns: 1fr; gap: 20px; }
  .contact-email { font-size: 24px; }
  .site-footer nav { gap: 12px 18px; }
}
@media (max-width: 360px) {
  .site-header, main, .site-footer { width: calc(100% - 32px); }
  .check-latest .latest-results { padding: 14px 10px; }
  .check-latest .latest-heading h2 { font-size: 14px; }
  .check-latest .latest-date { font-size: 11px; }
  .latest-numbers { gap: 8px; }
}
@media (max-width: 640px) {
  html:has(.tool-shell) { scroll-padding-bottom: 124px; }
  body:has(.tool-shell) { padding-bottom: calc(124px + env(safe-area-inset-bottom, 0px)); }
  body:has(.tool-shell) .site-header { padding-top: 12px; gap: 6px; }
  body:has(.tool-shell) .brand-mark { width: 28px; height: 28px; flex-basis: 28px; }
  body:has(.tool-shell) .main-nav a { padding-block: 8px; }
  main:has(.tool-shell) { padding-top: 14px; }
  .tool-shell { padding-top: 0; }
  .check-top { gap: 12px; }
  .check-intro .eyebrow { margin-bottom: 4px; }
  .check-intro h1 { font-size: 26px; }
  .check-intro .hint { margin-top: 4px; font-size: 12px; }
  .draw-field { margin-top: 12px; gap: 4px; }
  .draw-field select { min-height: 44px; padding: 8px 10px; font-size: 16px; }
  .draw-field .hint { margin-top: 0; font-size: 11px; }
  .check-latest .latest-results { padding: 10px 12px; }
  .check-latest .latest-heading h2 { font-size: 14px; }
  .check-latest .latest-date { font-size: 11px; }
  .check-latest .latest-prizes { margin: 6px 0; }
  .check-latest .latest-prize { padding: 5px 4px; }
  .check-latest .latest-numbers { min-height: 30px; gap: 8px; }
  .check-latest .latest-numbers strong { font-size: 20px; }
  .check-latest .latest-prize-first .latest-numbers strong { font-size: 26px; }
  .check-latest .latest-prize h3 { font-size: 11px; margin-top: 0; }
  .check-latest .latest-all { min-height: 36px; padding: 5px 10px; font-size: 12px; }
  .check-methods { margin-top: 16px; padding-top: 14px; gap: 16px; }
  .check-methods h2 { font-size: 17px; margin-bottom: 8px; }
  .scan-drop { min-height: 104px; padding: 12px; gap: 3px; }
  .scan-drop > span { font-size: 16px; }
  .scan-drop small { font-size: 11px; }
  .camera-button { min-height: 40px; margin-top: 8px; padding: 6px 14px; }
  .scan-preview { margin-top: 8px; gap: 6px; max-height: 180px; }
  .privacy-note { margin-top: 8px; line-height: 1.6; }
  .upload-privacy { margin-top: 8px; font-size: 11px; line-height: 1.6; }
  .scan-section > .hint { font-size: 11px; margin-top: 4px; }
  #scan-status { margin-top: 6px; font-size: 12px; }
  #scan-status:empty { display: none; }
  .manual-section { padding-top: 14px; }
  .ticket-inputs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .ticket-number { min-height: 44px; font-size: 16px; padding: 8px 5px; text-align: center; scroll-margin-bottom: 124px; }
  .ticket-number::placeholder { font-size: 11px; }
  .add-ticket { margin-top: 8px; min-height: 40px; padding: 6px 12px; }
  #ticket-hint { font-size: 11px; margin-top: 6px; }
  .scan-review { margin-top: 16px; padding-top: 14px; }
  .scan-review-heading h2 { font-size: 18px; }
  .scan-numbers { margin-top: 8px; max-height: 400px; }
  .scan-image-result { grid-template-columns: 76px minmax(0, 1fr); gap: 8px; padding-block: 12px; }
  .scan-image-result img { height: 108px; }
  .scan-image-content h3 { font-size: 11px; }
  .scan-number-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .scanned-number { min-height: 44px; padding: 8px 4px; font-size: 16px; scroll-margin-bottom: 124px; }
  .check-action { position: fixed; inset: auto 0 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -4px 16px #252d2910; }
  .check-action .check-all { margin: 0; min-height: 48px; }
  .check-action .check-availability { font-size: 12px; line-height: 1.5; text-align: center; margin-top: 4px; }
  .check-availability:empty { display: none; }
  .tool-shell .source-line { margin-top: 12px; font-size: 11px; }
  .result-panel { margin-top: 20px; padding-top: 16px; }
  .result-panel .section-head { margin-bottom: 12px; gap: 8px; }
  .result-panel .result-empty { min-height: 120px; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
