:root {
    color-scheme: light;
    --lc-bg: #f6f2ec;
    --lc-surface: #ffffff;
    --lc-surface-soft: #fbf7f1;
    --lc-surface-warm: #fff4e5;
    --lc-ink: #1d1916;
    --lc-ink-soft: #625b54;
    --lc-ink-muted: #877e75;
    --lc-line: #e8e0d7;
    --lc-line-strong: #d9cec2;
    --lc-charcoal: #211a16;
    --lc-charcoal-soft: #392b24;
    --lc-copper: #c95524;
    --lc-copper-dark: #9f3e18;
    --lc-orange: #e7772d;
    --lc-gold: #f3b84b;
    --lc-gold-soft: #ffebbd;
    --lc-success: #147554;
    --lc-success-soft: #e9f7f1;
    --lc-warning: #9a5b08;
    --lc-warning-soft: #fff7df;
    --lc-danger: #b42318;
    --lc-danger-soft: #fff0ee;
    --lc-info: #315c8c;
    --lc-info-soft: #eef5fc;
    --lc-radius-sm: 12px;
    --lc-radius-md: 18px;
    --lc-radius-lg: 26px;
    --lc-radius-xl: 34px;
    --lc-shadow-sm: 0 8px 24px rgba(48, 35, 26, .07);
    --lc-shadow-md: 0 18px 46px rgba(48, 35, 26, .10);
    --lc-shadow-lg: 0 28px 72px rgba(48, 35, 26, .14);
    --lc-max: 1180px;
    --lc-focus: 0 0 0 4px rgba(231, 119, 45, .22);
    font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body.lottery-app,
body.lottery-page {
    min-height: 100vh;
    margin: 0;
    color: var(--lc-ink);
    background:
        radial-gradient(circle at 8% -8%, rgba(243, 184, 75, .25), transparent 30rem),
        radial-gradient(circle at 100% 4%, rgba(201, 85, 36, .12), transparent 34rem),
        var(--lc-bg);
    font-family: inherit;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.lottery-app::before,
body.lottery-page::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    pointer-events: none;
    opacity: .42;
    background-image:
        linear-gradient(rgba(63, 46, 35, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(63, 46, 35, .03) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

body.modal-open {
    overflow: hidden;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

img,
svg {
    max-width: 100%;
}

a {
    color: var(--lc-copper-dark);
    text-underline-offset: .18em;
}

a:hover {
    color: var(--lc-copper);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
select,
textarea,
input {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: none;
    box-shadow: var(--lc-focus);
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10000;
    padding: 10px 14px;
    border-radius: 999px;
    color: #fff;
    background: var(--lc-charcoal);
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform .18s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #fff;
    background: rgba(29, 23, 19, .94);
    border-bottom: 1px solid rgba(255, 255, 255, .09);
    box-shadow: 0 10px 32px rgba(28, 20, 15, .14);
    backdrop-filter: blur(18px);
}

.app-header__inner {
    width: min(var(--lc-max), calc(100% - 32px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    display: inline-flex;
    min-width: max-content;
    align-items: center;
    gap: 11px;
    color: #fff;
    text-decoration: none;
}

.brand:hover {
    color: #fff;
}

.brand-mark {
    display: block;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 8px 18px rgba(0, 0, 0, .2);
    object-fit: cover;
}

.brand-copy {
    display: grid;
    gap: 1px;
}

.brand-title {
    font-size: 16px;
    font-weight: 900;
    line-height: 1.25;
}

.brand-subtitle {
    color: rgba(255, 255, 255, .62);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .035em;
}

.app-nav {
    display: flex;
    min-width: 0;
    margin-left: auto;
    align-items: center;
    gap: 5px;
}

.app-nav a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: rgba(255, 255, 255, .76);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.app-nav a:hover,
.app-nav a[aria-current="page"] {
    color: #fff;
    background: rgba(255, 255, 255, .10);
    border-color: rgba(255, 255, 255, .10);
}

.service-mode {
    display: inline-flex;
    min-width: max-content;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 226, 163, .22);
    border-radius: 999px;
    color: #ffe3a5;
    background: rgba(243, 184, 75, .10);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.service-mode::before {
    width: 7px;
    height: 7px;
    content: "";
    border-radius: 50%;
    background: #79d4ae;
    box-shadow: 0 0 0 4px rgba(121, 212, 174, .12);
}

.app-main,
.page-frame,
.site-footer__inner {
    width: min(var(--lc-max), calc(100% - 32px));
    margin-inline: auto;
}

.app-main {
    padding: 36px 0 54px;
}

.home-wide {
    grid-column: 1 / -1;
    width: 100%;
}

.home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
    gap: 22px;
    align-items: stretch;
}

.hero-panel,
.checker-card,
.lotto-board,
.result-box,
.quick-card,
.content-section,
.page-hero,
.status-card {
    border: 1px solid rgba(91, 65, 49, .10);
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--lc-shadow-md);
}

.hero-panel {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    padding: clamp(26px, 4vw, 48px);
    border-radius: var(--lc-radius-xl);
    color: #fff;
    background:
        radial-gradient(circle at 95% 4%, rgba(243, 184, 75, .30), transparent 18rem),
        linear-gradient(145deg, #17120f 0%, #2e211a 58%, #78351d 100%);
    box-shadow: var(--lc-shadow-lg);
}

.hero-panel::after {
    position: absolute;
    right: -88px;
    bottom: -112px;
    width: 290px;
    height: 290px;
    content: "";
    border: 54px solid rgba(255, 255, 255, .035);
    border-radius: 50%;
}

.hero-panel > * {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    color: var(--lc-copper-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.hero-panel .eyebrow {
    color: #ffd889;
}

.eyebrow::before {
    width: 24px;
    height: 2px;
    content: "";
    background: currentColor;
}

.hero-panel h1,
.page-hero h1 {
    margin: 0;
    text-wrap: balance;
    letter-spacing: -.035em;
}

.hero-panel h1 {
    max-width: 14ch;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
}

.hero-lead {
    max-width: 58ch;
    margin: 17px 0 0;
    color: rgba(255, 255, 255, .74);
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.72;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.trust-chip,
.status-pill,
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
}

.trust-chip {
    padding: 8px 11px;
    color: rgba(255, 255, 255, .82);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .10);
}

.trust-chip--success::before,
.status-pill::before {
    width: 7px;
    height: 7px;
    content: "";
    border-radius: 50%;
    background: #52c99a;
}

.hero-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 28px;
}

.hero-shortcuts a {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: var(--lc-radius-md);
    color: #fff;
    background: rgba(255, 255, 255, .07);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease;
}

.hero-shortcuts a::after {
    content: "→";
    color: #ffd889;
    font-size: 18px;
}

.hero-shortcuts a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    transform: translateY(-2px);
}

.checker-card {
    padding: clamp(22px, 3vw, 32px);
    border-radius: var(--lc-radius-xl);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-heading__copy {
    min-width: 0;
}

.section-heading h2,
.section-heading h3 {
    margin: 0;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.25;
    letter-spacing: -.02em;
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--lc-ink-soft);
    font-size: 14px;
}

.step-badge {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: var(--lc-charcoal);
    font-size: 14px;
    font-weight: 900;
}

.checker-form {
    display: grid;
    gap: 18px;
    margin: 0;
}

.field-group {
    display: grid;
    gap: 8px;
}

.field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--lc-ink);
    font-size: 14px;
    font-weight: 850;
}

.field-note {
    color: var(--lc-ink-muted);
    font-size: 11px;
    font-weight: 700;
}

.checker-form select,
.checker-form textarea {
    width: 100%;
    border: 1px solid var(--lc-line-strong);
    border-radius: var(--lc-radius-md);
    color: var(--lc-ink);
    background: #fff;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.checker-form select {
    min-height: 52px;
    padding: 10px 42px 10px 14px;
    font-weight: 750;
}

.checker-form textarea {
    min-height: 146px;
    padding: 15px 16px;
    resize: vertical;
    font-size: 17px;
    font-weight: 750;
    line-height: 1.65;
    letter-spacing: .05em;
}

.checker-form select:focus,
.checker-form textarea:focus {
    border-color: rgba(201, 85, 36, .55);
    box-shadow: var(--lc-focus);
}

.scan-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.btn,
.checker-form button,
.modal-card button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 17px;
    border: 1px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 850;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover,
.checker-form button:hover,
.modal-card button:hover {
    transform: translateY(-1px);
}

.btn-primary,
.checker-form .submit-check {
    color: #fff;
    background: linear-gradient(135deg, var(--lc-copper), var(--lc-orange));
    box-shadow: 0 14px 28px rgba(201, 85, 36, .24);
}

.btn-secondary,
.checker-form .btn-scan,
.checker-form .btn-upload {
    color: var(--lc-ink);
    background: var(--lc-surface-soft);
    border-color: var(--lc-line);
}

.checker-form .btn-scan:hover,
.checker-form .btn-upload:hover {
    background: var(--lc-surface-warm);
}

.checker-form .btn-stop {
    display: none;
    width: 100%;
    color: var(--lc-danger);
    background: var(--lc-danger-soft);
    border-color: rgba(180, 35, 24, .16);
}

.submit-check {
    width: 100%;
    font-size: 16px;
}

.help-text {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--lc-ink-muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.55;
}

.help-text::before {
    content: "i";
    display: grid;
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    place-items: center;
    margin-top: 1px;
    border: 1px solid var(--lc-line-strong);
    border-radius: 50%;
    font-family: Georgia, serif;
    font-size: 11px;
    font-weight: 700;
}

.scan-status {
    min-height: 1.4em;
    margin: -2px 0 0;
    color: var(--lc-success);
    font-size: 12px;
    font-weight: 750;
}

.scan-status.is-error {
    color: var(--lc-danger);
}

#scanner-container {
    display: none;
    width: 100%;
    max-width: 460px;
    margin: 2px auto 10px;
    overflow: hidden;
    border: 1px solid var(--lc-line-strong);
    border-radius: var(--lc-radius-md);
    background: #0f0d0b;
    box-shadow: var(--lc-shadow-sm);
}

.upcoming-analysis {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr);
    overflow: hidden;
    border: 1px solid rgba(91, 65, 49, .11);
    border-radius: var(--lc-radius-xl);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--lc-shadow-lg);
}

.upcoming-analysis__intro {
    position: relative;
    display: flex;
    min-height: 100%;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: clamp(28px, 4vw, 46px);
    color: #fff;
    background:
        radial-gradient(circle at 92% 8%, rgba(243, 184, 75, .38), transparent 16rem),
        linear-gradient(148deg, #1c1713 0%, #3c261b 58%, #873a1c 100%);
}

.upcoming-analysis__intro::after {
    position: absolute;
    right: -72px;
    bottom: -96px;
    width: 230px;
    height: 230px;
    content: "";
    border: 44px solid rgba(255, 255, 255, .035);
    border-radius: 50%;
}

.upcoming-analysis__intro > * {
    position: relative;
    z-index: 1;
}

.upcoming-analysis__intro .eyebrow,
.upcoming-analysis__empty-copy .eyebrow {
    color: #ffd889;
}

.upcoming-analysis__intro h2,
.upcoming-analysis__empty-copy h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.2;
    letter-spacing: -.03em;
    text-wrap: balance;
}

.upcoming-analysis__lead {
    margin: 15px 0 0;
    color: rgba(255, 255, 255, .74);
    line-height: 1.75;
}

.upcoming-analysis__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.upcoming-analysis__meta span {
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    color: #ffe5ad;
    background: rgba(255, 255, 255, .08);
    font-size: 11px;
    font-weight: 800;
}

.upcoming-analysis__notice {
    margin: 20px 0 0;
    padding: 12px 14px;
    border: 1px solid rgba(255, 216, 137, .18);
    border-radius: 15px;
    color: rgba(255, 255, 255, .77);
    background: rgba(0, 0, 0, .14);
    font-size: 12px;
    line-height: 1.65;
}

.upcoming-analysis__notice strong {
    color: #ffd889;
}

.upcoming-analysis__results {
    display: grid;
    align-content: center;
    gap: 18px;
    padding: clamp(22px, 3.2vw, 38px);
    background:
        radial-gradient(circle at 100% 0%, rgba(243, 184, 75, .13), transparent 22rem),
        #fff;
}

.analysis-number-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.analysis-number-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--lc-line);
    border-radius: 20px;
    background: var(--lc-surface-soft);
}

