/* The real board owns the reveal; this screen is only the idle Max Win result. */
.dwd-max-popup{position:fixed;inset:0;width:100%;height:100dvh;z-index:1400;isolation:isolate;overflow:hidden;background:#08060e;color:#fff1ce;font:400 20px/1.2 'Pricedown',system-ui,sans-serif;outline:0;touch-action:manipulation;cursor:pointer}
.dwd-max-popup *{box-sizing:border-box}
.dwd-max-background{position:absolute;inset:-3%;background:#08060e var(--ritual-background) center 60%/cover no-repeat;animation:dwd-max-background 12s ease-in-out infinite alternate;pointer-events:none}
.dwd-max-shade{position:absolute;inset:0;background:linear-gradient(#08050e65,#08050e10 30%,#08050e35 70%,#08050ecc);pointer-events:none}
.dwd-max-popup-content{position:relative;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(12px,2dvh,24px);height:100%;width:100%;padding:max(24px,env(safe-area-inset-top)) 20px max(26px,env(safe-area-inset-bottom))}
.dwd-max-title{position:relative;flex:0 0 auto;width:min(660px,90vw);height:clamp(72px,16dvh,156px);animation:dwd-max-idle 3.4s ease-in-out infinite}
.dwd-max-verdict,.dwd-max-tear{display:block;object-fit:contain;width:100%;height:100%}
.dwd-max-tear{position:absolute;inset:0;pointer-events:none;visibility:hidden}
.dwd-max-tear-a{clip-path:inset(27% 0 56%);transform:translateX(var(--tear-x,0px))}
.dwd-max-tear-b{clip-path:inset(61% 0 24%);transform:translateX(calc(var(--tear-x,0px) * -1))}
.dwd-max-title.glitch .dwd-max-tear{visibility:visible}
.dwd-max-title.glitch .dwd-max-verdict{transform:translateX(calc(var(--tear-x,0px) * -.20))}
.dwd-max-amount{display:flex;flex:0 0 auto;align-items:center;justify-content:center;gap:.025em;font-size:clamp(35px,8.5vw,106px);line-height:1;height:1em;max-width:94%;color:#ffe100;margin-top:10px}
.dwd-max-amount>svg{display:block;height:1em;flex:0 1 auto;min-width:0;overflow:hidden;transform:rotate(var(--tilt));animation:dwd-max-digit 3.2s var(--delay) ease-in-out infinite}
.dwd-max-card{position:relative;display:flex;align-items:center;justify-content:center;flex:0 1 auto;min-height:0;width:min(22dvh,200px);max-width:48vw;height:min(33dvh,300px);animation:dwd-max-card-arrive .92s cubic-bezier(.16,.85,.23,1) both;transform-style:preserve-3d}
.dwd-max-card-face{position:relative;height:100%;aspect-ratio:2/3;max-width:100%;backface-visibility:hidden;animation:dwd-max-emblem 4.2s .94s ease-in-out infinite backwards}
.dwd-max-founder{display:block;width:100%;height:100%;object-fit:contain}
.dwd-max-card-halo{position:absolute;inset:-24%;background:var(--max-card-flare) center/contain no-repeat;opacity:0;pointer-events:none;animation:dwd-max-card-halo .9s ease-out both}
.dwd-max-card-sheen{position:absolute;inset:0;border-radius:5%;overflow:hidden;pointer-events:none}
.dwd-max-card-sheen:before{content:"";position:absolute;inset:-15% -45%;background:linear-gradient(110deg,transparent 33%,#fff7ce00 39%,#fff7ceaa 49%,#8bfff477 52%,transparent 62%);opacity:0;animation:dwd-max-card-sheen .65s .35s ease-out both}
.dwd-max-continue{display:block;margin:clamp(10px,3dvh,34px) 0 0;padding:12px 20px;max-width:95%;border:0;background:transparent;color:#fff;font:400 clamp(22px,3.8vw,37px)/1.1 'Pricedown',sans-serif;text-align:center;text-shadow:2px 3px #0b0614;cursor:pointer;animation:dwd-max-prompt 2s ease-in-out infinite}
.dwd-max-continue:focus-visible{outline:2px solid #7dffed;outline-offset:5px}.dwd-max-continue:hover{color:#ffe69c}
.dwd-max-chips{position:absolute;inset:0;z-index:2;overflow:hidden;pointer-events:none}
.dwd-max-chip{position:absolute;left:var(--chip-x);bottom:-18%;width:clamp(38px,6vw,76px);height:clamp(38px,6vw,76px);overflow:hidden;animation:dwd-max-chip 4.6s var(--chip-delay) linear infinite}
@keyframes dwd-max-background{from{transform:translate3d(-.6%,.3%,0) scale(1)}to{transform:translate3d(.6%,-.3%,0) scale(1.025)}}
@keyframes dwd-max-idle{0%,100%{transform:translateY(0) rotate(-1deg) scale(1)}50%{transform:translateY(-5px) rotate(1deg) scale(1.025)}}
@keyframes dwd-max-digit{0%,100%{transform:translateY(0) rotate(var(--tilt))}50%{transform:translateY(-3px) rotate(calc(var(--tilt) + 1deg))}}
@keyframes dwd-max-emblem{0%,100%{transform:translateY(3px) rotate(-4deg) scale(.96)}50%{transform:translateY(-5px) rotate(4deg) scale(1.04)}}
@keyframes dwd-max-card-arrive{0%{opacity:0;transform:perspective(850px) translate3d(-18px,55px,0) rotateY(-76deg) rotateZ(-17deg) scale(.22)}18%{opacity:1}48%{transform:perspective(850px) translate3d(0,-15px,0) rotateY(16deg) rotateZ(3deg) scale(1.12)}74%{transform:perspective(850px) translate3d(0,4px,0) rotateY(-7deg) rotateZ(-2deg) scale(.97)}100%{opacity:1;transform:perspective(850px) translate3d(0,0,0) rotateY(0deg) rotateZ(0deg) scale(1)}}
@keyframes dwd-max-card-halo{0%,100%{opacity:0;transform:scale(.35) rotate(-15deg)}42%{opacity:.65;transform:scale(1.15) rotate(8deg)}76%{opacity:.16;transform:scale(1.3) rotate(18deg)}}
@keyframes dwd-max-card-sheen{0%{opacity:0;transform:translateX(-45%) skewX(-12deg)}20%{opacity:.75}75%{opacity:.5}100%{opacity:0;transform:translateX(45%) skewX(-12deg)}}
@keyframes dwd-max-prompt{0%,100%{opacity:.65}50%{opacity:1}}
@keyframes dwd-max-chip{0%{opacity:0;transform:translate3d(0,0,0) rotate(-30deg)}12%,85%{opacity:1}100%{opacity:0;transform:translate3d(var(--chip-drift),-125dvh,0) rotate(250deg)}}
@media(max-height:540px) and (min-aspect-ratio:1/1){.dwd-max-popup-content{gap:8px;padding:16px}.dwd-max-title{height:18dvh}.dwd-max-amount{font-size:min(76px,16dvh);margin-top:3px}.dwd-max-card{height:27dvh;width:18dvh}.dwd-max-continue{font-size:22px;margin-top:3px;padding:7px}}
@media(prefers-reduced-motion:reduce){.dwd-max-popup *,.dwd-max-popup *:before,.dwd-max-popup *:after{animation:none!important}}
.dwd-max-popup.reduced *,.dwd-max-popup.reduced *:before,.dwd-max-popup.reduced *:after{animation:none!important}
