@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
:root { --chase: 1.5s; --dyk: 0; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #04010a; color: #fff; overscroll-behavior: none; touch-action: manipulation; -webkit-touch-callout: none; -webkit-text-size-adjust: 100%;
  font-family: 'Kanit', system-ui, sans-serif; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; }

#city, #city3d, #fx { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#city { z-index: 0; }
#city3d { z-index: 0; visibility: hidden; }
#city3d.ready { visibility: visible; }
#vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, .55) 100%),
              linear-gradient(180deg, rgba(0, 0, 0, .25), transparent 18%, transparent 80%, rgba(0, 0, 0, .35)); }
#fx { z-index: 9; pointer-events: none; }
#dim { position: fixed; inset: 0; z-index: 1; background: radial-gradient(ellipse at center, rgba(20, 6, 30, .35), rgba(6, 0, 12, .62)); opacity: 0; transition: opacity .9s ease; pointer-events: none; }
#spot { position: fixed; z-index: 1; left: 50%; top: 50%; width: 1500px; height: 1100px; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(255, 214, 130, .30) 0%, rgba(255, 180, 80, .10) 35%, transparent 65%);
  opacity: 0; transition: opacity .7s; pointer-events: none; }
body.suspense #dim, body.suspense #spot { opacity: 1; }

#viewport { position: fixed; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: opacity 1s; }
body:not(.started) #viewport { opacity: 0; }
#stage { position: relative; flex: none; width: 1920px; height: 1080px; transform-origin: 50% 50%; }
#shake { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding-top: 18px; }

/* =========================== LOGO SIGN =========================== */
.logo-sign { position: absolute; left: 44px; top: 26px; width: 330px; height: 280px; z-index: 6; cursor: pointer; scale: .9; transform-origin: 0 0;
  animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-5px); } }
.logo-sign:hover .ls-frame { filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .7)) drop-shadow(0 0 34px rgba(255, 210, 110, .8)); }
.ls-frame { position: absolute; inset: 0; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .7)) drop-shadow(0 0 22px rgba(255, 190, 90, .45)); transition: filter .3s; }
.ls-rays { position: absolute; left: 165px; top: 115px; width: 620px; height: 620px; margin: -310px 0 0 -310px; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 120, .30) 0 3deg, transparent 3deg 12deg);
  -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 58%); mask-image: radial-gradient(circle, #000 12%, transparent 58%);
  animation: spin 26s linear infinite; mix-blend-mode: screen; }
.ls-halo { position: absolute; left: 165px; top: 115px; width: 420px; height: 420px; margin: -210px 0 0 -210px; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 140, .55) 0%, rgba(255, 120, 80, .18) 35%, transparent 65%); animation: haloPulse 3.2s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes haloPulse { 50% { transform: scale(1.15); opacity: .65; } }
.ls-bulbs { position: absolute; inset: 0; pointer-events: none; }
.ls-bulbs .bulb { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; }
.ls-rays, .ls-halo, .ls-flare, .ls-star { will-change: transform, opacity; }
.ls-logo { position: absolute; left: 121px; top: 50px; width: 88px; height: 122px; perspective: 500px; pointer-events: none; }
.ls-logo img { width: 100%; height: 100%; object-fit: contain; display: block; transform-style: preserve-3d;
  animation: logoSpin 7s cubic-bezier(.65, 0, .3, 1) infinite, logoGlow 7s ease-in-out infinite; }
@keyframes logoSpin { 0%, 58% { transform: rotateY(0) scale(1); } 70% { transform: rotateY(200deg) scale(1.12); } 82%, 100% { transform: rotateY(360deg) scale(1); } }
@keyframes logoGlow { 0%, 55%, 100% { filter: drop-shadow(0 0 4px rgba(220, 30, 70, .35)); } 72% { filter: drop-shadow(0 0 16px rgba(255, 40, 90, .95)) brightness(1.25); } }
.ls-logo::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .95) 50%, transparent 65%) no-repeat; background-size: 300% 100%;
  -webkit-mask: url(assets/logo.png) center / contain no-repeat; mask: url(assets/logo.png) center / contain no-repeat;
  animation: logoSheen 7s ease-in-out infinite; }