.analysis-number-card--featured {
    grid-column: 1 / -1;
    border-color: rgba(201, 85, 36, .22);
    background: linear-gradient(135deg, #fff8ed, #fffdf8);
    box-shadow: inset 0 0 0 1px rgba(243, 184, 75, .12);
}

.analysis-number-card__heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.analysis-number-card__heading h3 {
    margin: 0;
    font-size: 15px;
}

.analysis-number-card__heading span {
    color: var(--lc-ink-muted);
    font-size: 10px;
    font-weight: 800;
}

.analysis-number-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.analysis-number-list li {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 56px;
    place-items: center;
    padding: 11px 4px 7px;
    border: 1px solid rgba(91, 65, 49, .09);
    border-radius: 14px;
    color: var(--lc-charcoal);
    background: #fff;
    box-shadow: 0 5px 15px rgba(48, 35, 26, .05);
}

.analysis-number-list strong {
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(17px, 2.2vw, 24px);
    font-weight: 950;
    letter-spacing: .04em;
    line-height: 1;
    text-overflow: clip;
}

.analysis-number-card--featured .analysis-number-list strong {
    color: var(--lc-copper-dark);
    font-size: clamp(22px, 3vw, 31px);
}

.analysis-number-rank {
    position: absolute;
    top: 3px;
    left: 6px;
    color: var(--lc-ink-muted);
    font-size: 8px;
    font-weight: 900;
}

.upcoming-analysis__cta {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 17px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--lc-copper-dark), var(--lc-copper));
    box-shadow: 0 14px 28px rgba(159, 62, 24, .20);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

