[data-lp-game] .ls-game-intro {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: clamp(168px, 25vw, 222px);
  padding: clamp(16px, 4vw, 34px);
  overflow: hidden;
  border-color: color-mix(in srgb, var(--lottery-accent) 33%, #26362d);
  background: #111c16;
}
[data-lp-game] .ls-game-intro img {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 auto;
  width: 66%;
  height: 100%;
  object-fit: cover;
  object-position: center 51%;
  border-radius: 0;
}
[data-lp-game] .ls-game-intro::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, #111c16 28%, #111c16ec 39%, #111c1638 69%, #0a130b13),
    linear-gradient(0deg, #070e0a81, transparent 44%);
}
[data-lp-game] .ls-game-intro > div { width: min(50%, 360px); }
[data-lp-game] .ls-game-intro p:not(.ls-jackpot) { line-height: 1.48; margin-block: 8px 5px; }
[data-lp-game] .ls-jackpot { text-shadow: 0 3px 16px #0009; }
[data-lp-game] .ls-numbers button, [data-lp-game] .ls-cover, [data-lp-game] .ls-choice {
  transition: transform .16s ease-out, background-color .16s ease-out, border-color .16s ease-out;
}
[data-lp-game] :is(.ls-numbers button, .ls-cover, .ls-choice):active { transform: scale(.97); }

.lp-draw-board {
  --lp-ball-size: 42px;
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid #48594a;
  border-radius: 9px;
  padding: 12px;
  background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--lottery-accent) 12%, transparent), transparent 64%), #131f19;
}
.lp-draw-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lp-draw-board h5 { margin: 0; color: var(--ls-muted); font-size: .85rem; }
.lp-draw-head span, .lp-tally { color: var(--ls-muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.lp-draw-board .lp-tally b { color: var(--lottery-accent); }
.lp-draw-slots, .lp-picked { min-width: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.lp-picked { align-items: center; }
.lp-ball, .lp-mark {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: var(--lp-ball-size);
  height: var(--lp-ball-size);
  flex: 0 0 auto;
  border: 1px solid #74826f;
  border-radius: 50%;
  font-size: clamp(.76rem, 2.6vw, 1rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #14261f;
  background: radial-gradient(circle at 35% 25%, #fff9e9, #dfe8d7 54%, #89a495 100%);
}
.lp-ball b { font: inherit; }
.lp-ball[data-lp-empty], .lp-mark { color: #e5e9d9; background: #26332b; }
.lp-ball[data-lp-empty] { color: #aebdae; border-style: dashed; }
.lp-mark { height: 32px; border-radius: 5px; }
.lp-mark[data-lp-hit] {
  border-color: var(--lottery-accent);
  color: #101a11;
  background: var(--lottery-accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--lottery-accent) 28%, transparent);
}
.lp-special { border-color: #e4aa53; }
.lp-ball.lp-special:not([data-lp-empty]) { color: #39200a; background: radial-gradient(circle at 34% 24%, #fff7c1, #ffc354 49%, #9d6524 100%); }
.lp-ball[data-lp-arrived] { animation: lp-ball-drop .28s cubic-bezier(.19,.8,.24,1) both; }
.lp-special[data-lp-arrived]::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(112deg, transparent 20%, #fff8dcb3 49%, transparent 70%);
  animation: lp-shine .48s ease-out both;
}
.lp-draw-footer { display: grid; gap: 8px; justify-items: start; }
.lp-draw-footer .ls-result { width: 100%; }
.lp-draw-footer button { min-height: 44px; }

[data-lp-game="serial"] :is(.lp-draw-slots,.lp-picked) { flex-wrap: nowrap; }
[data-lp-game="serial"] :is(.lp-ball,.lp-mark) { width: min(var(--lp-ball-size), calc((100% - 30px) / 7)); }
[data-lp-game="serial"] .lp-ball {
  border-radius: 4px;
  color: #2c1b16;
  border-color: #b7896f;
  background: linear-gradient(#b1856b, #efdac0 21%, #f5dfc0 48%, #c0a085 50%, #e7d1ad 92%, #816050);
  box-shadow: inset 0 0 5px #2d1b0f91;
}
[data-lp-game="serial"] .lp-ball[data-lp-empty] { color: #dabaa4; background: #30241e; }
[data-lp-game="serial"] .lp-ball[data-lp-arrived] { animation: none; }
[data-lp-game="serial"] .lp-ball[data-lp-arrived] b { animation: lp-roller .28s cubic-bezier(.2,.68,.24,1) both; }
[data-lp-game="serial"] :is(.lp-ball,.lp-mark):first-child { border-color: #d7ae88; }

[data-lp-game="quick-pick"] .lp-draw-slots, [data-lp-game="bingo"] .lp-draw-slots {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
}
[data-lp-game="bingo"] .lp-draw-slots { grid-template-columns: repeat(5, minmax(0, 1fr)); }
[data-lp-game="quick-pick"] .lp-ball, [data-lp-game="bingo"] .lp-ball {
  width: auto;
  height: 28px;
  font-size: .77rem;
  border-radius: 4px;
}
[data-lp-game="quick-pick"] .lp-ball:not([data-lp-empty]) { background: #85ddd1; border-color: #9ce8dd; }
[data-lp-game="quick-pick"] .lp-ball[data-lp-arrived] { animation: lp-scan .24s ease-out both; }
.lp-speed-track { height: 3px; border-radius: 2px; background: #2b4b43; }
.lp-speed-track i { display: block; height: 100%; background: #86e1d3; box-shadow: 0 0 7px #58d6ce; }

.lp-bingo {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 204px);
  aspect-ratio: 1;
  gap: 4px;
}
.lp-bingo .lp-mark { position: static; width: 100%; height: 100%; min-height: 0; }
.lp-bingo .lp-mark b { z-index: 1; display: grid; place-items: center; min-width: 26px; min-height: 26px; border-radius: 50%; }
.lp-bingo .lp-mark[data-lp-hit] b { background: #235326; }
.lp-bingo .lp-mark[data-lp-hit] { border-color: #88c36e; color: #eaffd1; background: radial-gradient(ellipse, #315d26, #253e22); }
.lp-bingo .lp-mark[data-lp-dab] { animation: lp-dab .22s ease-out both; }
.lp-bingo-lines { position: absolute; inset: 0; pointer-events: none; }
.lp-bingo-lines i {
  position: absolute;
  left: var(--line-x);
  top: calc(var(--line-y) - 1.5px);
  width: var(--line-length);
  height: 3px;
  transform-origin: left;
  transform: rotate(var(--line-angle));
  border-radius: 4px;
  background: #dcffc3;
  box-shadow: 0 0 8px 1px #8ff351;
}
.lp-bingo-lines [data-lp-lit] { animation: lp-light-line .24s ease-out both; }

[data-lp-game] .ls-cells { gap: 9px; }
[data-lp-game] .ls-board { gap: 7px; }
[data-lp-game] :is(.ls-cover,.ls-open-cell,.ls-closed-cell) { min-height: 69px; }
[data-lp-game] .ls-open-cell {
  position: relative;
  animation: none;
  place-items: center;
  overflow: hidden;
  gap: 1px;
  border-color: color-mix(in srgb, var(--lottery-accent) 42%, #2b4436);
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--lottery-accent) 19%, #223628), #16241c 92%);
}
[data-lp-game] .ls-open-cell.ls-hit {
  border-color: var(--lottery-accent);
  color: #fff6e2;
  box-shadow: inset 0 0 12px color-mix(in srgb, var(--lottery-accent) 43%, transparent);
}
[data-lp-game] .ls-open-cell.ls-hit small { color: #f9edce; }
[data-lp-game] .ls-open-cell[data-lp-fresh] {
  animation: lp-open .24s cubic-bezier(.18,.85,.25,1) both;
  animation-delay: calc(var(--lp-step) * 24ms);
}
.lp-token {
  width: clamp(28px, 8vw, 48px);
  height: clamp(28px, 8vw, 48px);
  object-fit: contain;
  filter: drop-shadow(0 3px 4px #0009);
}
[data-lp-game] .ls-open-cell.ls-hit .lp-token { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--lottery-accent) 55%, transparent)); }

[data-lp-game] .ls-scratch {
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--lottery-accent) 53%, #344637);
  border-radius: 7px;
  background: repeating-linear-gradient(132deg, #ffffff08 0 1px, transparent 1px 7px),
    linear-gradient(135deg, color-mix(in srgb, var(--lottery-accent) 37%, #14191c), #251d28 86%);
}
[data-lp-game="lucky-number"] .ls-scratch { background-color: #442114; }
[data-lp-game="diamond"] .ls-scratch { background-color: #2a2446; }
[data-lp-game] .ls-scratch .ls-board-row > small { display: block; margin-bottom: 3px; color: #f7eadf; }
[data-lp-game] [data-lp-scratch] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #20202b;
  border: 1px solid #d3d4dc;
  border-radius: 5px;
  background: center / cover url("/img/lottery-play/scratch-foil.webp"), #b3bbc6;
}
[data-lp-game] [data-lp-scratch] canvas {
  display: none;
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
[data-lp-game] [data-lp-rubbed] {
  color: #fff3d6;
  text-shadow: 0 1px 2px #150d10, 0 0 5px #111;
  background: repeating-linear-gradient(35deg, #ffffff08 0 1px, transparent 1px 8px), #47364b;
}
[data-lp-game] [data-lp-rubbed] canvas { display: block; }
[data-lp-game="lucky-number"] [data-lp-rubbed] { background-color: #68372a; }
[data-lp-game="diamond"] [data-lp-rubbed] { background-color: #333759; }
[data-lp-game] .lp-printed-number { font-size: 1.23rem; color: #ffdbbf; line-height: 1.1; }
[data-lp-game] .lp-amount { padding-inline: 3px; color: #ffeaf4; text-wrap: balance; }
[data-lp-game="foil"] [data-lp-fresh] .lp-amount {
  animation: lp-stamp .27s cubic-bezier(.2,.78,.32,1) both;
  animation-delay: calc(var(--lp-step) * 24ms);
}
[data-lp-game="lucky-number"] [data-lp-fresh] .lp-printed-number {
  animation: lp-print .22s ease-out both;
  animation-delay: calc(var(--lp-step) * 30ms);
}
.lp-reference b { margin-left: 6px; color: var(--lottery-accent); }
[data-lp-pair] .ls-board { position: relative; }
[data-lp-pair] .ls-board::after {
  content: "";
  position: absolute;
  height: 2px;
  width: 13px;
  top: 50%;
  left: calc(50% - 6px);
  background: #e6d7ff;
  box-shadow: 0 0 8px #c1a9ff;
  pointer-events: none;
}
[data-lp-pair]:has([data-lp-fresh]) .ls-board::after { animation: lp-link .36s ease-out both; }
[data-lp-game="diamond"] [data-lp-fresh] .lp-token {
  animation: lp-facet .32s ease-out both;
  animation-delay: calc(var(--lp-step) * 24ms);
}

[data-lp-game="triple"] .ls-cells {
  border: 2px solid #835a33;
  border-radius: 9px;
  padding: 9px;
  background: repeating-linear-gradient(105deg, #ffffff07 0 1px, transparent 1px 4px), #292119;
  box-shadow: inset 0 0 0 2px #211912;
}
[data-lp-game="triple"] .ls-board-row > small { color: #f8d99f; }
[data-lp-game="triple"] .ls-cover { background: linear-gradient(#694322, #e9b979 45%, #865531 88%); }
[data-lp-game="triple"] .ls-open-cell[data-lp-fresh] { animation-name: lp-reel; animation-delay: calc(var(--lp-step) * 34ms); }
[data-lp-game="triple"] .ls-open-cell { background: linear-gradient(180deg, #1b1510, #513925 46%, #23170f); }

[data-lp-game="treasure"] .ls-choice {
  display: grid;
  place-items: center;
  gap: 4px;
  border-color: #58817f;
  background: radial-gradient(circle at 53% 24%, #315a53, #152522);
}
[data-lp-game="treasure"] .ls-choice img { width: 36px; height: 36px; }
[data-lp-game="treasure"] .ls-choice[aria-pressed="true"] {
  color: #0f231b;
  border-color: #ace5d5;
  background: #99d6cc;
}
[data-lp-game="treasure"] .ls-closed-cell {
  color: #f3d89b;
  background: repeating-linear-gradient(0deg, #ffffff0c 0 1px, transparent 1px 5px), #253737;
  border-style: double;
  border-width: 3px;
}
[data-lp-game="treasure"] .ls-open-cell[data-lp-fresh] { animation-name: lp-vault; animation-delay: calc(var(--lp-step) * 54ms); }

[data-lp-game="crown"] .ls-cover { color: #f6deff; background: radial-gradient(ellipse at center, #634c71, #322438); border-color: #94799b; }
[data-lp-game="crown"] .ls-open-cell { background: radial-gradient(ellipse at center, #523b62, #291c30 90%); }
[data-lp-game="crown"] .ls-open-cell::before {
  position: absolute;
  inset: auto 20% 21% 20%;
  height: 10%;
  border-radius: 50%;
  content: "";
  background: #c78feb44;
  pointer-events: none;
}
[data-lp-game="crown"] .ls-open-cell > * { z-index: 1; }
[data-lp-game="crown"] .ls-open-cell.ls-hit::before { background: #fbe3ff85; box-shadow: 0 0 12px #ca7cf3; }
[data-lp-game="crown"] [data-lp-fresh] .lp-token {
  animation: lp-pedestal .34s cubic-bezier(.17,.73,.26,1) both;
  animation-delay: calc(var(--lp-step) * 30ms);
}

[data-lp-game="windows"] .ls-cells { padding: 7px; border: 1px solid #8c6746; border-radius: 7px; background: #2b2417; }
[data-lp-game="windows"] .ls-cover.ls-window, .lp-shutter {
  background: center 1px / auto 86% no-repeat url("/img/lottery-play/symbols/window.webp"), #3b2b18;
}
[data-lp-game="windows"] .ls-cover.ls-window {
  position: relative;
  place-items: end center;
  border-color: #a9824c;
  color: #ffedbd;
  font-size: .83rem;
}
[data-lp-game="windows"] .ls-cover.ls-window span { align-self: flex-end; background: #221808f2; border-radius: 4px; padding-inline: 4px; }
[data-lp-game="windows"] .ls-cover.ls-window[aria-pressed="true"] {
  border-color: #ebc773;
  background-color: #735124;
  box-shadow: inset 0 0 11px #ffdc82b5;
}
[data-lp-game="windows"] .ls-closed-cell { color: #beab88; background: #25251c; }
[data-lp-game="windows"] .ls-open-cell { animation: none; }
.lp-shutter { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
[data-lp-game="windows"] [data-lp-fresh] .lp-shutter { animation: lp-shutter .34s ease-out both; animation-delay: calc(var(--lp-step) * 29ms); }

[data-lp-game] .ls-result[data-result="1"] { animation: none; }
[data-lp-game] .ls-result[data-lp-win] { position: relative; overflow: hidden; border-color: var(--lottery-accent); }
.ls-result[data-lp-win]::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(111deg, transparent 25%, color-mix(in srgb, var(--lottery-accent) 26%, transparent) 48%, transparent 70%);
  animation: lp-shine .65s .12s ease-out both;
}

.lt-stage[data-lp-classic] {
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(102deg, #10251f24 10%, #10211bc4 50%, #101c18f5 75%),
    center / cover url("/img/lottery-play/lotto.webp"), #101d19;
}
.lt-stage[data-lp-classic]::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(ellipse at 22% 37%, #ffe1a24e, #59c37213 37%, transparent 64%);
  opacity: 0;
  transition: opacity .24s ease-out;
}
.lt-stage[data-lp-classic="drawing"]::before { opacity: .6; }
.lt-stage[data-lp-classic="rolling"]::before, .lt-stage[data-lp-classic="result"]::before { opacity: 1; }
.lt-stage[data-lp-classic="result"] .lt-ball.g.on { box-shadow: 0 0 16px #ffdb65aa, 0 3px 6px #0007; }
.lt-stage[data-lp-classic] .lt-machine::after {
  position: absolute;
  inset: 73% 0 3%;
  content: "";
  z-index: -1;
  background: radial-gradient(ellipse, #edbb5f69, transparent 67%);
  pointer-events: none;
}

@keyframes lp-ball-drop { from { transform: translateY(-7px) scale(.9); opacity: .58; } to { transform: none; opacity: 1; } }
@keyframes lp-roller { from { transform: translateY(-90%); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
@keyframes lp-scan { from { box-shadow: inset 0 -28px 0 #21514f; } to { box-shadow: inset 0 0 0 #21514f; } }
@keyframes lp-dab { from { box-shadow: inset 0 0 0 21px #bcec71a6; } to { box-shadow: inset 0 0 5px #bcec711b; } }
@keyframes lp-light-line { from { transform: rotate(var(--line-angle)) scaleX(0); } to { transform: rotate(var(--line-angle)) scaleX(1); } }
@keyframes lp-open { from { opacity: .55; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes lp-stamp { from { transform: scale(1.17); opacity: .4; } to { transform: scale(1); opacity: 1; } }
@keyframes lp-print { from { clip-path: inset(0 0 92%); } to { clip-path: inset(0); } }
@keyframes lp-link { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes lp-facet { from { transform: rotateY(65deg); opacity: .65; } to { transform: rotateY(0); opacity: 1; } }
@keyframes lp-reel { from { clip-path: inset(36% 0 0); transform: translateY(-4px); } to { clip-path: inset(0); transform: none; } }
@keyframes lp-vault { from { clip-path: inset(0 30%); opacity: .65; } to { clip-path: inset(0); opacity: 1; } }
@keyframes lp-pedestal { from { transform: translateY(9px) scale(.88); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes lp-shutter { from { transform: scaleX(1); opacity: 1; } to { transform: scaleX(0); opacity: 0; } }
@keyframes lp-shine { from { transform: translateX(-105%); opacity: .6; } to { transform: translateX(110%); opacity: 0; } }

@media (max-width: 580px) {
  [data-lp-game] .ls-game-intro { padding: 14px 11px; min-height: 154px; }
  [data-lp-game] .ls-game-intro img { width: 76%; object-position: 55% center; }
  [data-lp-game] .ls-game-intro > div { width: 66%; }
  [data-lp-game] .ls-game-intro::after { background: linear-gradient(90deg, #111c16 11%, #111c16ec 31%, #111c16a9 59%, #111c1611 86%); }
  [data-lp-game] .ls-game-intro p:not(.ls-jackpot) { font-size: .83rem; }
  [data-lp-game] .ls-game-intro div > small { font-size: .72rem; }
  [data-lp-game] .ls-board { gap: 5px; }
  [data-lp-game] :is(.ls-cover,.ls-open-cell,.ls-closed-cell) { min-height: 58px; }
  .lp-draw-board { --lp-ball-size: 36px; padding: 9px; }
  .lp-token { width: 34px; height: 34px; }
  .lt-stage[data-lp-classic] { background-image: linear-gradient(0deg, #101c18 8%, #10211ba8 60%, #10251f22 100%), url("/img/lottery-play/lotto.webp"); }
  .lt-stage[data-lp-classic]::before { background: radial-gradient(ellipse at 50% 26%, #ffe1a246, transparent 60%); }
}
@media (prefers-reduced-motion: reduce) {
  [data-lp-game] *, [data-lp-game] *::before, [data-lp-game] *::after,
  .lt-stage[data-lp-classic]::before { animation: none !important; transition: none !important; }
}