@keyframes logoSheen { 0%, 20% { background-position: 130% 0; } 45%, 100% { background-position: -130% 0; } }
.ls-flare { position: absolute; left: 0; top: 115px; width: 0; height: 0; pointer-events: none; mix-blend-mode: screen; animation: flareMove 7s ease-in-out infinite; }
.ls-flare i { position: absolute; display: block; border-radius: 50%; }
.f-core { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: radial-gradient(circle, #fff 0 18%, rgba(255, 230, 170, .9) 30%, rgba(255, 180, 80, 0) 70%); }
.f-streak { width: 520px; height: 5px; margin: -2.5px 0 0 -260px; border-radius: 4px !important;
  background: linear-gradient(90deg, transparent, rgba(150, 210, 255, .55) 30%, #fff 50%, rgba(150, 210, 255, .55) 70%, transparent); filter: blur(.6px); }
.f-ring { border: 2px solid rgba(180, 220, 255, .35); }
.f-ring.r1 { width: 60px; height: 60px; margin: -30px 0 0 30px; background: radial-gradient(circle, rgba(255, 120, 200, .15), transparent 70%); }
.f-ring.r2 { width: 26px; height: 26px; margin: -13px 0 0 110px; border-color: rgba(255, 220, 140, .45); background: rgba(255, 220, 140, .12); }
@keyframes flareMove { 0%, 30% { transform: translateX(-60px); opacity: 0; } 34% { opacity: 1; } 56% { opacity: 1; } 62%, 100% { transform: translateX(400px); opacity: 0; } }
.ls-star { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; pointer-events: none; mix-blend-mode: screen; animation: twinkle 2.8s ease-in-out infinite; }
.ls-star::before, .ls-star::after { content: ''; position: absolute; left: 50%; top: 50%; background: radial-gradient(ellipse, #fff 0 20%, rgba(255, 230, 160, .7) 40%, transparent 70%); }
.ls-star::before { width: 44px; height: 4px; margin: -2px 0 0 -22px; }
.ls-star::after { width: 4px; height: 44px; margin: -22px 0 0 -2px; }
.ls-star.s1 { left: 165px; top: 12px; }
.ls-star.s2 { left: 316px; top: 115px; animation-delay: -.9s; }
.ls-star.s3 { left: 14px; top: 115px; animation-delay: -1.8s; }
@keyframes twinkle { 0%, 100% { transform: scale(.2) rotate(0); opacity: 0; } 50% { transform: scale(1.1) rotate(45deg); opacity: 1; } }

/* =========================== HERO =========================== */
.hero { position: relative; z-index: 4; text-align: center; transition: opacity .7s, filter .7s; }
.title { font-size: 104px; font-weight: 800; line-height: 1.16; letter-spacing: 1px; white-space: nowrap;
  background: linear-gradient(100deg, #f3c04f 0%, #fff7d6 14%, #f2c35a 26%, #b97d1f 38%, #ffe9a6 47%, #ffffff 50%, #ffe9a6 53%, #c88d2a 64%, #fbe3a0 78%, #e2a93f 100%);
  background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1.5px rgba(110, 60, 8, .5);
  filter: drop-shadow(0 3px 0 #b07a22) drop-shadow(0 6px 0 #6d430b) drop-shadow(0 12px 16px rgba(0, 0, 0, .75)) drop-shadow(0 0 30px rgba(255, 190, 80, .35)); background-position: 50% 0; }
.title-wrap { position: relative; display: inline-block; }
.tshine { position: absolute; inset: 0; font-size: 104px; font-weight: 800; line-height: 1.16; letter-spacing: 1px; white-space: nowrap; pointer-events: none; color: transparent;
  background: linear-gradient(105deg, transparent 44%, rgba(255, 255, 255, .9) 50%, transparent 56%) no-repeat; background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; animation: txtSweep 6s ease-in-out infinite; }
.portrait .tshine { font-size: 86px; }
@keyframes shine { 0% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
.period { font-size: 30px; font-weight: 400; color: #f6ead0; letter-spacing: .5px; margin-top: -8px; text-shadow: 0 2px 8px #000, 0 0 18px rgba(255, 190, 90, .4); }

/* =========================== PANELS =========================== */
.panel { position: relative; isolation: isolate; border-radius: 44px; flex: none;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 205, 120, .14), transparent 60%),
    linear-gradient(180deg, #170d04 0%, #070300 49%, #000 51%, #050200 100%);
  box-shadow: inset 0 0 0 3px #e9c063, inset 0 0 0 6px #3a2505, inset 0 0 70px rgba(255, 180, 70, .18);
  transition: transform .7s cubic-bezier(.2, .9, .25, 1.15), opacity .7s, filter .7s; }
.panel::before { content: ''; position: absolute; inset: -24px; border-radius: 66px; z-index: -2;
  background: linear-gradient(135deg, #6b4510, #f8dc84 18%, #a8731f 34%, #fff0b8 50%, #b07a22 66%, #f3cf6e 82%, #6b4510);
  box-shadow: 0 0 0 2px #3d2706, 0 0 50px 8px rgba(255, 185, 70, .45), 0 26px 60px rgba(0, 0, 0, .8); }
.panel::after { content: ''; position: absolute; inset: -14px; border-radius: 56px; z-index: -1;
  background: linear-gradient(180deg, #2a1804, #120900); box-shadow: inset 0 0 0 1.5px rgba(255, 230, 160, .55), 0 0 0 1px #3d2706; }
.panel.focus { transform: scale(1.045); z-index: 3; }
.panel.focus::before { animation: framePulse .45s ease-in-out infinite alternate; }
@keyframes framePulse { to { box-shadow: 0 0 0 2px #3d2706, 0 0 110px 30px rgba(255, 200, 90, .9), 0 26px 60px rgba(0, 0, 0, .8); } }
.panel.won::before { animation: wonGlow 2.2s ease-in-out infinite; }
@keyframes wonGlow { 50% { box-shadow: 0 0 0 2px #3d2706, 0 0 80px 18px rgba(255, 210, 110, .75), 0 26px 60px rgba(0, 0, 0, .8); } }
body.suspense .panel:not(.focus), body.suspense .hero, body.suspense .logo-sign, body.suspense .sig-script { opacity: .22; filter: saturate(.3) brightness(.55); }
body.suspense .panel.focus { --chase: .3s; }

.bulbs { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.bulb { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #fff 0 20%, #ffeeb0 42%, #e7a83a 82%);
  box-shadow: 0 0 7px 2px rgba(255, 214, 120, .85); }
.bgrp { position: absolute; inset: 0; will-change: opacity; animation: chase var(--chase) linear infinite; animation-delay: calc(var(--k) * var(--chase) / -3); }
@keyframes chase { 0%, 30% { opacity: 1; } 36%, 100% { opacity: .25; } }
.panel.won { --chase: .7s; }

/* =========================== PLAQUE LABELS =========================== */
.plaque { position: absolute; left: 50%; top: -58px; transform: translateX(-50%); z-index: 5; display: flex; align-items: center;
  --ph: 100px; --fs: 60px; --cut: polygon(46px 0, calc(100% - 46px) 0, 100% 50%, calc(100% - 46px) 100%, 46px 100%, 0 50%);
 }
.plq-glow { position: absolute; left: 8%; right: 8%; top: 0; bottom: -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 196, 90, .5), rgba(255, 160, 60, .12) 60%, transparent); }
.plaque.static { position: relative; left: auto; top: auto; transform: none; display: inline-flex; }
.p2 .plaque, .p3 .plaque { --ph: 78px; --fs: 44px; top: -46px; --cut: polygon(36px 0, calc(100% - 36px) 0, 100% 50%, calc(100% - 36px) 100%, 36px 100%, 0 50%); }
.plq { position: relative; height: var(--ph); padding: 4px; clip-path: var(--cut);
  background: linear-gradient(180deg, #fff8dc 0%, #f1cf78 20%, #a87420 46%, #f8de92 66%, #7a5212 100%); }
.plq-a { height: 100%; padding: 4px; clip-path: var(--cut); background: linear-gradient(180deg, #3a2406, #0b0602 50%, #241505); }
.plq-b { height: 100%; padding: 1.5px; clip-path: var(--cut); background: linear-gradient(90deg, #7a5212, #ffeaa8 30%, #fff 50%, #ffeaa8 70%, #7a5212); }
.plq-c { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 calc(var(--ph) * .78);
  clip-path: var(--cut); overflow: hidden;
  background: radial-gradient(90% 120% at 50% -30%, rgba(255, 214, 120, .38), transparent 58%),
              repeating-linear-gradient(90deg, rgba(255, 220, 150, .035) 0 1px, transparent 1px 7px),
              linear-gradient(180deg, #26170a 0%, #0a0502 55%, #170d04 100%); }
.plq-c::before { content: ''; position: absolute; left: 8%; right: 8%; top: 4px; height: 38%; border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 240, 200, .18), transparent); }
.plq-t { position: relative; font-size: var(--fs); font-weight: 700; line-height: 1.25; white-space: nowrap; letter-spacing: .05em; padding-bottom: .06em;
  color: transparent; -webkit-text-stroke: .6px rgba(90, 50, 5, .6);
  background: linear-gradient(180deg, #fffdf2 10%, #ffe9a6 36%, #e5ad42 52%, #b47b1d 60%, #f7d988 76%, #fff3c8 92%);
  -webkit-background-clip: text; background-clip: text; }
.plq-t::before { content: attr(data-t); position: absolute; inset: 0; z-index: -1; color: #2a1602; -webkit-text-stroke: 0;
  text-shadow: 0 2px 0 #3a2002, 0 3px 2px rgba(0, 0, 0, .8), 0 0 14px rgba(255, 200, 90, .55); }
.plq-t::after { content: attr(data-t); position: absolute; inset: 0; color: transparent; -webkit-text-stroke: 0;
  background: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .95) 50%, transparent 58%) no-repeat; background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; animation: txtSweep 4.6s ease-in-out infinite; }
@keyframes txtSweep { 0%, 45% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
.wing { position: relative; display: block; width: 120px; height: 3px; flex: none;
  background: linear-gradient(90deg, transparent, #b07a22 30%, #fff1b8 100%); box-shadow: 0 0 10px rgba(255, 200, 90, .8); }
.wing.l { margin-right: -2px; } .wing.r { margin-left: -2px; transform: scaleX(-1); }
.wing::before { content: ''; position: absolute; right: -4px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%) rotate(45deg);
  background: linear-gradient(135deg, #fffbe6, #e8b84e 50%, #7a5212); box-shadow: 0 0 12px #ffcc55, 0 0 0 2px #3a2406; }
.wing::after { content: ''; position: absolute; left: 34px; top: 50%; width: 8px; height: 8px; margin-top: -4px; transform: rotate(45deg); background: #f5d27c; box-shadow: 0 0 8px #ffcc55; }
.p2 .wing, .p3 .wing { width: 80px; }
.plaque .twk { position: absolute; right: calc(var(--ph) * 1.2); top: 2px; width: 36px; height: 36px; mix-blend-mode: screen; pointer-events: none; animation: twinkle 3.2s ease-in-out infinite; }
.plaque .twk::before, .plaque .twk::after { content: ''; position: absolute; left: 50%; top: 50%; background: radial-gradient(ellipse, #fff 0 20%, rgba(255, 230, 160, .7) 40%, transparent 70%); }
.plaque .twk::before { width: 36px; height: 3px; margin: -1.5px 0 0 -18px; }
.plaque .twk::after { width: 3px; height: 36px; margin: -18px 0 0 -1.5px; }

/* =========================== NUMBERS =========================== */
.digits { display: flex; justify-content: center; align-items: center; position: relative; z-index: 2; gap: 0; }
.digits.has-hidden { cursor: pointer; }
.seg { display: flex; position: relative; }
.win { position: relative; height: var(--ch); width: calc(var(--cw) * var(--n)); clip-path: inset(-10px -90px); }
.win.landed { clip-path: none; }
.win .reel { position: absolute; left: 0; top: 0; width: 100%; will-change: transform; }
.item { display: flex; height: var(--ch); }
.item, .seg.fixed, .co-num { translate: 0 calc(var(--fs) * var(--dyk) * -1); }
.ch { position: relative; display: block; flex: none; width: var(--cw); height: var(--ch); line-height: var(--ch);
  text-align: center; font-size: var(--fs); font-weight: 700;
  color: transparent; -webkit-text-stroke: .012em rgba(95, 55, 6, .95);
  background: linear-gradient(180deg, #fff 0%, #fffef4 24%, #fff0b8 36%, #f3cc6a 46%, #c48a26 52%, #8e5c12 55%, #e9b44c 60%, #fbe09a 70%, #fff6d6 78%, #d49a35 100%);
  -webkit-background-clip: text; background-clip: text; }
.ch::before { content: attr(data-c); position: absolute; inset: 0; z-index: -1; color: #d79f3c;
  -webkit-text-stroke: .055em #f0c35e;
  text-shadow: 0 .004em 0 #c08a2a, 0 .008em 0 #a87420, 0 .012em 0 #93641a, 0 .016em 0 #7e5414, 0 .02em 0 #6b450f, 0 .024em 0 #58380b,
    0 .028em 0 #462c08, 0 .07em .06em rgba(0, 0, 0, .85), 0 0 .16em rgba(255, 190, 70, .6); }
.digits::after { content: ''; position: absolute; top: 4%; bottom: 4%; left: 0; right: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 250, 225, .55) 50%, transparent 58%) no-repeat; background-size: 300% 100%; mix-blend-mode: overlay;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  animation: digSweep 6s ease-in-out infinite; }
@keyframes digSweep { 0%, 50% { background-position: 120% 0; } 100% { background-position: -20% 0; } }
.win.hidden { animation: hidPulse 2.6s ease-in-out infinite; will-change: opacity; }
@keyframes hidPulse { 50% { opacity: .8; } }
.digits.has-hidden:hover .win.hidden .ch::before { -webkit-text-stroke-color: #fff4c4; }
.win.pop { animation: segPop 1s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes segPop { 0% { transform: scale(1.4); filter: brightness(2.6); } 100% { transform: scale(1); filter: none; } }
@keyframes segPopLite { 0% { transform: scale(1.4); } 100% { transform: scale(1); } }
.panel.won .win.landed { animation: wonCh 2s ease-in-out infinite; will-change: transform; }
@keyframes wonCh { 50% { transform: translateY(-5px) scale(1.02); } }

.digits.big { position: absolute; left: 0; right: 0; top: 38px; height: 272px; --cw: 150px; --ch: 272px; --fs: 250px; }

/* red boxes */
.boxes { position: absolute; left: 0; right: 0; top: 48px; display: flex; justify-content: center; gap: 32px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.box { position: relative; display: flex; justify-content: center; align-items: center; height: 152px; border-radius: 22px; border: 9px solid transparent;
  background:
    radial-gradient(110% 70% at 50% -12%, rgba(255, 170, 190, .55), transparent 55%) padding-box,
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 9px) padding-box,
    linear-gradient(180deg, #ff3e64 0%, #d6123d 36%, #a3072c 70%, #6a0018 100%) padding-box,
    radial-gradient(circle at 9px 9px, #fffbe6 0 2.5px, #6b430b 3.5px, transparent 4.5px) border-box,
    radial-gradient(circle at calc(100% - 9px) 9px, #fffbe6 0 2.5px, #6b430b 3.5px, transparent 4.5px) border-box,
    radial-gradient(circle at 9px calc(100% - 9px), #fffbe6 0 2.5px, #6b430b 3.5px, transparent 4.5px) border-box,
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), #fffbe6 0 2.5px, #6b430b 3.5px, transparent 4.5px) border-box,
    linear-gradient(145deg, #6b4510, #fbe39a 20%, #b07a22 40%, #fff3c4 55%, #a8731f 72%, #f3cf6e 88%, #6b4510) border-box;
  box-shadow: 0 0 0 1.5px #2a1604, inset 0 0 0 2px rgba(60, 0, 10, .8), inset 0 0 0 3.5px rgba(255, 210, 150, .45), inset 0 10px 18px rgba(255, 255, 255, .22), inset 0 -18px 26px rgba(0, 0, 0, .5), 0 16px 30px rgba(0, 0, 0, .7), 0 0 26px rgba(255, 190, 80, .3); }
.box::after { content: ''; position: absolute; left: 4px; right: 4px; top: 3px; height: 40%; border-radius: 12px 12px 50% 50% / 12px 12px 22px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0)); pointer-events: none; z-index: 3; }
.p2 .box { width: 262px; } .p3 .box { width: 310px; }
.box .digits { height: 134px; --cw: 80px; --ch: 134px; --fs: 128px; }

/* hidden reveal buttons */
.hbtn { position: relative; width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255, 215, 120, .3); cursor: pointer;
  background: radial-gradient(circle, rgba(255, 220, 140, .45), rgba(255, 200, 90, .05) 70%); opacity: .3; transition: .3s; z-index: 5; }
.hbtn:hover { opacity: 1; transform: scale(1.4); box-shadow: 0 0 18px 5px rgba(255, 200, 90, .85); }
.hbtn.done { opacity: .06; pointer-events: none; }
.p1 > .hbtn { position: absolute; left: 50%; bottom: 12px; margin-left: -10px; }

/* layout sizes (landscape) */
.p1 { width: 1080px; height: 350px; margin-top: 70px; }
.row { display: flex; align-items: flex-start; margin-top: 88px; position: relative; }
.p2 { width: 600px; height: 262px; }
.p3 { width: 720px; height: 262px; }
.sig-script { width: 96px; position: relative; z-index: 4; transition: opacity .7s; }
.sig-script span { position: absolute; left: 50%; top: -92px; transform: translateX(-50%) rotate(-12deg); white-space: nowrap;
  font-family: 'Great Vibes', cursive; font-size: 78px; color: transparent;
  background: linear-gradient(180deg, #fff6d0, #f2c35a 60%, #b07a22); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 2px 0 #6d430b) drop-shadow(0 0 14px rgba(255, 200, 90, .65)); }

/* =========================== MEDALS =========================== */
.mw { position: absolute; z-index: 6; }
.p1 .mw-a { left: -282px; top: 50%; transform: translateY(-50%); }
.p1 .mw-b { right: -238px; top: 50%; transform: translateY(-50%); }
.mw-bottom { left: 50%; bottom: -126px; transform: translateX(-50%); }
.p3 .mw-side { right: -206px; top: 50%; transform: translateY(-50%); }
.medal { position: relative; width: calc(var(--s) * 1.18); animation: medalBob 4s ease-in-out infinite; will-change: transform; }
.medal::before { content: ''; position: absolute; z-index: 0; left: 13%; top: 9%; width: 74%; aspect-ratio: 1; border-radius: 50%;
  box-shadow: 0 14px 22px rgba(0, 0, 0, .75), 0 0 34px rgba(255, 195, 80, .5); }
.mw-b .medal, .mw-side .medal { animation-delay: -1.3s; }
.medal svg { display: block; width: 100%; height: auto; overflow: visible;
 position: relative; }
@keyframes medalBob { 50% { transform: translateY(-6px) rotate(2.5deg); } }
.mglint { animation: mglint 5s ease-in-out infinite; }
.mw-b .mglint, .mw-side .mglint { animation-delay: -2s; }
@keyframes mglint { 0%, 55% { transform: translateX(-40px); } 100% { transform: translateX(300px); } }
.mspark { transform-box: fill-box; transform-origin: center; animation: twinkle 2.6s ease-in-out infinite; }
.panel.won .medal { animation: medalWin 1.2s cubic-bezier(.2, 1.6, .4, 1) 1, medalBob 4s ease-in-out 1.2s infinite; }
@keyframes medalWin { 0% { transform: scale(1); } 30% { transform: scale(1.35) rotate(-10deg); filter: brightness(1.6); } 100% { transform: scale(1); } }

/* =========================== INTRO =========================== */
body.started .logo-sign { animation: introFade 1.1s cubic-bezier(.2, 1.4, .4, 1) backwards, floaty 6s ease-in-out 1.1s infinite; }
body.started .hero { animation: introDrop 1s .15s cubic-bezier(.2, 1.4, .4, 1) backwards; }
body.started .p1 { animation: introZoom 1s .35s cubic-bezier(.2, 1.3, .4, 1) backwards; }
body.started .p2 { animation: introLeft 1s .6s cubic-bezier(.2, 1.3, .4, 1) backwards; }
body.started .p3 { animation: introRight 1s .7s cubic-bezier(.2, 1.3, .4, 1) backwards; }
body.started .sig-script { animation: introFade 1.2s 1.1s backwards; }
@keyframes introDrop { from { opacity: 0; transform: translateY(-120px) scale(.8); } }
@keyframes introZoom { from { opacity: 0; transform: scale(.4); filter: blur(10px) brightness(3); } }
@keyframes introLeft { from { opacity: 0; transform: translateX(-300px) rotate(-6deg); } }
@keyframes introRight { from { opacity: 0; transform: translateX(300px) rotate(6deg); } }
@keyframes introFade { from { opacity: 0; transform: scale(.5); } }

/* =========================== PORTRAIT =========================== */
#stage.portrait { width: 1080px; height: 1920px; }
.portrait #shake { padding-top: 250px; }
.portrait .logo-sign { left: 50%; top: 6px; margin-left: -136px; scale: .82; transform-origin: 0 0; }
.portrait .title { font-size: 86px; }
.portrait .period { font-size: 32px; }
.portrait .p1 { width: 980px; height: 330px; margin-top: 84px; }
.portrait .digits.big { --cw: 134px; --ch: 252px; --fs: 226px; height: 252px; top: 38px; }
.portrait .p1 .mw-a { right: auto; left: 120px; top: auto; bottom: -176px; transform: none; }
.portrait .p1 .mw-b { left: auto; right: 150px; top: auto; bottom: -160px; transform: none; }
.portrait .row { flex-direction: column; align-items: center; margin-top: 250px; }
.portrait .sig-script { height: 190px; width: 100%; }
.portrait .sig-script span { display: none; }
.portrait .p3 .mw-side { right: 60px; top: auto; bottom: -140px; transform: none; }
.portrait .p3 .mw-bottom { left: 36%; }
.portrait .p2, .portrait .p3 { width: 780px; }

/* =========================== CALLOUT =========================== */
#callout { position: fixed; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; padding-bottom: var(--free, 0px); pointer-events: none; opacity: 0; transition: opacity .45s; }
#callout.show { opacity: 1; pointer-events: auto; cursor: pointer; }
#callout::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, rgba(90, 40, 0, .5), rgba(20, 4, 14, .72) 72%); }
.co-rays { position: absolute; left: 50%; top: 50%; width: 220vmax; height: 220vmax; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 210, 120, .17) 0 5deg, transparent 5deg 14deg);
  -webkit-mask-image: radial-gradient(circle, #000 0, transparent 45%); mask-image: radial-gradient(circle, #000 0, transparent 45%);
  animation: raySpin 22s linear infinite; }
@keyframes raySpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.co-inner { position: relative; display: flex; flex-direction: column; align-items: center; opacity: 0; }
#callout.show .co-inner { animation: coIn 1s cubic-bezier(.18, 1.45, .35, 1) forwards; }
@keyframes coIn { 0% { opacity: 0; transform: scale(.2) rotate(-8deg); filter: blur(14px) brightness(4); } 60% { opacity: 1; filter: blur(0) brightness(1.4); } 100% { opacity: 1; transform: scale(1); filter: none; } }
.co-label { font-size: 0; }
.co-label .plaque { --ph: min(11vmin, 100px); --fs: min(6.4vmin, 60px); --cut: polygon(4.6vmin 0, calc(100% - 4.6vmin) 0, 100% 50%, calc(100% - 4.6vmin) 100%, 4.6vmin 100%, 0 50%); }
.co-label .wing { width: 12vmin; }
.co-num { display: flex; justify-content: center; margin: 2vmin 0 1vmin; --fs: min(22vw, 32vh); --cw: calc(var(--fs) * .6); --ch: calc(var(--fs) * 1.12); animation: coPulse 1.4s ease-in-out infinite; }
.co-num.long { --fs: min(14vw, 28vh); }
@keyframes coPulse { 50% { transform: scale(1.04); } }
.co-prize { font-size: min(5.4vmin, 52px); font-weight: 600; color: #ffeec2; text-shadow: 0 0 .5em rgba(255, 190, 80, .8), 0 .08em .2em #000; }
.co-prize em { font-style: normal; color: #ffd36b; }

/* =========================== SPLASH =========================== */
#splash { position: fixed; inset: 0; z-index: 15; display: flex; align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(circle at 50% 45%, rgba(60, 15, 50, .25), rgba(0, 0, 0, .82) 70%); transition: opacity .9s, transform .9s; }
#splash.hide { opacity: 0; transform: scale(1.2); pointer-events: none; }
.sp-inner { display: flex; flex-direction: column; align-items: center; }
.sp-logo { width: min(24vmin, 200px); padding: min(2.2vmin, 18px); border-radius: 26px; background: #fff;
  box-shadow: 0 0 0 4px #f1cd74, 0 0 0 8px #6b4510, 0 0 60px rgba(255, 200, 90, .6), 0 20px 50px rgba(0, 0, 0, .7); animation: floaty 5s ease-in-out infinite; }
.sp-logo img { width: 100%; display: block; }
.sp-title { margin-top: 4vmin; font-size: min(8vmin, 84px); font-weight: 800; line-height: 1.15; color: transparent;
  background: linear-gradient(100deg, #f3c04f, #fff7d6 25%, #c88d2a 50%, #fff7d6 75%, #e2a93f); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 4px 0 #6d430b) drop-shadow(0 0 20px rgba(255, 190, 80, .5)); animation: shine 5s linear infinite; }
.sp-period { font-size: min(3.6vmin, 30px); color: #f6ead0; margin-top: .4vmin; }
.start-btn { margin-top: 5vmin; font-size: min(3.6vmin, 32px); font-weight: 700; padding: .55em 1.8em; border: 0; border-radius: 999px; cursor: pointer; color: #2b1903;
  background: linear-gradient(180deg, #fff5cf, #f0cf7c 40%, #c08a2c 60%, #fbe4a2);
  box-shadow: 0 0 0 3px #4a3008, 0 0 0 6px #f1cd74, 0 0 40px rgba(255, 200, 90, .7); animation: btnPulse 1.6s ease-in-out infinite; }
@keyframes btnPulse { 50% { transform: scale(1.06); box-shadow: 0 0 0 3px #4a3008, 0 0 0 6px #f1cd74, 0 0 80px rgba(255, 200, 90, 1); } }
.sp-hint { margin-top: 2.4vmin; font-size: min(2.4vmin, 18px); color: rgba(255, 240, 210, .6); }

/* =========================== TOOLS / ADMIN =========================== */
.tools { position: fixed; right: 14px; bottom: 12px; z-index: 12; display: flex; gap: 8px; opacity: .22; transition: opacity .3s; }
.tools:hover { opacity: 1; }
.tools button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 215, 120, .5); background: rgba(20, 10, 0, .6); color: #ffe7a6; font-size: 18px; cursor: pointer; }
#toast { position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 40px); z-index: 30; padding: 12px 26px; border-radius: 999px;
  background: rgba(30, 18, 4, .92); color: #ffe7a6; box-shadow: 0 0 0 1.5px #c99a3b, 0 10px 30px rgba(0, 0, 0, .6); font-size: 18px; opacity: 0; transition: .35s; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.modal { position: fixed; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; background: rgba(0, 0, 0, .62); backdrop-filter: blur(6px); }
.modal.open { display: flex; }
.card { width: min(640px, 94vw); max-height: 92vh; overflow: auto; padding: 24px 26px; border-radius: 22px; user-select: text; -webkit-user-select: text;
  background: linear-gradient(180deg, rgba(34, 20, 4, .97), rgba(10, 5, 0, .98)); color: #f8ecd0;
  box-shadow: 0 0 0 2px #c99a3b, 0 30px 80px rgba(0, 0, 0, .8), 0 0 50px rgba(255, 190, 80, .25); animation: cardIn .35s cubic-bezier(.2, 1.4, .4, 1); }
.card.small { width: min(400px, 92vw); }
@keyframes cardIn { from { transform: scale(.85); opacity: 0; } }
.card-h { font-size: 24px; font-weight: 700; color: #ffd76a; margin-bottom: 14px; }
.card label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: #e8d7ad; flex: 1 1 45%; }
.card label.full { flex-basis: 100%; }
.card fieldset { display: flex; flex-wrap: wrap; gap: 10px 14px; border: 1px solid rgba(201, 154, 59, .45); border-radius: 14px; padding: 10px 14px 14px; margin-top: 12px; }
.card legend { padding: 0 8px; color: #ffd76a; font-weight: 600; }
.card input { width: 100%; background: #0d0802; border: 1px solid #7a5a20; color: #ffe7a6; font: 500 18px 'Kanit', sans-serif; padding: 8px 12px; border-radius: 10px; outline: none; }
.card input:focus { border-color: #ffd76a; box-shadow: 0 0 0 3px rgba(255, 215, 106, .2); }
.card input.num { font-size: 26px; letter-spacing: 6px; text-transform: uppercase; }
.err { color: #ff7a8a; min-height: 20px; font-size: 14px; margin-top: 8px; }
.btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.btns.wrap { flex-wrap: wrap; justify-content: flex-start; }
.btn { border: 1px solid #a07a2c; background: rgba(60, 38, 8, .8); color: #ffe7a6; font-size: 15px; padding: 9px 14px; border-radius: 10px; cursor: pointer; }
.btn:hover { background: rgba(100, 66, 14, .9); }
.btn.gold { background: linear-gradient(180deg, #fff1c0, #e2b34e 50%, #b98423); color: #2b1903; font-weight: 700; border-color: #fff1c0; }
.btn.ghost { background: transparent; }
.help { margin-top: 14px; font-size: 13px; line-height: 1.6; color: #cdb98b; border-top: 1px solid rgba(201, 154, 59, .3); padding-top: 10px; }

/* =========================== WELCOME BALLS (running) =========================== */
.ls-welcome { position: absolute; inset: 0; pointer-events: none; }
.wb { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  offset-path: path('M 24.8 142.2 A 141.6 134.5 0 0 0 305.2 142.2'); offset-rotate: 0deg; offset-anchor: 50% 50%;
  offset-distance: calc(var(--p) * 1%); animation: wbRun 5.5s ease-in-out infinite; }
@keyframes wbRun { 0%, 100% { offset-distance: calc(var(--p) * 1% - 5%); } 50% { offset-distance: calc(var(--p) * 1% + 5%); } }
.wb-in { position: relative; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8d8 0%, #f6cf5e 40%, #b07a1e 80%, #7a4f12 100%);
  box-shadow: 0 0 0 2px #fff3c4, 0 4px 6px rgba(0, 0, 0, .55);
  animation: wbJump 1.6s cubic-bezier(.3, 0, .3, 1) infinite; animation-delay: calc(var(--i) * .13s); }
.wb-in::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255, 230, 150, .95), rgba(255, 60, 90, .35) 45%, transparent 70%);
  animation: wbGlow 1.6s ease-out infinite; animation-delay: calc(var(--i) * .13s); }
.wb-in b { position: relative; font-size: 19px; font-weight: 800; color: #b3122e; text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
  animation: wbSpin 6s ease-in-out infinite; animation-delay: calc(var(--i) * .2s); }
@keyframes wbJump { 0%, 30%, 100% { transform: translateY(0) scale(1); } 12% { transform: translateY(-14px) scale(1.18); } 20% { transform: translateY(2px) scale(.95, 1.05); } }
@keyframes wbGlow { 0%, 30%, 100% { opacity: 0; } 10% { opacity: 1; } }
@keyframes wbSpin { 0%, 80%, 100% { transform: rotateY(0); } 90% { transform: rotateY(360deg); } }

/* =========================== PRIZE 1 LUXURY FRAME =========================== */
.p1.lux { border-radius: 50px;
  background:
    radial-gradient(70% 70% at 50% -8%, rgba(255, 215, 130, .26), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 215, 130, .05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(-45deg, rgba(255, 215, 130, .05) 0 1px, transparent 1px 28px),
    radial-gradient(120% 100% at 50% 50%, #1a0a05 0%, #060102 72%);
  box-shadow: inset 0 0 0 3px #f2cc6c, inset 0 0 0 7px #120900, inset 0 0 0 8.5px rgba(242, 204, 108, .75), inset 0 0 0 11px #120900,
    inset 0 0 110px rgba(255, 170, 60, .22); }
.p1.lux::before { inset: -36px; border-radius: 84px;
  background:
    repeating-linear-gradient(45deg, rgba(60, 30, 0, .22) 0 2px, transparent 2px 7px),
    linear-gradient(135deg, #5e3a07, #fbe39a 14%, #a8731f 28%, #fff6d2 42%, #b07a22 56%, #ffe7a0 70%, #8a5a12 84%, #f3cf6e);
  box-shadow: 0 0 0 2px #2a1604, inset 0 0 0 3px rgba(255, 248, 210, .75), inset 0 0 0 6px rgba(90, 55, 8, .55),
    0 0 90px 18px rgba(255, 190, 80, .5), 0 34px 80px rgba(0, 0, 0, .85); }
.p1.lux::after { inset: -17px; border-radius: 64px; border: 13px solid transparent;
  background:
    radial-gradient(70% 70% at 50% -8%, rgba(255, 215, 130, .26), transparent 70%) padding-box,
    repeating-linear-gradient(45deg, rgba(255, 215, 130, .05) 0 1px, transparent 1px 28px) padding-box,
    repeating-linear-gradient(-45deg, rgba(255, 215, 130, .05) 0 1px, transparent 1px 28px) padding-box,
    radial-gradient(120% 100% at 50% 50%, #1a0a05 0%, #060102 72%) padding-box,
    linear-gradient(180deg, #7a0c22 0%, #3a0010 55%, #5a0618 100%) border-box;
  box-shadow: 0 0 0 2px #ffe7a0, 0 0 0 4px #3d2706,
    inset 0 0 0 3px #f2cc6c, inset 0 0 0 7px #120900, inset 0 0 0 8.5px rgba(242, 204, 108, .75), inset 0 0 0 11px #120900, inset 0 0 110px rgba(255, 170, 60, .22); }
.p1.lux .bulb { width: 12px; height: 12px; margin: -6px 0 0 -6px; }
.p1.lux .bgrp:nth-child(2) .bulb { background: radial-gradient(circle at 38% 35%, #fff 0 22%, #ffd0dc 45%, #e0254a 85%); box-shadow: 0 0 8px 2px rgba(255, 90, 120, .85); }
.lux-runner { position: absolute; inset: -36px; border-radius: 84px; padding: 9px; overflow: hidden; z-index: -1; pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.lux-runner i { position: absolute; left: 50%; top: 50%; width: 1600px; height: 1600px; margin: -800px 0 0 -800px; will-change: transform;
  background: conic-gradient(from 0deg, transparent 0 28%, rgba(255, 255, 255, .95) 33%, rgba(255, 210, 120, .5) 36%, transparent 41%, transparent 78%, rgba(255, 255, 255, .95) 83%, rgba(255, 210, 120, .5) 86%, transparent 91%);
  animation: spin 5s linear infinite; }
.lux-corners { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.lc { position: absolute; width: 132px; height: 132px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6)) drop-shadow(0 0 10px rgba(255, 200, 90, .45)); }
.lc svg { width: 100%; height: 100%; display: block; }
.lc.tl { left: -44px; top: -44px; } .lc.tr { right: -44px; top: -44px; transform: scaleX(-1); }
.lc.bl { left: -44px; bottom: -44px; transform: scaleY(-1); } .lc.br { right: -44px; bottom: -44px; transform: scale(-1, -1); }
.lux-glints { position: absolute; inset: 14px; pointer-events: none; z-index: 1; overflow: hidden; border-radius: 40px; }
.lux-glints i { position: absolute; width: 30px; height: 30px; will-change: transform, opacity; animation: twinkle 3.4s ease-in-out infinite; mix-blend-mode: screen; }
.lux-glints i::before, .lux-glints i::after { content: ''; position: absolute; left: 50%; top: 50%; background: radial-gradient(ellipse, #fff 0 20%, rgba(255, 220, 150, .7) 40%, transparent 70%); }
.lux-glints i::before { width: 30px; height: 3px; margin: -1.5px 0 0 -15px; }
.lux-glints i::after { width: 3px; height: 30px; margin: -15px 0 0 -1.5px; }
.lux-glints i:nth-child(1) { left: 6%; top: 18%; animation-delay: -.4s; } .lux-glints i:nth-child(2) { left: 92%; top: 22%; animation-delay: -1.5s; }
.lux-glints i:nth-child(3) { left: 14%; top: 78%; animation-delay: -2.4s; } .lux-glints i:nth-child(4) { left: 86%; top: 76%; animation-delay: -.9s; }
.lux-glints i:nth-child(5) { left: 50%; top: 88%; animation-delay: -2s; } .lux-glints i:nth-child(6) { left: 33%; top: 8%; animation-delay: -3s; }
.p1.lux .plaque { top: -64px; --ph: 108px; --fs: 64px; }
.p1.lux .plaque .wing { width: 150px; height: 4px; }

/* =========================== MEDAL EFFECTS =========================== */
.medal { perspective: 700px; }
.m-flip { position: relative; z-index: 1; will-change: transform; animation: mFlip 9s ease-in-out infinite; animation-delay: var(--d); transform-style: preserve-3d; }
@keyframes mFlip { 0%, 84%, 100% { transform: rotateY(0); } 94% { transform: rotateY(360deg); } }
.m-rays { position: absolute; left: 50%; top: 42%; width: 190%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; z-index: 0; will-change: transform;
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 140, .42) 0 4deg, transparent 4deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 62%); mask-image: radial-gradient(circle, #000 18%, transparent 62%);
  animation: mRays 16s linear infinite; }
@keyframes mRays { to { transform: translate(-50%, -50%) rotate(360deg); } }
.m-halo { position: absolute; left: 50%; top: 42%; width: 120%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; z-index: 0; pointer-events: none; will-change: transform, opacity;
  background: radial-gradient(circle, rgba(255, 220, 140, .6), rgba(255, 140, 60, .18) 45%, transparent 68%); animation: mHalo 2.6s ease-in-out infinite; animation-delay: var(--d); }
@keyframes mHalo { 50% { transform: translate(-50%, -50%) scale(1.18); opacity: .6; } }
.m-spk { position: absolute; z-index: 2; width: 26px; height: 26px; pointer-events: none; will-change: transform, opacity; animation: twinkle 2.4s ease-in-out infinite; mix-blend-mode: screen; }
.m-spk::before, .m-spk::after { content: ''; position: absolute; left: 50%; top: 50%; background: radial-gradient(ellipse, #fff 0 20%, rgba(255, 220, 150, .7) 40%, transparent 70%); }
.m-spk::before { width: 26px; height: 3px; margin: -1.5px 0 0 -13px; } .m-spk::after { width: 3px; height: 26px; margin: -13px 0 0 -1.5px; }
.m-spk.k1 { left: 8%; top: 12%; animation-delay: calc(var(--d) * .3); } .m-spk.k2 { right: 4%; top: 46%; animation-delay: calc(var(--d) * .5 - .8s); }
.m-spk.k3 { left: 22%; bottom: 22%; animation-delay: calc(var(--d) * .7 - 1.6s); }

/* =========================== PRIZE 1 — GLASS CRYSTAL (overrides lux) =========================== */
.p1.lux { background: transparent; border-radius: 50px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, .5), 0 0 140px 30px rgba(255, 205, 130, .22); }
.p1.lux::before { inset: -32px; border-radius: 82px; padding: 20px; z-index: -2; box-shadow: none;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .18) 16%, rgba(255, 255, 255, .62) 30%, rgba(255, 255, 255, .1) 46%, rgba(255, 255, 255, .7) 62%, rgba(255, 255, 255, .14) 80%, rgba(255, 255, 255, .85) 100%),
    conic-gradient(from 210deg, #ffd3e6, #c4ecff, #fff1c2, #dcd0ff, #c9fff0, #ffd3e6);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; opacity: .88; }
.lux-edge { position: absolute; inset: -32px; border-radius: 82px; z-index: -1; pointer-events: none;
  border: 2px solid rgba(255, 244, 214, .95);
  box-shadow: 0 0 0 1px rgba(150, 105, 30, .7), 0 0 22px rgba(255, 225, 170, .55), inset 0 0 14px rgba(255, 255, 255, .45); }
.lux-edge::after { content: ''; position: absolute; inset: 18px; border-radius: 62px; border: 2px solid rgba(255, 236, 190, .9); box-shadow: 0 0 0 1px rgba(150, 105, 30, .8); }
.p1.lux::after { inset: -12px; border-radius: 62px; border: 1.5px solid rgba(255, 250, 232, .85);
  background:
    linear-gradient(172deg, rgba(255, 255, 255, .26) 0%, rgba(255, 255, 255, .07) 26%, rgba(255, 255, 255, 0) 44%),
    radial-gradient(110% 90% at 50% 125%, rgba(255, 190, 90, .2), transparent 60%),
    linear-gradient(180deg, rgba(36, 16, 46, .46), rgba(10, 3, 18, .66));
  -webkit-backdrop-filter: blur(14px) saturate(1.5) brightness(.8); backdrop-filter: blur(14px) saturate(1.5) brightness(.8);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .8), inset 0 -2px 0 rgba(255, 255, 255, .2), inset 0 0 60px rgba(255, 255, 255, .07), inset 0 -40px 70px rgba(0, 0, 0, .35); }
.lux-runner { inset: -32px; border-radius: 82px; padding: 20px; }
.lux-runner i { background: conic-gradient(from 0deg, transparent 0 26%, rgba(255, 255, 255, .95) 32%, rgba(190, 230, 255, .6) 35%, transparent 41%, transparent 76%, rgba(255, 255, 255, .95) 82%, rgba(255, 210, 230, .6) 85%, transparent 91%); animation-duration: 6s; }
.lux-gloss { position: absolute; inset: -12px; border-radius: 62px; overflow: hidden; pointer-events: none; z-index: 3; }
.lux-gloss::before { content: ''; position: absolute; left: 3%; right: 3%; top: 0; height: 46%; border-radius: 0 0 50% 50% / 0 0 26% 26%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .03) 80%, transparent); }
.lux-gloss::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: 0; width: 22%; will-change: transform;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16) 40%, rgba(255, 255, 255, .32) 50%, rgba(255, 255, 255, .16) 60%, transparent);
  transform: translateX(-140%) skewX(-18deg); animation: glossSweep 7s ease-in-out infinite; }
@keyframes glossSweep { 0%, 55% { transform: translateX(-140%) skewX(-18deg); } 100% { transform: translateX(560%) skewX(-18deg); } }
.p1.lux .bulb { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  background: radial-gradient(circle at 38% 35%, #fff 0 26%, #eef9ff 46%, #a8dcff 86%); box-shadow: 0 0 8px 2px rgba(205, 238, 255, .9); }
.p1.lux .bgrp:nth-child(2) .bulb { background: radial-gradient(circle at 38% 35%, #fff 0 22%, #ffeeb0 42%, #e7a83a 82%); box-shadow: 0 0 8px 2px rgba(255, 214, 120, .85); }
.p1.lux .lc { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)) drop-shadow(0 0 12px rgba(220, 240, 255, .6)); }
.p1.lux .lc.tl { left: -46px; top: -46px; } .p1.lux .lc.tr { right: -46px; top: -46px; }
.p1.lux .lc.bl { left: -46px; bottom: -46px; } .p1.lux .lc.br { right: -46px; bottom: -46px; }
.no-blur .p1.lux::after { -webkit-backdrop-filter: none; backdrop-filter: none;
  background: linear-gradient(172deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .05) 30%, transparent 46%), linear-gradient(180deg, rgba(40, 18, 52, .9), rgba(12, 4, 22, .94)); }

/* =========================== LITE (iPad / low power) =========================== */
.lite .digits::after { mix-blend-mode: normal; opacity: .35; }
.lite .ls-rays, .lite .ls-halo, .lite .ls-flare, .lite .ls-star, .lite .m-spk, .lite .lux-glints i, .lite .plaque .twk { mix-blend-mode: normal; }
.lite .ls-rays { opacity: .6; }
.lite .lux-glints i:nth-child(n+4) { display: none; }
/* backdrop-filter over a live WebGL canvas re-blurs every frame — use a solid glass look instead */
.lite .p1.lux::after { -webkit-backdrop-filter: none; backdrop-filter: none;
  background: linear-gradient(172deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .05) 30%, transparent 46%), linear-gradient(180deg, rgba(40, 18, 52, .9), rgba(12, 4, 22, .94)); }
.lite .modal { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(0, 0, 0, .8); }
/* animated CSS filters force a full repaint every frame on iPad: keep them static */
.lite .ls-logo img { animation: logoSpin 7s cubic-bezier(.65, 0, .3, 1) infinite; filter: drop-shadow(0 0 6px rgba(220, 30, 70, .5)); }
.lite .panel, .lite .hero { transition: transform .7s cubic-bezier(.2, .9, .25, 1.15), opacity .7s; }
.lite body.suspense .panel:not(.focus), .lite body.suspense .hero, .lite body.suspense .logo-sign, .lite body.suspense .sig-script { filter: none; opacity: .18; }
.lite body.started .p1 { animation-name: introZoomLite; }
@keyframes introZoomLite { from { opacity: 0; transform: scale(.4); } }
.lite #callout.show .co-inner { animation-name: coInLite; }
@keyframes coInLite { 0% { opacity: 0; transform: scale(.2) rotate(-8deg); } 60% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }
.lite .win.pop { animation-name: segPopLite; }
.lite .ls-flare .f-streak { filter: none; }

/* admin extras */
.card fieldset.money { border-color: rgba(255, 215, 106, .7); background: rgba(255, 215, 106, .05); }
.card input.amt { font-size: 22px; letter-spacing: 1px; }
.card .hint { flex-basis: 100%; font-size: 12.5px; color: #cdb98b; }
.card label.chk { flex-direction: row; align-items: center; gap: 8px; }
.card label.chk input { width: auto; }
.card input[type=range] { padding: 0; accent-color: #f2c35a; }