.upcoming-analysis__cta:hover {
    color: #fff;
    box-shadow: 0 18px 34px rgba(159, 62, 24, .26);
    transform: translateY(-2px);
}

.upcoming-analysis__cta span:last-child {
    flex: 0 0 auto;
    color: #ffe1a4;
    font-size: 24px;
}

.upcoming-analysis__cta strong,
.upcoming-analysis__cta small {
    display: block;
}

.upcoming-analysis__cta small {
    margin-top: 2px;
    color: rgba(255, 255, 255, .72);
    font-size: 11px;
    font-weight: 650;
}

.upcoming-analysis--empty {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: clamp(24px, 4vw, 38px);
    color: #fff;
    background: linear-gradient(145deg, #1c1713, #4e2a1b);
}

.upcoming-analysis__empty-copy p:last-child {
    max-width: 68ch;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .72);
}

.upcoming-analysis__cta--compact {
    min-width: 260px;
}

.lotto-board {
    grid-column: 1 / -1;
    overflow: hidden;
    margin-top: 22px;
    border-radius: var(--lc-radius-xl);
}

.board-grid {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
}

.board-heading {
    position: relative;
    display: flex;
    min-height: 244px;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(26px, 4vw, 42px);
    color: #fff;
    background:
        radial-gradient(circle at 95% 0%, rgba(243, 184, 75, .34), transparent 14rem),
        linear-gradient(145deg, #211a16, #5b2a18);
}

.board-heading__label {
    color: #ffd98d;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.board-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(25px, 4vw, 42px);
    line-height: 1.2;
    letter-spacing: -.025em;
    text-wrap: balance;
}

.board-source {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    color: rgba(255, 255, 255, .66);
    font-size: 12px;
    font-weight: 700;
}

.board-source::before {
    width: 8px;
    height: 8px;
    content: "";
    border-radius: 50%;
    background: #69d2a6;
    box-shadow: 0 0 0 4px rgba(105, 210, 166, .12);
}

.board-results {
    display: grid;
    grid-template-rows: auto 1fr;
}

.first-prize {
    display: grid;
    padding: clamp(24px, 4vw, 38px);
    place-items: center;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, rgba(243, 184, 75, .24), transparent 56%), #fff;
    border-bottom: 1px solid var(--lc-line);
}

