/* Reference-led home. The supplied PNG is shared by the banner and icon viewBoxes. */
.home-art { display: block; width: 100%; height: 100%; overflow: hidden; }
.reference-home .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body[data-page="home"] { background: #f1f8fc; }
body[data-page="home"] .container { margin-top: 0; }
body[data-page="home"] .masthead {
  position: relative; isolation: isolate; border: 0; color: white;
  background: linear-gradient(120deg, #00a9af, #00c8bb 58%, #009b9c);
}
body[data-page="home"] .masthead::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(135deg, transparent 53%, #ffffff14 53% 72%, transparent 72%);
}
body[data-page="home"] .header-button { color: white; }
body[data-page="home"] .header-button:hover { background: #ffffff1a; }
body[data-page="home"] .notification-dot { box-shadow: none; background: #ff3e4a; }
.reference-home { --home-ink: #062f3c; display: grid; gap: 12px; color: var(--home-ink); }
.home-wallet {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid white; border-radius: var(--card-radius); background: #fffffffc;
  box-shadow: 0 7px 20px #075b7115;
}
.home-wallet-main { min-width: 0; }
.home-wallet-label { display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px; font-size: var(--type-label); font-weight: 700; line-height: 1.3; }
.home-wallet-tools { display: inline-flex; flex: 0 0 auto; }
.home-wallet-tools .icon-button { width: 24px; height: 24px; }
.home-wallet-tools .icon { width: 15px; height: 15px; }
.home-wallet-amount p { display: flex; align-items: baseline; gap: 1px; margin-top: 2px; font-size: clamp(1.375rem, 5.8vw, 2rem); line-height: 1.12; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.home-wallet-amount p > span { font-size: .85em; font-weight: 800; }
.home-wallet-amount strong { min-width: 0; font-weight: 850; overflow-wrap: anywhere; }
.home-wallet-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.home-wallet-actions .button {
  min-width: 0; min-height: 36px; padding: 5px 10px; border-radius: 24px;
  font-size: var(--type-label); font-weight: 750; line-height: 1.25; text-align: center; white-space: normal; overflow-wrap: anywhere;
}
.home-wallet-actions .button-lime { background: #c5f900; color: #06313b; }
.home-wallet-actions .button-outline { border: 1.5px solid #0a3245; background: transparent; }
.home-promo { position: relative; isolation: isolate; overflow: hidden; width: 100%; aspect-ratio: 817 / 240; border-radius: 18px; background: #008f95; }
.home-promo-image { display: block; width: 100%; height: 100%; }
.home-promo-image:focus-visible { outline-offset: -4px; outline-color: #c8f900; }
.home-promo-copy { position: relative; z-index: 1; padding: 5% 4.5%; max-width: 70%; color: white; }
.home-promo-copy > span { font-size: 12px; font-weight: 700; }
.home-promo-copy h1 { font-size: var(--type-page); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.home-promo-copy h1 strong { margin-left: 5px; color: #d8f800; }
.home-promo-copy p { font-size: 12px; margin-top: 6px; }
.home-promo-copy .button { min-height: 30px; padding: 4px 15px; margin-top: 9px; font-size: 12px; border-radius: 24px; }
.home-promo-photo { position: absolute; inset: 0 0 0 auto; width: 50%; z-index: 0; mask-image: linear-gradient(90deg, transparent, #000 30%); }
.home-promo-photo img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .72; }
.home-promo-dots { position: absolute; z-index: 2; display: flex; gap: 2px; left: 50%; bottom: 5%; transform: translateX(-50%); }
.home-promo-dots button { display: grid; place-items: center; padding: 0; width: 16px; height: 16px; border-radius: 8px; }
.home-promo-dots button::before { content: ""; width: 6px; height: 6px; border-radius: 5px; background: #ffffff60; }
.home-promo-dots button[aria-pressed="true"]::before { width: 12px; background: white; }
.home-promo-reference .home-promo-dots { width: 11%; gap: 0; bottom: 3%; }
.home-promo-reference .home-promo-dots button { flex: 1; }
.home-promo-reference .home-promo-dots button::before { display: none; }
.home-promo-dots button:focus-visible { outline-color: white; outline-offset: 0; }
.home-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 10px 0; background: white; border-radius: 20px; box-shadow: 0 6px 20px #2e789b0b; }
.home-shortcuts a { position: relative; display: grid; align-content: start; justify-items: center; gap: 3px; min-height: 65px; padding: 4px 3px; font-size: var(--type-label); font-weight: 750; line-height: 1.3; }
.home-shortcuts a + a::before { content: ""; position: absolute; left: 0; top: 10%; bottom: 10%; border-left: 1px solid #dfe9ef; }
.home-shortcuts a:hover { color: #008e91; }
.home-shortcuts .home-art { width: 48px; height: 34px; }
.home-lottery-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.home-lottery-card { display: grid; grid-template-columns: 66px minmax(0, 1fr) 74px; gap: 9px; align-items: center; min-width: 0; padding: 7px; background: #fff; border: 1px solid #ffffff; border-radius: 18px; box-shadow: 0 5px 18px #357ba30b; }
.home-lottery-art { width: 100%; aspect-ratio: 148 / 108; overflow: hidden; border-radius: 11px; }
.home-lottery-art > .hall-game-icon { width: 100%; height: 100%; border-radius: inherit; }
.home-lottery-info { min-width: 0; }
.home-lottery-title { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 5px; }
.home-lottery-title h3 { font-size: 16px; line-height: 1.25; font-weight: 850; letter-spacing: -.045em; }
.home-game-badge { padding: 1px 7px; border-radius: 20px; background: #d1f8f1; color: #005b61; font-size: 11px; font-weight: 800; line-height: 1.35; white-space: nowrap; }
.home-lottery-meta { margin-top: 3px; color: #6d747c; font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.home-lottery-numbers { display: flex; align-items: center; gap: 4px; margin-top: 5px; min-height: 20px; }
.home-lottery-numbers .ball { width: 20px; height: 20px; font-size: 12px; font-weight: 850; letter-spacing: -.04em; box-shadow: inset 0 -1px 2px #008a9f26; background: radial-gradient(circle at 35% 24%, #6bfff3, #08dcce 54%, #00b4b6); }
.home-lottery-numbers .ball-lime { background: linear-gradient(145deg, #dcff00, #abec00); box-shadow: none; }
.home-number-plus { color: #355b6a; font-size: 14px; line-height: 1; }
.home-awaiting { color: #6d7e84; font-size: 12px; }
.home-lottery-actions { display: grid; align-content: center; justify-items: stretch; gap: 5px; min-height: 46px; padding-left: 8px; border-left: 1px solid #e4ecf2; }
.home-lottery-actions .timer { justify-content: center; gap: 2px; color: #062f3c; font-size: 20px; font-weight: 850; }
.home-lottery-actions .timer span { min-width: 23px; padding: 3px 2px; border-radius: 7px; background: #ddf8f7; color: inherit; }
.home-lottery-actions .timer:has(span:nth-of-type(3)) { font-size: 13px; gap: 1px; }
.home-lottery-actions .timer:has(span:nth-of-type(3)) span { min-width: 16px; padding-inline: 1px; }
.home-lottery-actions .button { min-height: 28px; width: 100%; padding: 3px 8px; border-radius: 22px; font-size: 14px; font-weight: 800; background: linear-gradient(115deg, #006970, #00515a); }
.home-lottery-actions .button[data-closed="true"] { color: #767d85; background: #e0e3e8; }
.home-all-games { display: flex; justify-content: center; align-items: center; gap: 4px; padding: 5px; color: #497b89; font-size: 13px; }
.home-all-games .icon { width: 15px; height: 15px; }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; min-height: 32px; margin-bottom: 6px; }
.home-section-heading h2 { display: flex; align-items: center; gap: 7px; font-size: var(--type-section); font-weight: 750; line-height: 1.35; }
.home-popular > .home-section-heading h2::before { content: ""; width: 3px; height: 16px; border-radius: 3px; background: #00c5b9; }
.home-section-heading > a { display: inline-flex; align-items: center; gap: 1px; color: #4e7782; font-size: 12px; white-space: nowrap; }
.home-section-heading > a .icon { width: 14px; height: 14px; }
.home-announcement { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 3px 10px; min-height: 38px; border: 1px solid #ddedf0; border-radius: 13px; background: #fff; }
.home-announcement-label { display: inline-flex; align-items: center; gap: 5px; color: #007c79; font-size: 12px; font-weight: 750; white-space: nowrap; }
.home-announcement-label .icon { width: 18px; height: 18px; }
.home-announcement-window { min-width: 0; overflow: hidden; container-type: inline-size; }
.home-announcement-window > a { display: block; min-height: 30px; line-height: 30px; color: #456a75; font-size: 12px; }
.home-announcement-track { display: block; width: max-content; white-space: nowrap; animation: home-notice-left 26s linear infinite; animation-delay: -8s; }
.home-motion-button { min-width: 34px; min-height: 30px; padding: 3px 4px; border-radius: 8px; color: #507c84; font-size: 12px; }
.home-motion-button:hover { color: #007c79; background: #e7f9f6; }
.home-prizes { overflow: hidden; padding: 12px 14px; border: 1px solid #e3edf0; border-radius: 18px; background: #fff; }
.home-prizes .home-section-heading { margin: 0 0 7px; }
.home-prizes h2 { font-size: 18px; }
.home-prizes h2 .icon { width: 21px; height: 21px; color: #d99b29; }
.home-prize-window { height: calc(var(--prize-visible) * 52px); overflow: hidden; }
.home-prize-track.is-moving { animation: home-prize-down var(--prize-duration) linear infinite; }
.home-prize-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 20px 16px; align-content: center; gap: 1px 12px; height: 52px; border-top: 1px solid #eef3f5; font-size: 13px; }
.home-prize-row small { color: #6f8590; font-size: 12px; }
.home-prize-row strong { grid-column: 2; grid-row: 1 / 3; align-self: center; padding: 3px 10px; border-radius: 15px; background: #f0facf; color: #2d591f; font-size: 16px; font-variant-numeric: tabular-nums; }
.home-prize-empty { display: flex; align-items: center; gap: 12px; min-height: 76px; color: #557480; border-top: 1px solid #edf3f5; }
.home-prize-empty > .icon { width: 31px; height: 31px; color: #a5bdc1; }
.home-prize-empty strong { font-size: 14px; font-weight: 600; }
.home-prize-empty p { margin-top: 3px; font-size: 12px; color: #7d949a; }
.home-official-links { padding: 15px 8px 7px; color: #75858e; text-align: center; }
.home-official-logos { display: flex; align-items: stretch; justify-content: center; gap: 28px; }
.home-official-logos a { display: grid; align-content: center; justify-items: center; gap: 3px; width: 150px; padding: 8px; border-radius: 12px; background: white; }
.home-official-logos a:hover { box-shadow: 0 0 0 1px #bddfdf; }
.home-official-logos img { display: block; width: auto; height: 54px; max-width: 100%; object-fit: contain; }
.home-official-logos strong { font-size: 13px; color: #315973; letter-spacing: .04em; }
.home-official-logos span { font-size: 11px; line-height: 1.4; }
.home-official-links > p { margin: 10px auto 0; max-width: 42em; font-size: 11px; line-height: 1.7; }
[data-home-motion-area][data-paused="true"] .home-announcement-track,
[data-home-motion-area][data-paused="true"] .home-prize-track,
.home-announcement-window:focus-within .home-announcement-track { animation-play-state: paused; }
@media (hover: hover) {
  .home-announcement:hover .home-announcement-track, .home-prizes:hover .home-prize-track { animation-play-state: paused; }
}
@keyframes home-notice-left { from { transform: translateX(100cqw); } to { transform: translateX(-100%); } }
@keyframes home-prize-down { from { transform: translateY(var(--prize-distance)); } to { transform: translateY(0); } }

@media (max-width: 1023px) {
  body[data-page="home"] { background: #f1f8fc; --mobile-gutter: 16px; }
  body[data-page="home"] .page-scroll {
    scrollbar-gutter: auto;
    background: linear-gradient(115deg, #00a9af, #00c8bb 58%, #009b9c) top / 100% 112px no-repeat, #f1f8fc;
    background-attachment: local;
  }
  body[data-page="home"] .masthead { background: transparent; }
  body[data-page="home"] .masthead-inner { min-height: 64px; }
  body[data-page="home"] .brand { flex: 0 1 125px; min-width: 0; }
  body[data-page="home"] .brand img { width: 125px; max-width: 100%; }
  body[data-page="home"] .header-tools { gap: 9px; }
  body[data-page="home"] .header-button { padding: 2px; min-width: 31px; min-height: 44px; font-size: 12px; gap: 1px; }
  body[data-page="home"] .header-button[data-open-language] { min-width: 44px; }
  body[data-page="home"] .header-button .icon { width: 22px; height: 22px; stroke-width: 1.7; }
  body[data-page="home"] .header-button .notification-dot { width: 7px; height: 7px; top: 2px; right: 0; }
  body[data-page="home"] .container { padding-bottom: 23px; }
  body[data-page="home"] .site-footer { padding-top: 0; padding-bottom: 22px; font-size: 12px; }
}

@media (max-width: 599px) {
  .reference-home { gap: 7px; }
  body[data-page="home"] .masthead-inner { min-height: 56px; }
  .home-promo { border-radius: 16px; }
  .home-shortcuts { padding: 6px 0; border-radius: 18px; }
  .home-shortcuts a { min-height: 48px; gap: 1px; font-size: 13px; }
  .home-shortcuts .home-art { width: 37px; height: 26px; }
  .home-lottery-list { gap: 5px; }
  .home-lottery-card { min-height: 64px; padding: 5px 6px; gap: 7px; grid-template-columns: 64px minmax(0, 1fr) 72px; border-radius: 17px; }
  .home-lottery-title { gap: 2px 4px; }
  .home-lottery-title h3 { font-size: 14px; line-height: 1.2; }
  .home-game-badge { font-size: 10px; padding: 1px 6px; line-height: 1.2; }
  .home-lottery-meta { margin-top: 2px; font-size: 11px; line-height: 1.2; }
  .home-lottery-numbers { gap: 3px; margin-top: 3px; min-height: 18px; }
  .home-lottery-numbers .ball { width: 18px; height: 18px; font-size: 11px; }
  .home-lottery-actions { gap: 4px; padding-left: 7px; }
  .home-lottery-actions .timer { font-size: 19px; line-height: 1; }
  .home-lottery-actions .timer span { min-width: 22px; padding: 2px; }
  .home-lottery-actions .button { min-height: 25px; padding: 2px 7px; font-size: 13px; }
}

@media (max-width: 365px) {
  body[data-page="home"] { --mobile-gutter: 12px; }
  body[data-page="home"] .header-tools > a.header-button { min-width: 44px; }
  body[data-page="home"] .header-tools > a.header-button > span { display: none; }
  .reference-home { gap: 10px; }
  .home-shortcuts { padding-block: 7px; }
  .home-shortcuts a { min-height: 48px; }
  .home-lottery-card { grid-template-columns: 52px minmax(0, 1fr) 64px; gap: 6px; padding: 6px; border-radius: 15px; }
  .home-lottery-title { gap: 3px; }
  .home-lottery-title h3 { font-size: 14px; }
  .home-game-badge { font-size: 10px; padding-inline: 5px; }
  .home-lottery-meta { font-size: 11px; }
  .home-lottery-numbers { gap: 2px; margin-top: 3px; }
  .home-lottery-numbers .ball { width: 16px; height: 16px; font-size: 10px; }
  .home-lottery-actions { padding-left: 5px; }
  .home-lottery-actions .timer { font-size: 17px; }
  .home-lottery-actions .timer span { min-width: 20px; }
}

@media (min-width: 600px) and (max-width: 1023px) {
  .reference-home { gap: 16px; }
  .home-wallet { padding: 18px 24px; }
  .home-shortcuts a { min-height: 60px; }
  .home-shortcuts .home-art { width: 48px; height: 34px; }
  .home-lottery-card { grid-template-columns: 100px minmax(0, 1fr) 120px; padding: 12px; gap: 16px; }
  .home-lottery-title h3 { font-size: 21px; }
  .home-game-badge { font-size: 13px; }
  .home-lottery-meta { font-size: 14px; }
  .home-lottery-numbers .ball { width: 27px; height: 27px; font-size: 15px; }
  .home-lottery-actions .timer { font-size: 25px; }
  .home-lottery-actions .button { min-height: 38px; font-size: 17px; }
}

@media (min-width: 1024px) and (max-width: 1249px) {
  body[data-page="home"] .header-button {
    flex-direction: column; justify-content: center; gap: 1px;
    min-height: 44px; padding-inline: 5px; font-size: 12px;
  }
}

@media (min-width: 1024px) {
  body[data-page="home"] .masthead { position: sticky; }
  body[data-page="home"] .desktop-navigation { background: white; }
  body[data-page="home"] .container { margin-top: 20px; }
  .reference-home { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; }
  .home-wallet { grid-column: 2; grid-row: 1; align-content: center; justify-content: center; }
  .home-wallet-main { width: 100%; }
  .home-promo { grid-column: 1; grid-row: 1; }
  .home-promo-copy > span { font-size: 14px; }
  .home-promo-copy p { font-size: 14px; }
  .home-promo-copy .button { min-height: 36px; font-size: 14px; }
  .home-shortcuts { grid-column: 1 / -1; padding-block: 8px; }
  .home-shortcuts a { min-height: 62px; }
  .home-shortcuts .home-art { width: 48px; height: 34px; }
  .home-announcement, .home-popular, .home-prizes, .home-official-links { grid-column: 1 / -1; }
  .home-announcement { min-height: 44px; }
  .home-announcement-label, .home-announcement-window > a { font-size: 14px; }
  .home-prizes { padding: 18px 22px; }
  .home-lottery-list { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .home-lottery-card { grid-template-columns: 86px minmax(0, 1fr) 95px; padding: 12px; gap: 13px; min-height: 102px; }
  .home-lottery-title h3 { font-size: 19px; }
  .home-game-badge { font-size: 12px; }
  .home-lottery-meta { font-size: 13px; margin-top: 5px; }
  .home-lottery-numbers .ball { width: 24px; height: 24px; font-size: 14px; }
  .home-lottery-actions .timer { font-size: 23px; }
  .home-lottery-actions .button { min-height: 34px; font-size: 16px; }
  .home-all-games { grid-column: 1 / -1; font-size: 15px; }
}

html:not(:lang(zh)) .home-lottery-title h3 { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  .home-announcement-track { animation-duration: 52s; }
  .home-prize-track.is-moving { animation-duration: calc(var(--prize-duration) * 2); }
}

/* Fluid tracks must be allowed to shrink below the artwork's intrinsic width. */
.container, .inner-page { min-width: 0; }
.reference-home { grid-template-columns: minmax(0, 1fr); }
.reference-home > *, .home-lottery-list > * { min-width: 0; }
.home-official-logos {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%; max-width: 420px; margin-inline: auto; gap: clamp(10px, 3vw, 28px);
}
.home-official-logos a { width: auto; min-width: 0; }
.home-official-logos span { max-width: 100%; overflow-wrap: anywhere; }
.home-official-logos img { max-width: 100%; }
.home-shortcuts a > span { max-width: 100%; overflow-wrap: anywhere; text-wrap: balance; text-align: center; }
.home-lottery-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.reference-home .home-lottery-card { display: block; container-type: inline-size; min-width: 0; min-height: 0; padding: 0; border-radius: var(--card-radius); }
.home-lottery-layout {
  display: grid; grid-template-columns: clamp(44px, 14%, 60px) minmax(0, 1fr) clamp(68px, 20%, 92px);
  align-items: center; gap: 9px; min-width: 0; padding: 10px;
}
.home-lottery-layout > * { min-width: 0; }
.home-lottery-title { gap: 4px 6px; }
.home-lottery-title h3 { width: auto; font-size: var(--type-card); line-height: 1.35; letter-spacing: -.02em; overflow-wrap: anywhere; }
.home-game-badge { padding: 2px 6px; font-size: .6875rem; line-height: 1.3; }
.home-lottery-meta { margin-top: 4px; font-size: .75rem; line-height: 1.5; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.home-lottery-numbers { flex-wrap: wrap; gap: 3px; min-height: 20px; margin-top: 4px; }
.home-lottery-numbers .ball { width: 20px; height: 20px; font-size: .75rem; }
.home-lottery-actions { gap: 7px; padding-left: 8px; }
.home-lottery-actions .timer { font-size: 1rem; line-height: 1; }
.home-lottery-actions .timer span { min-width: 22px; padding: 3px 2px; }
.home-lottery-actions .button { min-height: 34px; padding: 4px 6px; font-size: .875rem; }
.home-promo { min-height: clamp(130px, 18vw, 204px); aspect-ratio: auto; border-radius: var(--card-radius); background: linear-gradient(115deg, #00757e, #009d9e 72%, #00b5ad); }
.home-promo-image { position: relative; min-height: inherit; }
.home-promo-text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; width: 68%; min-width: 0; padding: clamp(16px, 2.5vw, 32px) clamp(14px, 2.5vw, 32px) 35px; }
.home-promo-text h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .18em; max-width: 100%; font-size: clamp(1.1875rem, 4.7vw, 1.875rem); font-weight: 800; line-height: 1.25; }
.home-promo-text h1 > span { color: white; overflow-wrap: anywhere; }
.home-promo-text h1 strong { color: #e2fa00; font-size: 1.08em; }
html:not(:lang(zh)) .home-promo-text { width: 62%; }
html:not(:lang(zh)) .home-promo-visual { width: min(43%, 292px); }
.home-promo-text p { margin-top: 7px; max-width: 100%; color: #e5fffd; font-size: clamp(.75rem, 1.6vw, .9375rem); line-height: 1.5; }
.home-promo-cta { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-height: 32px; margin-top: 11px; padding: 4px 13px; border-radius: 24px; background: #d0f900; color: #06373c; font-size: .875rem; font-weight: 800; }
.home-promo-cta .icon { width: 16px; height: 16px; }
.home-promo-visual {
  position: absolute; right: 0; top: 9%; width: min(46%, 292px); height: 82%; pointer-events: none;
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%, 0 46%, 12% 46%);
  mask-image: linear-gradient(90deg, transparent, #000 16% 88%, transparent), linear-gradient(0deg, transparent, #000 14% 88%, transparent);
  mask-composite: intersect;
}
.home-promo-reference .home-promo-dots { width: auto; gap: 3px; bottom: 4px; }
.home-promo-reference .home-promo-dots button { flex: 0 0 24px; width: 24px; height: 24px; }
.home-promo-reference .home-promo-dots button::before { display: block; }
.home-section-heading { flex-wrap: wrap; }

@container (max-width: 320px) {
  .home-lottery-layout { grid-template-columns: 42px minmax(0, 1fr) 68px; column-gap: 8px; row-gap: 4px; padding: 10px; }
  .home-lottery-art { grid-column: 1; grid-row: 1 / 4; }
  .home-lottery-info { display: contents; }
  .home-lottery-title { grid-column: 2; grid-row: 1; }
  .home-lottery-title h3 { font-size: .9375rem; }
  .home-lottery-meta { grid-column: 2; grid-row: 2; margin: 0; }
  .home-lottery-numbers { grid-column: 2 / 4; grid-row: 3; margin-top: 3px; }
  .home-lottery-actions { grid-column: 3; grid-row: 1 / 3; }
}
@container (min-width: 321px) and (max-width: 380px) {
  .home-lottery-title h3 { font-size: .9375rem; }
  .home-lottery-numbers { gap: 2px; }
  .home-lottery-numbers .ball { width: 19px; height: 19px; }
}
@container (min-width: 520px) {
  .home-lottery-title h3 { font-size: 1rem; }
  .home-lottery-numbers .ball { width: 22px; height: 22px; font-size: .8125rem; }
}
@media (max-width: 1023px) {
  .page-scroll { min-width: 0; min-height: 0; scrollbar-width: thin; scroll-padding-block-end: 20px; }
  body[data-page="home"] .container { padding-bottom: 28px; }
}
@media (max-width: 359px) {
  .home-wallet { grid-template-columns: minmax(0, 1fr) minmax(0, 53%); gap: 6px; padding: 10px; }
  .home-wallet-label, .home-wallet-actions .button { font-size: .75rem; }
  .home-wallet-actions .button { padding-inline: 6px; }
  .home-announcement { gap: 5px; padding-inline: 8px; }
  .home-announcement-label { gap: 3px; }
}
@media (max-width: 299px) {
  .home-wallet { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1024px) {
  body[data-page="home"] { background: #f2f7f7; }
  body[data-page="home"] .masthead { background: linear-gradient(105deg, #073e43, #09635f); }
  body[data-page="home"] .masthead::before { display: none; }
  body[data-page="home"] .header-tools :is(.header-wallet, [href="#deposit"], [href="#withdraw"], [href="#account/tickets"]) { display: none; }
  .reference-home {
    grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
    grid-template-rows: auto auto auto auto 1fr;
    grid-template-areas: "promo wallet" "notice notice" "popular shortcuts" "popular prizes" "popular standards";
    align-items: start;
    gap: 16px 20px;
  }
  .home-promo {
    grid-area: promo; align-self: stretch; min-height: 224px;
    background: radial-gradient(ellipse at 83% 100%, #00b9ad, transparent 58%), linear-gradient(105deg, #00545b, #00888a 76%, #0ba69d);
  }
  .home-promo-text, html:not(:lang(zh)) .home-promo-text, .home-promo-copy {
    justify-content: center; width: 61%; max-width: none; min-height: inherit; padding: 27px 32px 40px;
  }
  .home-promo-text h1, .home-promo-copy h1 { font-size: clamp(1.9rem, 3vw, 2.75rem); line-height: 1.08; letter-spacing: -.035em; }
  .home-promo-text p, .home-promo-copy p { margin-top: 10px; font-size: .9375rem; }
  .home-promo-cta, .home-promo-copy .button { min-height: 36px; margin-top: 16px; padding-inline: 17px; }
  .home-promo-visual, html:not(:lang(zh)) .home-promo-visual {
    top: 50%; right: 1%; width: 44%; height: auto; aspect-ratio: 360 / 220; transform: translateY(-50%); clip-path: none;
    mask-image: linear-gradient(112deg, transparent 12%, #000 26%), linear-gradient(90deg, transparent, #000 12% 90%, transparent), linear-gradient(0deg, transparent, #000 15% 86%, transparent);
  }
  .home-promo-dots, .home-promo-reference .home-promo-dots { left: 32px; bottom: 5px; transform: none; }
  .home-wallet {
    grid-area: wallet; align-self: stretch; align-content: center; grid-template-columns: minmax(0, 1fr);
    padding: 20px 24px; gap: 14px; border: 1px solid #cddfdd; border-radius: var(--card-radius);
    background: linear-gradient(135deg, #fff 55%, #edf8f3); box-shadow: none;
  }
  .home-wallet-label { color: #43656a; font-size: .875rem; }
  .home-wallet-amount p { font-size: clamp(2rem, 2.8vw, 2.65rem); }
  .home-wallet-actions .button { min-height: 40px; }
  .home-wallet-history { display: flex; align-items: center; gap: 8px; padding-top: 11px; border-top: 1px solid #dbe8e4; color: #316761; font-size: .8125rem; font-weight: 700; }
  .home-wallet-history .icon { width: 16px; height: 16px; }
  .home-wallet-history .icon:last-child { margin-inline-start: auto; }
  .home-wallet-history:hover { text-decoration: underline; }
  .home-announcement { grid-area: notice; }
  .home-popular { grid-area: popular; }
  .home-section-heading { min-height: 32px; margin-bottom: 12px; }
  .home-section-heading > a { font-size: .875rem; }
  .home-lottery-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .reference-home .home-lottery-card { border-color: #dce8e7; box-shadow: 0 3px 12px #17474a08; }
  .home-lottery-layout {
    height: 100%; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto 1fr auto;
    align-content: start; column-gap: 12px; row-gap: 9px; padding: 16px;
  }
  .home-lottery-art { align-self: start; grid-column: 1; grid-row: 1 / 3; }
  .home-lottery-info { display: contents; }
  .home-lottery-title { grid-column: 2; grid-row: 1; }
  .home-lottery-title h3 { font-size: 1.0625rem; }
  .home-lottery-meta { grid-column: 2; grid-row: 2; align-self: start; margin: -5px 0 0; }
  .home-lottery-numbers { grid-column: 1 / -1; grid-row: 3; min-height: 24px; gap: 4px; margin: 0; }
  .home-lottery-numbers .ball { width: 24px; height: 24px; font-size: .8125rem; }
  .home-lottery-actions {
    grid-column: 1 / -1; grid-row: 4; display: flex; align-items: center; justify-content: space-between;
    min-height: 0; margin-top: 2px; padding: 9px 0 0; border: 0; border-top: 1px solid #e6eeec;
  }
  .home-history-link { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; margin-inline-start: auto; color: #376862; font-size: .8125rem; font-weight: 650; }
  .home-history-link:hover { text-decoration: underline; }
  .home-history-link .icon { flex-shrink: 0; width: 15px; height: 15px; }
  .home-lottery-actions .button { width: auto; min-width: 72px; padding-inline: 13px; }
  .home-shortcuts, .home-prizes, .home-official-links { border: 1px solid #dce8e7; border-radius: var(--card-radius); background: white; box-shadow: none; }
  .home-shortcuts { grid-area: shortcuts; padding: 10px; gap: 4px; }
  .home-shortcuts a { min-height: 70px; gap: 4px; border-radius: 10px; }
  .home-shortcuts a:hover { background: #f1f8f6; }
  .home-shortcuts a + a::before { display: none; }
  .home-prizes { grid-area: prizes; padding: 16px; }
  .home-official-links { grid-area: standards; padding: 16px; }
}
.home-content-slot, .notice-content-slot { display: contents; }
.home-promo:has(.home-promo-managed-image) .home-promo-copy { max-width: 67%; }
.home-promo-managed-image { position: absolute; inset: 5% 2% 8% auto; width: 32%; height: 87%; object-fit: contain; pointer-events: none; }
.home-promo .home-promo-copy[data-authored-copy] { overflow-wrap: anywhere; padding-block-end: 28px; }
.notice-managed-image { display: block; max-width: 100%; width: auto; max-height: 260px; object-fit: contain; }

.home-lottery-meta a { color: #096966; font-weight: 650; text-decoration: underline; text-decoration-color: #91c9c4; text-underline-offset: 3px; }
