:root{--cube-size: 76px;--cube-half: 38px}@media(min-width:640px){:root{--cube-size: 92px;--cube-half: 46px}}.dice-scene{perspective:900px;perspective-origin:50% 50%;display:inline-flex;align-items:center;justify-content:center;width:var(--cube-size);height:var(--cube-size);margin:8px}.cube-3d{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .85s cubic-bezier(.34,1.56,.64,1);cursor:pointer;border-radius:14px}.cube-face{position:absolute;width:var(--cube-size);height:var(--cube-size);background:var(--surface);border:2px solid var(--border-strong);border-radius:14px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);padding:10px;box-shadow:inset 0 0 10px #0000000d;backface-visibility:hidden;-webkit-backface-visibility:hidden}[data-theme=dark] .cube-face{background:#242436;border-color:#40405c;box-shadow:inset 0 0 12px #00000059}.pip{display:block;align-self:center;justify-self:center;width:12px;height:12px;border-radius:50%;background:var(--ink);box-shadow:inset 0 1px 2px #0006}@media(min-width:640px){.pip{width:15px;height:15px}}[data-theme=dark] .pip{background:#f1efe9;box-shadow:0 0 4px #fff3}.face-1{transform:rotateY(0) translateZ(var(--cube-half))}.face-2{transform:rotateY(90deg) translateZ(var(--cube-half))}.face-3{transform:rotateX(90deg) translateZ(var(--cube-half))}.face-4{transform:rotateX(-90deg) translateZ(var(--cube-half))}.face-5{transform:rotateY(-90deg) translateZ(var(--cube-half))}.face-6{transform:rotateY(180deg) translateZ(var(--cube-half))}.show-1{transform:rotateX(0) rotateY(0)}.show-2{transform:rotateX(0) rotateY(-90deg)}.show-3{transform:rotateX(-90deg) rotateY(0)}.show-4{transform:rotateX(90deg) rotateY(0)}.show-5{transform:rotateX(0) rotateY(90deg)}.show-6{transform:rotateX(0) rotateY(180deg)}@keyframes roll-spin{0%{transform:rotateX(0) rotateY(0) rotate(0) translateY(-20px) scale(1.08)}30%{transform:rotateX(360deg) rotateY(180deg) rotate(90deg) translateY(-40px) scale(1.15)}70%{transform:rotateX(540deg) rotateY(450deg) rotate(270deg) translateY(-10px) scale(1.05)}to{transform:rotateX(720deg) rotateY(720deg) rotate(360deg) translateY(0) scale(1)}}.cube-rolling{animation:roll-spin .85s cubic-bezier(.34,1.56,.64,1)}@keyframes poly-tumble{0%{transform:translateY(-24px) rotate(-25deg) scale(.92);filter:drop-shadow(0 15px 12px rgba(0,0,0,.15))}35%{transform:translateY(-44px) rotate(190deg) scale(1.18);filter:drop-shadow(0 25px 20px rgba(0,0,0,.25))}70%{transform:translateY(-8px) rotate(375deg) scale(1.05)}85%{transform:translateY(2px) rotate(358deg) scale(.98)}to{transform:translateY(0) rotate(360deg) scale(1);filter:drop-shadow(0 6px 8px rgba(0,0,0,.1))}}.poly-rolling{animation:poly-tumble .82s cubic-bezier(.34,1.56,.64,1) forwards}.natural-20{filter:drop-shadow(0 0 16px rgba(31,170,107,.8))!important;animation:nat-20-pulse 1.2s ease-in-out infinite alternate}@keyframes nat-20-pulse{0%{transform:scale(1);filter:drop-shadow(0 0 12px rgba(31,170,107,.7))}to{transform:scale(1.05);filter:drop-shadow(0 0 24px rgba(31,170,107,1))}}.natural-1{animation:nat-1-shake .65s cubic-bezier(.36,.07,.19,.97) both;filter:drop-shadow(0 0 14px rgba(229,72,77,.8))!important}@keyframes nat-1-shake{10%,90%{transform:translate3d(-2px,0,0) rotate(-2deg)}20%,80%{transform:translate3d(3px,0,0) rotate(2deg)}30%,50%,70%{transform:translate3d(-5px,0,0) rotate(-4deg)}40%,60%{transform:translate3d(5px,0,0) rotate(4deg)}to{transform:translateZ(0) rotate(0)}}.confetti-container{position:absolute;top:50%;left:50%;width:0;height:0;pointer-events:none;z-index:40}.confetti-particle{position:absolute;width:8px;height:8px;border-radius:2px;opacity:0;animation:confetti-burst .9s cubic-bezier(.25,1,.5,1) forwards}.cp-1{background:#ff5a36;--tx: -55px;--ty: -65px;--rot: 240deg;animation-delay:.02s}.cp-2{background:#1faa6b;--tx: 60px;--ty: -70px;--rot: 180deg;animation-delay:.04s}.cp-3{background:#5b4bff;--tx: -80px;--ty: -15px;--rot: 300deg;animation-delay:.01s}.cp-4{background:#facc15;--tx: 85px;--ty: -20px;--rot: 120deg;animation-delay:.05s}.cp-5{background:#ec4899;--tx: -45px;--ty: 50px;--rot: 420deg;animation-delay:.03s}.cp-6{background:#06b6d4;--tx: 50px;--ty: 55px;--rot: 200deg;animation-delay:.02s}.cp-7{background:#1faa6b;--tx: 0px;--ty: -90px;--rot: 90deg;animation-delay:.06s}.cp-8{background:#ff5a36;--tx: -70px;--ty: -45px;--rot: 150deg;animation-delay:.04s}.cp-9{background:#5b4bff;--tx: 70px;--ty: -45px;--rot: 280deg;animation-delay:.03s}.cp-10{background:#facc15;--tx: -30px;--ty: -80px;--rot: 360deg;animation-delay:.05s}.cp-11{background:#06b6d4;--tx: 30px;--ty: -80px;--rot: 210deg;animation-delay:.01s}.cp-12{background:#1faa6b;--tx: 0px;--ty: 70px;--rot: 170deg;animation-delay:.04s}@keyframes confetti-burst{0%{transform:translate(0) rotate(0) scale(.5);opacity:1}75%{opacity:1}to{transform:translate(var(--tx),var(--ty)) rotate(var(--rot)) scale(1);opacity:0}}@media(prefers-reduced-motion:reduce){.cube-3d{transition:transform .2s ease-out!important}.cube-rolling,.poly-rolling{animation:simple-fade .25s ease-out!important}.natural-20,.natural-1{animation:none!important}.confetti-container{display:none!important}}@keyframes simple-fade{0%{opacity:.3;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@keyframes dice-battle-tumble{0%{transform:scale(.92) rotate(-8deg)}25%{transform:scale(1.08) rotate(12deg) translateY(-8px)}50%{transform:scale(.96) rotate(-14deg) translateY(4px)}75%{transform:scale(1.04) rotate(8deg) translateY(-4px)}90%{transform:scale(.98) rotate(-3deg) translateY(2px)}to{transform:scale(1) rotate(0) translateY(0)}}.animate-dice-battle-tumble{animation:dice-battle-tumble 1.1s cubic-bezier(.25,1,.5,1) infinite}@media(prefers-reduced-motion:reduce){.animate-dice-battle-tumble{animation:simple-fade .3s ease-out!important}}.battle-fullscreen-active{position:fixed!important;inset:0!important;z-index:99999!important;width:100vw!important;height:100vh!important;background:radial-gradient(circle at 50% 30%,#12192a,#080b12)!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;align-items:center!important;padding:1rem!important;overflow-y:auto!important;max-width:100vw!important;border-radius:0!important;border:none!important}.battle-fullscreen-active>div{width:100%!important;max-width:900px!important}@media(min-width:640px){.battle-fullscreen-active{padding:2rem!important}}:root{--coin-size: 148px;--coin-thickness: 10px}@media(min-width:640px){:root{--coin-size: 178px;--coin-thickness: 12px}}.coin-stage{perspective:1200px;perspective-origin:50% 50%;display:flex;align-items:center;justify-content:center;min-height:230px;position:relative;user-select:none;touch-action:manipulation}@media(min-width:640px){.coin-stage{min-height:280px}}.coin-3d-wrap{position:relative;width:var(--coin-size);height:var(--coin-size);transform-style:preserve-3d;cursor:pointer;outline:none;transition:transform .15s ease-out}.coin-3d-wrap:hover{filter:drop-shadow(0 14px 28px rgba(202,138,4,.45))}.coin-3d-wrap:active{transform:scale(.96)}.coin-disc{width:100%;height:100%;position:absolute;top:0;left:0;transform-style:preserve-3d;border-radius:50%;will-change:transform}.coin-face{position:absolute;inset:0;border-radius:50%;backface-visibility:hidden;-webkit-backface-visibility:hidden;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:10px 8px;box-shadow:inset 0 3px 6px #ffffffbf,inset 0 -4px 8px #78350fb3,inset 0 0 16px #b4530959,0 10px 25px #0000004d;overflow:hidden}.coin-face-heads{transform:rotateY(0);background:radial-gradient(circle at 35% 26%,#fffbeb,#fef08a 22%,#eab308 52%,#ca8a04 78%,#854d0e);border:4px solid #FDE047}.coin-face-tails{transform:rotateY(180deg);background:radial-gradient(circle at 35% 26%,#fffbeb,#fde68a 24%,#d97706 56%,#b45309 82%,#78350f);border:4px solid #FCD34D}.coin-beaded-rim{position:absolute;inset:3px;border-radius:50%;border:1.5px solid rgba(254,240,138,.9);pointer-events:none;box-shadow:inset 0 0 0 1.5px #78350f99}.coin-shadow{position:absolute;bottom:8px;width:calc(var(--coin-size) * .95);height:22px;background:radial-gradient(ellipse at center,rgba(0,0,0,.55) 0%,rgba(0,0,0,.2) 50%,transparent 75%);border-radius:50%;pointer-events:none;transition:transform .25s ease-out,opacity .25s ease-out;transform-origin:center center}.flipping-heads{animation:flipToHeads 1.1s cubic-bezier(.22,1,.36,1) forwards}.flipping-tails{animation:flipToTails 1.1s cubic-bezier(.22,1,.36,1) forwards}.shadow-flipping{animation:shadowPulse 1.1s cubic-bezier(.22,1,.36,1) forwards}@keyframes flipToHeads{0%{transform:translateY(0) rotateY(0) scale(1)}20%{transform:translateY(-90px) rotateY(450deg) scale(1.1)}45%{transform:translateY(-150px) rotateY(1080deg) scale(1.2)}70%{transform:translateY(-70px) rotateY(1620deg) scale(1.08)}88%{transform:translateY(0) rotateY(2160deg) scale(.96)}94%{transform:translateY(-12px) rotateY(2160deg) scale(1.02)}to{transform:translateY(0) rotateY(2160deg) scale(1)}}@keyframes flipToTails{0%{transform:translateY(0) rotateY(0) scale(1)}20%{transform:translateY(-90px) rotateY(450deg) scale(1.1)}45%{transform:translateY(-150px) rotateY(1080deg) scale(1.2)}70%{transform:translateY(-70px) rotateY(1620deg) scale(1.08)}88%{transform:translateY(0) rotateY(2340deg) scale(.96)}94%{transform:translateY(-12px) rotateY(2340deg) scale(1.02)}to{transform:translateY(0) rotateY(2340deg) scale(1)}}@keyframes shadowPulse{0%{transform:scale(1);opacity:.8}45%{transform:scale(.35);opacity:.15;filter:blur(4px)}88%{transform:scale(1.1);opacity:.9;filter:blur(0px)}to{transform:scale(1);opacity:.8}}.coin-fullscreen-active{position:fixed!important;inset:0!important;z-index:99999!important;width:100vw!important;height:100vh!important;background:radial-gradient(circle at 50% 40%,#1a1a28,#0a0a10)!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important;align-items:center!important;padding:1.5rem!important;overflow-y:auto!important}.coin-fullscreen-active .coin-stage{min-height:380px}@media(min-width:640px){.coin-fullscreen-active .coin-stage{min-height:440px}.coin-fullscreen-active{--coin-size: 215px}}