.first-prize__label {
    color: var(--lc-warning);
    font-size: 13px;
    font-weight: 900;
}

.first-prize__number {
    margin-top: 5px;
    color: var(--lc-copper);
    font-size: clamp(44px, 7vw, 72px);
    font-weight: 950;
    letter-spacing: .16em;
    line-height: 1.08;
    text-indent: .16em;
    text-shadow: 0 9px 24px rgba(201, 85, 36, .14);
}

.first-prize__near {
    margin-top: 7px;
    color: var(--lc-ink-soft);
    font-size: 12px;
    font-weight: 750;
}

.sub-prizes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sub-prize {
    display: grid;
    min-height: 112px;
    align-content: center;
    gap: 5px;
    padding: 18px;
    text-align: center;
    border-right: 1px solid var(--lc-line);
}

.sub-prize:last-child {
    border-right: 0;
}

.sub-prize__label {
    color: var(--lc-ink-muted);
    font-size: 12px;
    font-weight: 800;
}

.sub-prize__number {
    color: var(--lc-ink);
    font-size: clamp(23px, 3vw, 32px);
    font-weight: 950;
    letter-spacing: .055em;
}

.alert,
.notice {
    padding: 15px 17px;
    border: 1px solid;
    border-radius: var(--lc-radius-md);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.65;
}

