.dice-overlay { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; pointer-events: none; background: #080b0fa6; backdrop-filter: blur(3px); }
.dice-tray { display: grid; place-items: center; gap: 12px; width: min(330px, 88vw); box-sizing: border-box; padding: 28px 24px 28px; background: radial-gradient(ellipse at 50% 35%,#2b3136,#141a20 75%); border: 1px solid #b8915945; border-radius: 18px; box-shadow: 0 25px 90px #000a, inset 0 1px #fff1; }
.dice-tray p { margin: 0; min-width: 150px; text-align: center; color: #e4cc9d; font: 20px Georgia, serif; }
.dice-scene { position: relative; width: 240px; height: 204px; perspective: 650px; }
.dice-shadow { position: absolute; left: 55px; top: 148px; width: 130px; height: 30px; border-radius: 50%; background: #000; filter: blur(12px); opacity: .65; }
.dice-flight { position: absolute; left: 76px; top: 60px; width: 88px; height: 88px; transform-style: preserve-3d; }
.dice-view, .dice-cube { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.dice-view { transform: rotateX(-42deg) rotateY(-28deg); }
.dice-face { position: absolute; inset: 0; box-sizing: border-box; display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); place-items: center; padding: 15px; border: 1px solid #fae6be; border-radius: 5px; background: linear-gradient(135deg,#fff1ce 0%,#e8cc92 45%,#c6a366 100%); box-shadow: inset 0 0 0 2px #f9dfab, inset 0 0 12px #9c74304d; backface-visibility: hidden; }
.dice-face::after { content: ''; position: absolute; inset: 3px; border-radius: 3px; box-shadow: inset 1px 1px 2px #fff8, inset -1px -1px 3px #69471150; pointer-events: none; }
.dice-face-1 { transform: translateZ(44px); }
.dice-face-6 { transform: rotateY(180deg) translateZ(44px); }
.dice-face-3 { transform: rotateY(90deg) translateZ(44px); background: linear-gradient(135deg,#ddbd80,#ae874e); }
.dice-face-4 { transform: rotateY(-90deg) translateZ(44px); }
.dice-face-2 { transform: rotateX(90deg) translateZ(44px); background: linear-gradient(135deg,#fff6db,#e5c68b); }
.dice-face-5 { transform: rotateX(-90deg) translateZ(44px); }
.dice-face span { width: 12px; height: 12px; border-radius: 50%; opacity: 0; background: radial-gradient(circle at 60% 70%,#493724,#201b16 75%); box-shadow: inset 1px 2px 3px #000b, 0 1px 1px #fff9; }
.dice-face span.visible { opacity: 1; }
.dice-overlay[data-state="rolling"] .dice-flight { transform: translate3d(-24px,-54px,0); }
.dice-overlay[data-state="rolling"] .dice-shadow { transform: translateX(-24px) scale(.65); opacity: .2; }
@media (prefers-reduced-motion: reduce) {
  .dice-overlay[data-state="rolling"] .dice-flight { transform: none; }
  .dice-overlay[data-state="rolling"] .dice-shadow { transform: none; opacity: .65; }
}
