@font-face {
    font-family: 'Kanit Lottery';
    src: url('../fonts/Kanit/Kanit-Regular.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Kanit Lottery';
    src: url('../fonts/Kanit/Kanit-Medium.ttf') format('truetype');
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Kanit Lottery';
    src: url('../fonts/Kanit/Kanit-Bold.ttf') format('truetype');
    font-style: normal;
    font-weight: 800;
    font-display: swap;
}

:root {
    --lottery-red: #ed1b2f;
    --lottery-deep-red: #bb1239;
    --lottery-magenta: #9a1767;
    --lottery-ink: #242428;
    --lottery-muted: #68686f;
    --lottery-surface: #f6f6f7;
    --lottery-display-font: 'Kanit Lottery', 'Arial Rounded MT Bold', Arial, sans-serif;
}

.lottery-home { width: 100%; background: #fff; color: var(--lottery-ink); font-family: Nunito, Arial, sans-serif; overflow: hidden; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
.lottery-hero { width: 100%; min-height: 0; background: linear-gradient(110deg, #f6a225, #ed1b2f 60%, #a10f63); }
.lottery-hero .carousel-item { height: auto !important; max-height: none !important; }
.lottery-hero .carousel-item img { width: 100%; height: auto; display: block; object-fit: contain; }
.lottery-hero .carousel-indicators { justify-content: flex-end; margin-right: 4%; }
.lottery-hero-fallback { min-height: clamp(220px, 29vw, 430px); display: flex; align-items: center; padding: 40px 8%; color: #fff; background: radial-gradient(circle at 80% 45%, rgba(255,255,255,.22), transparent 18%), linear-gradient(120deg, #fb9e20, #ed1b2f 58%, #9a1767); }
.lottery-hero-fallback span { font-family: var(--lottery-display-font); font-weight: 600; letter-spacing: .15em; }
.lottery-hero-fallback h1 { max-width: 620px; margin: 10px 0 24px; font-family: var(--lottery-display-font); font-size: clamp(36px, 5vw, 72px); line-height: .98; font-weight: 800; letter-spacing: -.035em; }
.lottery-hero-fallback a, .lottery-play-button { display: inline-flex; align-items: center; justify-content: center; padding: 12px 30px; border-radius: 5px; background: #fff; color: var(--lottery-red); font-family: var(--lottery-display-font); font-size: 15px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; }
.lottery-home-content { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 56px; }
.lottery-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.lottery-heading-row h1 { margin: 3px 0 0; font-family: var(--lottery-display-font); font-size: clamp(31px, 3vw, 43px); font-weight: 800; line-height: 1.08; letter-spacing: -.035em; }
.lottery-eyebrow { color: var(--lottery-red); font-family: var(--lottery-display-font); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.lottery-balance { min-width: 200px; padding: 10px 18px; border: 1px solid #eee; border-radius: 8px; text-align: right; box-shadow: 0 5px 18px rgba(30,30,30,.07); }
.lottery-balance span { display: block; color: var(--lottery-muted); font-size: 12px; }
.lottery-balance strong { color: var(--lottery-red); font-family: var(--lottery-display-font); font-size: 21px; font-weight: 800; }

.lottery-pools { min-height: 370px; display: flex; align-items: stretch; overflow-x: auto; overflow-y: hidden; padding-left: 0; border-radius: 10px; box-shadow: 0 12px 35px rgba(45,20,28,.13); scrollbar-width: thin; scrollbar-color: var(--lottery-red) #f2f2f2; }
.lottery-pool-card { min-width: 98px; flex: 0 0 98px; position: relative; z-index: var(--pool-layer); display: flex; overflow: hidden; margin-left: -12px; border: 1px solid rgba(255,255,255,.3); border-width: 0 0 0 1px; border-radius: 14px 0 0 14px; color: #fff; cursor: pointer; outline: none; background: linear-gradient(180deg, #ffad18, #f36b13); box-shadow: -8px 0 16px rgba(85,0,21,.12); transition: flex-basis .35s ease, transform .2s ease; }
.lottery-pool-card:first-child { margin-left: 0; }
.lottery-pool-card:last-child { border-radius: 14px 10px 10px 14px; }
.lottery-pool-card:focus-visible { box-shadow: inset 0 0 0 3px #fff, -8px 0 16px rgba(85,0,21,.18); }
.lottery-pool-card:nth-child(3n+2) { background: linear-gradient(180deg, #ff6620, #ed1b2f); }
.lottery-pool-card:nth-child(3n) { background: linear-gradient(180deg, #ed1b2f, #aa155e); }
.lottery-pool-card.is-active { flex: 0 0 min(640px, calc(100vw - 150px)); background: radial-gradient(circle at 82% 32%, rgba(255,255,255,.18), transparent 22%), linear-gradient(135deg, #fa1729, #c7143e 54%, #991764); }
.lottery-pool-tab { width: 98px; flex: 0 0 98px; padding: 22px 9px; display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; border-right: 1px solid rgba(255,255,255,.25); }
.lottery-pool-code { font-family: var(--lottery-display-font); font-size: 37px; line-height: 1; font-weight: 600; }
.lottery-pool-logo { width: 62px; height: 62px; padding: 4px; border-radius: 12px; object-fit: contain; background: rgba(255,255,255,.96); filter: drop-shadow(0 4px 5px rgba(60,0,10,.18)); }
.lottery-pool-tab strong { font-family: var(--lottery-display-font); font-size: 13px; line-height: 1.08; font-weight: 600; letter-spacing: -.01em; text-shadow: 0 1px 2px rgba(76,0,25,.22); word-break: break-word; }
.lottery-pool-detail { min-width: 0; flex: 1; position: relative; display: none; grid-template-columns: minmax(0, 1fr) 190px; grid-template-rows: minmax(0, 1fr) auto; align-items: center; column-gap: 20px; row-gap: 18px; padding: 32px 30px; overflow: hidden; }
.lottery-pool-card.is-active .lottery-pool-detail { display: grid; }
.lottery-pool-copy { min-width: 0; position: relative; z-index: 2; grid-column: 1; grid-row: 1; align-self: center; }
.lottery-pool-copy > span { font-family: var(--lottery-display-font); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 1px 2px rgba(76,0,25,.2); }
.lottery-pool-copy h2 { max-width: 100%; margin: 7px 0 8px; font-family: var(--lottery-display-font); font-size: clamp(34px, 3.1vw, 52px); line-height: .98; font-weight: 800; letter-spacing: -.035em; text-shadow: 0 3px 5px rgba(76,0,25,.22); overflow-wrap: anywhere; }
.lottery-pool-copy p { margin: 0; font-size: 17px; font-weight: 400; line-height: 1.35; }
.lottery-pool-copy p b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.025em; text-shadow: 0 2px 3px rgba(76,0,25,.24); }
.lottery-pool-actions { grid-column: 1; grid-row: 2; display: flex; align-items: stretch; flex-wrap: wrap; gap: 10px; position: relative; z-index: 2; }
.lottery-play-button { min-width: 190px; width: max-content; position: static; }
.lottery-result-button { min-height: 45px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border: 1px solid rgba(255,255,255,.72); border-radius: 5px; color: #fff; background: rgba(92,8,42,.28); font-family: var(--lottery-display-font); font-size: 14px; font-weight: 600; text-decoration: none; backdrop-filter: blur(3px); }
.lottery-result-button:hover, .lottery-result-button:focus-visible { color: var(--lottery-red); background: #fff; text-decoration: none; outline: none; }
.lottery-ball { width: 190px; height: 190px; grid-column: 2; grid-row: 1 / 3; justify-self: center; border-radius: 50%; display: grid; place-items: center; color: #ef1b31; background: linear-gradient(145deg, #fff9df, #ffd269); box-shadow: inset -18px -20px 40px rgba(187,18,57,.2), 0 16px 35px rgba(63,0,11,.2); transform: rotate(-8deg); }
.lottery-ball span { font-size: 62px; font-weight: 900; }
.lottery-ball img { width: 72%; height: 72%; object-fit: contain; filter: drop-shadow(0 7px 7px rgba(94,30,15,.18)); }
.lottery-empty { padding: 54px 20px; border-radius: 10px; text-align: center; background: var(--lottery-surface); }
.lottery-empty i { color: var(--lottery-red); font-size: 40px; }
.lottery-empty h2 { margin: 14px 0 5px; font-family: var(--lottery-display-font); font-weight: 600; }

.lottery-schedule-section { margin-top: 34px; border: 1px solid #e9e9eb; border-radius: 8px; overflow: hidden; }
.lottery-schedule-section > h2 { margin: 0; padding: 15px; color: #fff; background: var(--lottery-red); text-align: center; font-family: var(--lottery-display-font); font-size: 27px; font-weight: 800; letter-spacing: -.025em; text-shadow: 0 2px 3px rgba(91,0,25,.27); }
.lottery-schedule-scroll { overflow-x: auto; }
.lottery-schedule { width: 100%; min-width: 720px; border-collapse: collapse; }
.lottery-schedule th, .lottery-schedule td { padding: 12px 9px; border: 1px solid #eeeeef; text-align: center; }
.lottery-schedule thead th { background: #f7f7f8; font-family: var(--lottery-display-font); font-weight: 600; }
.lottery-schedule thead th span { display: block; color: var(--lottery-red); font-weight: 600; }
.lottery-schedule tbody th { min-width: 150px; text-align: left; color: var(--lottery-ink); font-family: var(--lottery-display-font); font-weight: 600; }
.lottery-schedule-pool { display: inline-flex; align-items: center; gap: 8px; }
.lottery-schedule-pool img { width: 34px; height: 34px; flex: 0 0 34px; object-fit: contain; }
.lottery-schedule td i { color: var(--lottery-red); }
.lottery-schedule td span { color: #c8c8cc; }
.lottery-schedule-note { margin: 0; padding: 7px; color: #fff; background: var(--lottery-red); text-align: center; font-size: 12px; }

.lottery-callouts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 34px; }
.lottery-callout { min-height: 175px; padding: 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-radius: 8px; color: #fff; background: linear-gradient(120deg, #fa6a1b, #ed1b2f 50%, #a11769); text-decoration: none; }
.lottery-callout:hover { color: #fff; text-decoration: none; transform: translateY(-2px); }
.lottery-callout-alt { background: linear-gradient(120deg, #ed1b2f, #92166f); }
.lottery-callout span { font-family: var(--lottery-display-font); font-weight: 600; }
.lottery-callout h2 { max-width: 360px; margin: 8px 0 18px; font-family: var(--lottery-display-font); font-size: 28px; line-height: 1.08; font-weight: 600; letter-spacing: -.015em; }
.lottery-callout b { font-family: var(--lottery-display-font); font-weight: 600; }
.lottery-callout > i { font-size: 72px; opacity: .88; }

.lottery-trust { margin-top: 50px; padding: 40px 0; }
.lottery-trust > h2 { text-align: center; font-family: var(--lottery-display-font); font-size: 31px; font-weight: 800; letter-spacing: -.025em; }
.lottery-trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 25px; }
.lottery-trust-grid article { min-height: 200px; padding: 28px; border: 1px solid #e9e9eb; border-radius: 8px; background: #fff; box-shadow: 0 7px 20px rgba(30,30,30,.06); }
.lottery-trust-grid i { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; color: var(--lottery-red); background: #ffe8eb; font-size: 28px; }
.lottery-trust-grid h3 { margin: 18px 0 8px; font-family: var(--lottery-display-font); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.lottery-trust-grid p { margin: 0; color: var(--lottery-muted); }
.lottery-about { display: grid; grid-template-columns: 1fr 1.2fr; min-height: 310px; border: 1px solid #e9e9eb; border-radius: 8px; overflow: hidden; }
.lottery-about-art { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; background: radial-gradient(circle at 25% 25%, rgba(255,255,255,.2), transparent 20%), linear-gradient(145deg, #ed1b2f, #94186e); }
.lottery-about-art span { font-family: var(--lottery-display-font); font-size: 95px; line-height: .9; font-weight: 800; }
.lottery-about-art small { font-family: var(--lottery-display-font); font-size: 24px; font-weight: 600; letter-spacing: .25em; }
.lottery-about > div:last-child { padding: 48px; align-self: center; }
.lottery-about h2 { margin: 7px 0 14px; font-family: var(--lottery-display-font); font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -.015em; }
.lottery-about p { color: var(--lottery-muted); }
.lottery-about a, .lottery-support-grid a { color: var(--lottery-red); font-family: var(--lottery-display-font); font-weight: 600; }
.lottery-support-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 34px; }
.lottery-support-grid article { padding: 36px; border-radius: 8px; text-align: center; background: var(--lottery-surface); }
.lottery-support-grid article > i { color: var(--lottery-red); font-size: 55px; }
.lottery-support-grid h2 { margin: 18px 0 8px; font-family: var(--lottery-display-font); font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.lottery-support-grid p { color: var(--lottery-muted); }
.lottery-footer { padding: 36px 8%; color: #fff; background: linear-gradient(110deg, #f04b25, #ed1b2f 45%, #90156d); text-align: center; }
.lottery-footer img { width: 135px; filter: brightness(0) invert(1); }
.lottery-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; margin: 22px 0 15px; }
.lottery-footer a { color: #fff; font-family: var(--lottery-display-font); font-weight: 600; }
.lottery-footer p { margin: 0; font-size: 12px; opacity: .85; }

@media (max-width: 991px) {
    .lottery-pools { min-height: 340px; }
    .lottery-pool-card { min-width: 80px; flex-basis: 80px; }
    .lottery-pool-tab { width: 80px; flex-basis: 80px; }
    .lottery-pool-tab strong { writing-mode: vertical-rl; }
    .lottery-pool-detail { grid-template-columns: minmax(0, 1fr) 160px; column-gap: 16px; padding: 30px 25px; }
    .lottery-ball { width: 160px; height: 160px; }
    .lottery-ball span { font-size: 48px; }
}

@media (max-width: 767px) {
    .lottery-home-content { width: calc(100% - 28px); padding-top: 34px; }
    .lottery-hero { min-height: 0; }
    .lottery-hero .carousel-item img { height: auto; }
    .lottery-heading-row { align-items: flex-start; }
    .lottery-heading-row h1 { font-size: 33px; line-height: 1.04; }
    .lottery-eyebrow { font-size: 12px; letter-spacing: .085em; }
    .lottery-balance { min-width: auto; padding: 7px 10px; }
    .lottery-balance span { font-size: 10px; }
    .lottery-balance strong { font-size: 14px; }
    .lottery-pools { min-height: 0; display: block; overflow: visible; padding-top: 0; border-radius: 8px; box-shadow: none; }
    .lottery-pool-card, .lottery-pool-card.is-active { width: 100%; min-width: 0; min-height: 88px; display: block; overflow: hidden; margin-left: 0; border: 0; border-radius: 13px; box-shadow: 0 -7px 16px rgba(75,0,20,.13); transition: box-shadow .4s ease; }
    .lottery-pool-card + .lottery-pool-card { margin-top: -10px; }
    .lottery-pool-card:last-child { border-radius: 13px; }
    .lottery-pool-tab { width: 100%; min-height: 88px; padding: 14px 20px 14px 18px; display: flex; flex-direction: row; justify-content: space-between; border: 0; }
    .lottery-pool-logo { width: 64px; height: 58px; padding: 3px; border-radius: 10px; }
    .lottery-pool-code { font-size: 42px; }
    .lottery-pool-tab strong { max-width: 58%; font-size: 19px; line-height: 1.05; writing-mode: horizontal-tb; text-align: right; }
    .lottery-pool-detail { display: grid; min-height: 0; max-height: 0; grid-template-columns: minmax(0, 1fr) 128px; grid-template-rows: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 22px; padding: 0 28px; align-items: center; opacity: 0; visibility: hidden; transform: translateY(-12px); transition: max-height .46s cubic-bezier(.22,.75,.22,1), padding .46s cubic-bezier(.22,.75,.22,1), opacity .25s ease, transform .46s cubic-bezier(.22,.75,.22,1), visibility 0s linear .46s; }
    .lottery-pool-card.is-active .lottery-pool-detail { min-height: 0; max-height: 500px; padding: 30px 28px 25px; opacity: 1; visibility: visible; transform: translateY(0); transition: max-height .46s cubic-bezier(.22,.75,.22,1), padding .46s cubic-bezier(.22,.75,.22,1), opacity .3s ease .08s, transform .46s cubic-bezier(.22,.75,.22,1), visibility 0s linear 0s; }
    .lottery-pool-copy { max-width: none; align-self: center; }
    .lottery-pool-copy > span { font-size: 13px; }
    .lottery-pool-copy h2 { font-size: clamp(30px, 8.5vw, 38px); line-height: 1; }
    .lottery-pool-copy p { font-size: 17px; }
    .lottery-pool-copy p b { font-size: 22px; }
    .lottery-play-button { min-height: 46px; font-size: 16px; }
    .lottery-schedule-section > h2 { font-size: 25px; }
    .lottery-ball { width: 128px; height: 128px; grid-column: 2; grid-row: 1; opacity: .9; transition: transform .46s cubic-bezier(.22,.75,.22,1), opacity .3s ease; }
    .lottery-pool-card:not(.is-active) .lottery-ball { opacity: 0; transform: rotate(-8deg) scale(.78); }
    .lottery-pool-actions { width: 100%; grid-column: 1 / -1; grid-row: 2; flex-direction: column; }
    .lottery-play-button, .lottery-result-button { width: 100%; min-width: 0; }
    .lottery-schedule-section { margin-top: 28px; }
    .lottery-callouts, .lottery-trust-grid, .lottery-support-grid { grid-template-columns: 1fr; }
    .lottery-callout { min-height: 160px; padding: 22px; }
    .lottery-callout h2 { font-size: 25px; }
    .lottery-callout > i { font-size: 55px; }
    .lottery-trust { margin-top: 25px; }
    .lottery-about { grid-template-columns: 1fr; }
    .lottery-about-art { min-height: 210px; }
    .lottery-about > div:last-child { padding: 30px; }
    .lottery-footer { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
}