.alert {
    margin-top: 16px;
}

.alert-danger {
    color: var(--lc-danger);
    background: var(--lc-danger-soft);
    border-color: rgba(180, 35, 24, .16);
}

.alert-warning,
.notice--warning {
    color: var(--lc-warning);
    background: var(--lc-warning-soft);
    border-color: rgba(154, 91, 8, .18);
}

.notice--info {
    color: var(--lc-info);
    background: var(--lc-info-soft);
    border-color: rgba(49, 92, 140, .16);
}

.result-box {
    grid-column: 1 / -1;
    margin-top: 22px;
    overflow: hidden;
    border-radius: var(--lc-radius-lg);
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    color: #fff;
    background: var(--lc-charcoal);
    font-size: 17px;
    font-weight: 900;
}

.result-header small {
    color: rgba(255, 255, 255, .62);
    font-size: 11px;
    font-weight: 700;
}

.result-item {
    display: grid;
    grid-template-columns: minmax(130px, .35fr) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 19px 22px;
    border-bottom: 1px solid var(--lc-line);
}

.result-item:last-child {
    border-bottom: 0;
}

.result-item.win {
    color: #6a4309;
    background: linear-gradient(90deg, #fff8e8, #fff);
    box-shadow: inset 5px 0 0 var(--lc-gold);
}

.result-item.lose {
    color: var(--lc-ink-soft);
    background: #fff;
    box-shadow: inset 5px 0 0 var(--lc-line-strong);
}

.lotto-num {
    color: var(--lc-ink);
    font-size: clamp(21px, 3vw, 28px);
    font-weight: 950;
    letter-spacing: .07em;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.quick-card {
    display: grid;
    min-height: 136px;
    align-content: space-between;
    gap: 14px;
    padding: 20px;
    border-radius: var(--lc-radius-lg);
    color: var(--lc-ink);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.quick-card:hover {
    color: var(--lc-ink);
    border-color: rgba(201, 85, 36, .28);
    box-shadow: var(--lc-shadow-lg);
    transform: translateY(-3px);
}

.quick-card__icon {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    margin: 0;
    border: 1px solid rgba(159, 62, 24, .2);
    border-radius: 16px;
    color: var(--lc-copper-dark);
    background: linear-gradient(145deg, #fffaf5, var(--lc-surface-warm));
    box-shadow: 0 8px 18px rgba(159, 62, 24, .1), inset 0 1px 0 rgba(255, 255, 255, .85);
    line-height: 1;
}

.quick-card__icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.quick-card__content {
    display: block;
}

.quick-card strong {
    display: block;
    font-size: 15px;
}

.quick-card__description {
    display: block;
    margin-top: 3px;
    color: var(--lc-ink-muted);
    font-size: 12px;
    line-height: 1.55;
}

.page-frame {
    padding: 30px 0 56px;
}

.breadcrumbs {
    margin-bottom: 16px;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--lc-ink-muted);
    font-size: 12px;
    font-weight: 700;
}

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.breadcrumbs li:not(:last-child)::after {
    content: "›";
    color: var(--lc-line-strong);
    font-size: 16px;
}

.breadcrumbs a {
    color: var(--lc-ink-soft);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--lc-copper);
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(26px, 5vw, 52px);
    border-radius: var(--lc-radius-xl);
    background:
        radial-gradient(circle at 95% 0%, rgba(243, 184, 75, .16), transparent 22rem),
        rgba(255, 255, 255, .96);
}

.page-hero::after {
    position: absolute;
    right: -54px;
    bottom: -78px;
    width: 210px;
    height: 210px;
    content: "";
    border: 36px solid rgba(201, 85, 36, .035);
    border-radius: 50%;
}

.page-hero > * {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    max-width: 21ch;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.14;
}

.page-hero .lead {
    max-width: 68ch;
    margin: 12px 0 0;
    color: var(--lc-ink-soft);
    font-size: clamp(15px, 2vw, 18px);
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 20px;
}

.status-pill,
.meta-chip {
    padding: 7px 11px;
}

.status-pill {
    color: var(--lc-success);
    background: var(--lc-success-soft);
    border: 1px solid rgba(20, 117, 84, .12);
}

.meta-chip {
    color: var(--lc-ink-soft);
    background: var(--lc-surface-soft);
    border: 1px solid var(--lc-line);
}

.updated {
    margin: 0;
}

.content-stack {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.content-section {
    overflow: hidden;
    padding: clamp(22px, 4vw, 34px);
    border-radius: var(--lc-radius-lg);
}

.content-section > :first-child {
    margin-top: 0;
}

.content-section > :last-child {
    margin-bottom: 0;
}

.content-section h2 {
    margin: 0 0 16px;
    font-size: clamp(21px, 3vw, 28px);
    line-height: 1.3;
    letter-spacing: -.02em;
}

.content-section p {
    color: var(--lc-ink-soft);
}

.content-section ul:not(.link-grid) {
    display: grid;
    gap: 9px;
    padding-left: 1.3rem;
}

.content-section li::marker {
    color: var(--lc-copper);
}

.facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.fact-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--lc-line);
    border-radius: var(--lc-radius-md);
    background: var(--lc-surface-soft);
}

.fact-card dt {
    margin: 0;
    color: var(--lc-ink-muted);
    font-size: 11px;
    font-weight: 800;
}

.fact-card dd {
    margin: 5px 0 0;
    color: var(--lc-ink);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--lc-line);
    border-radius: var(--lc-radius-md);
    background: #fff;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--lc-line);
    text-align: left;
    vertical-align: top;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: var(--lc-ink-soft);
    background: #f7f3ee;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

tbody tr:nth-child(even) td {
    background: #fcfaf7;
}

tbody tr:hover td {
    background: var(--lc-surface-warm);
}

tbody tr:last-child td {
    border-bottom: 0;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.link-grid a {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid var(--lc-line);
    border-radius: 14px;
    color: var(--lc-ink);
    background: var(--lc-surface-soft);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.link-grid a::after {
    content: "→";
    color: var(--lc-copper);
    font-size: 17px;
}

.link-grid a:hover {
    border-color: rgba(201, 85, 36, .24);
    background: var(--lc-surface-warm);
}

.page-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 16px;
}

.page-notice::before {
    display: grid;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    place-items: center;
    content: "!";
    border-radius: 9px;
    color: #fff;
    background: var(--lc-warning);
    font-size: 13px;
    font-weight: 900;
}

.status-card {
    padding: clamp(30px, 6vw, 70px);
    border-radius: var(--lc-radius-xl);
    text-align: center;
}

.status-card__code {
    color: var(--lc-copper);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
}

.status-card h1 {
    margin: 8px 0 10px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.15;
}

.status-card p {
    max-width: 56ch;
    margin: 0 auto;
    color: var(--lc-ink-soft);
}

.status-card .btn {
    margin-top: 22px;
}

.site-footer {
    margin-top: 18px;
    color: rgba(255, 255, 255, .74);
    background: var(--lc-charcoal);
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 26px;
    align-items: center;
    padding: 28px 0;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer-brand strong {
    display: block;
    color: #fff;
}

.footer-brand p {
    max-width: 64ch;
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.65;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px 14px;
    font-size: 12px;
    font-weight: 750;
}

.footer-links a {
    color: rgba(255, 255, 255, .76);
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    overflow: auto;
    place-items: center;
    padding: 22px;
    background: rgba(24, 17, 13, .72);
    backdrop-filter: blur(8px);
}

.modal-overlay.is-open {
    display: grid;
}

.modal-card {
    width: min(100%, 460px);
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: var(--lc-radius-lg);
    background: #fff;
    box-shadow: var(--lc-shadow-lg);
    text-align: center;
}

.modal-card__icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    place-items: center;
    border-radius: 18px;
    color: var(--lc-warning);
    background: var(--lc-warning-soft);
    font-size: 27px;
}

.modal-card h2 {
    margin: 0;
    font-size: 24px;
}

.modal-card p {
    color: var(--lc-ink-soft);
}

.modal-help {
    margin: 18px 0;
    padding: 15px;
    border: 1px solid var(--lc-line);
    border-radius: var(--lc-radius-md);
    background: var(--lc-surface-soft);
    text-align: left;
    font-size: 13px;
}

@media (max-width: 1040px) {
    .service-mode {
        display: none;
    }

    .home-hero {
        grid-template-columns: 1fr;
    }

    .upcoming-analysis {
        grid-template-columns: 1fr;
    }

    .upcoming-analysis--empty {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .hero-panel h1 {
        max-width: 18ch;
    }

    .quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .app-header {
        position: relative;
    }

    .app-header__inner {
        min-height: auto;
        flex-wrap: wrap;
        padding: 13px 0 10px;
    }

    .app-nav {
        width: 100%;
        margin-left: 0;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .app-nav::-webkit-scrollbar {
        display: none;
    }

    .app-nav a {
        min-height: 38px;
        padding: 8px 11px;
    }

    .board-grid {
        grid-template-columns: 1fr;
    }

    .board-heading {
        min-height: 210px;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .app-header__inner,
    .app-main,
    .page-frame,
    .site-footer__inner {
        width: min(100% - 20px, var(--lc-max));
    }

    .app-main,
    .page-frame {
        padding-top: 18px;
    }

    .brand-subtitle {
        display: none;
    }

    .hero-panel,
    .checker-card,
    .lotto-board,
    .page-hero,
    .status-card {
        border-radius: 24px;
    }

    .hero-shortcuts,
    .scan-actions,
    .quick-links,
    .facts {
        grid-template-columns: 1fr;
    }

    .upcoming-analysis--empty,
    .analysis-number-groups {
        grid-template-columns: 1fr;
    }

    .upcoming-analysis__cta--compact {
        min-width: 0;
    }

    .analysis-number-card--featured {
        grid-column: auto;
    }

    .hero-shortcuts a {
        min-height: 54px;
    }

    .sub-prizes {
        grid-template-columns: 1fr;
    }

    .sub-prize {
        min-height: 92px;
        border-right: 0;
        border-bottom: 1px solid var(--lc-line);
    }

    .sub-prize:last-child {
        border-bottom: 0;
    }

    .first-prize__number {
        font-size: clamp(39px, 13vw, 58px);
        letter-spacing: .10em;
        text-indent: .10em;
    }

    .result-item {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .content-section {
        padding: 20px;
    }

    .table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
        width: 100%;
    }

    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    tbody {
        display: grid;
        gap: 10px;
    }

    tbody tr {
        overflow: hidden;
        border: 1px solid var(--lc-line);
        border-radius: 14px;
        background: #fff;
    }

    tbody td,
    tbody tr:nth-child(even) td,
    tbody tr:hover td {
        display: grid;
        grid-template-columns: minmax(96px, .44fr) minmax(0, 1fr);
        gap: 11px;
        padding: 10px 12px;
        background: #fff;
        border-bottom: 1px solid var(--lc-line);
        overflow-wrap: anywhere;
    }

    tbody td::before {
        content: attr(data-label);
        color: var(--lc-ink-muted);
        font-size: 11px;
        font-weight: 850;
    }

    tbody td:last-child {
        border-bottom: 0;
    }

    .table-wrap--dense {
        overflow: auto;
        border: 1px solid var(--lc-line);
        background: #fff;
    }

    .table-wrap--dense table {
        display: table;
        min-width: 680px;
    }

    .table-wrap--dense thead {
        position: static;
        display: table-header-group;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
        clip-path: none;
        white-space: normal;
    }

    .table-wrap--dense tbody {
        display: table-row-group;
    }

    .table-wrap--dense tr {
        display: table-row;
        width: auto;
        overflow: visible;
        border: 0;
        border-radius: 0;
    }

    .table-wrap--dense th,
    .table-wrap--dense td,
    .table-wrap--dense tbody td,
    .table-wrap--dense tbody tr:nth-child(even) td,
    .table-wrap--dense tbody tr:hover td {
        display: table-cell;
        width: auto;
        padding: 11px 13px;
        background: #fff;
        border-bottom: 1px solid var(--lc-line);
    }

    .table-wrap--dense tbody tr:nth-child(even) td {
        background: #fcfaf7;
    }

    .table-wrap--dense tbody td::before {
        content: none;
    }

    .modal-card {
        padding: 22px;
    }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    body.lottery-app,
    body.lottery-page {
        background: #fff;
    }

    .app-header,
    .site-footer,
    .skip-link,
    .hero-shortcuts,
    .quick-links,
    .scan-actions,
    .submit-check {
        display: none !important;
    }

    .hero-panel,
    .checker-card,
    .lotto-board,
    .result-box,
    .content-section,
    .page-hero {
        color: #000;
        background: #fff;
        box-shadow: none;
        border-color: #bbb;
    }
}
