/* Money Flow V0.7: ruby and sapphire ivory-resin dice with gold inlay.
   Keep the real 3D faces and existing toss physics. No external libraries. */
.dice-holder.red{
  --marble:url("./dice-ruby-marble.webp");
  --rim:#f5b863;
  --deep:#430b1c;
  --accent-shadow:rgba(118,14,32,.37);
}
.dice-holder.blue{
  --marble:url("./dice-sapphire-marble.webp");
  --rim:#edc274;
  --deep:#0b265b;
  --accent-shadow:rgba(7,39,116,.41);
}
.dice-holder{
  filter:drop-shadow(0 8px 6px rgba(51,30,17,.75))
         drop-shadow(0 1px 5px var(--accent-shadow));
}
.dice-holder::after{
  background:radial-gradient(ellipse at center,var(--accent-shadow),rgba(40,24,15,.35) 47%,transparent 73%);
  width:110px;
  left:calc(50% - 55px);
  bottom:-17px;
  filter:blur(6px);
}
.dice-holder .die-face,
.dice-holder .die-face.front,
.dice-holder .die-face.back,
.dice-holder .die-face.right,
.dice-holder .die-face.left,
.dice-holder .die-face.top,
.dice-holder .die-face.bottom{
  border:2.3px solid var(--rim);
  border-radius:16px;
  background-image:
    linear-gradient(135deg,rgba(255,248,219,.42) 0%,rgba(255,255,255,.13) 23%,transparent 42%,rgba(0,0,0,.29) 100%),
    radial-gradient(ellipse at 24% 13%,rgba(255,255,255,.38),transparent 52%),
    var(--marble);
  background-size:cover,cover,cover;
  background-position:center;
  box-shadow:
    inset 2px 2px 4px rgba(255,249,215,.85),
    inset -5px -6px 9px rgba(20,7,14,.48),
    inset 0 0 1px rgba(20,8,17,.9),
    0 0 3px rgba(245,186,89,.4);
}
.dice-holder .die-face.front{
  background-image:
    linear-gradient(138deg,rgba(255,255,255,.52) 0%,rgba(255,255,255,.12) 24%,transparent 40%,rgba(10,2,8,.20) 100%),
    radial-gradient(ellipse at 24% 10%,rgba(255,255,255,.42),transparent 53%),
    var(--marble);
  box-shadow:
    inset 3px 3px 5px rgba(255,239,209,.78),
    inset -7px -8px 12px rgba(9,5,15,.39),
    0 0 4px rgba(232,181,111,.58);
}
.dice-holder .die-face.top{
  background-image:
    linear-gradient(135deg,rgba(255,255,255,.66),transparent 54%,rgba(2,3,15,.20)),
    var(--marble);
}
.dice-holder .die-face.right,
.dice-holder .die-face.left{
  background-image:
    linear-gradient(123deg,rgba(0,0,0,.04),rgba(5,3,15,.50)),
    var(--marble);
  border-color:#bf8b43;
  box-shadow:
    inset 3px 3px 5px rgba(255,235,184,.42),
    inset -9px -9px 14px rgba(3,4,13,.60);
}
.dice-holder .die-face.back,
.dice-holder .die-face.bottom{
  background-image:
    linear-gradient(135deg,rgba(0,0,0,.19),rgba(0,0,0,.43)),
    var(--marble);
}
.dice-holder .die-face::after{
  content:"";
  position:absolute;inset:3px;border-radius:12px;
  border:1px solid rgba(255,217,139,.48);
  box-shadow:inset 0 0 1px rgba(255,255,255,.25);
  pointer-events:none;
}
.dice-holder .die-face::before{
  content:"";
  position:absolute;z-index:1;inset:4px;
  pointer-events:none;border-radius:11px;
  background:
    linear-gradient(146deg,rgba(255,255,255,.33) 1%,rgba(255,255,255,.03) 31%,transparent 48%),
    radial-gradient(ellipse at 18% 8%,rgba(255,255,255,.23),transparent 55%);
  mix-blend-mode:screen;
}
.dice-holder .die-face .pip{
  position:relative;
  z-index:2;
  background:radial-gradient(circle at 31% 23%,
    #fff9d4 0%,#ffe7a4 14%,#e5b965 34%,#ae762d 68%,#59340f 100%);
  border:1px solid #694016;
  box-shadow:
    inset 1px 1px 1px rgba(255,255,255,.95),
    inset -2px -2px 2px rgba(54,25,7,.70),
    0 1px 0 rgba(23,7,9,.65),
    0 0 2px rgba(255,226,141,.7);
}
.dice-holder .die-face .pip::after{
  content:"";position:absolute;
  width:28%;height:24%;top:13%;left:20%;border-radius:50%;
  background:rgba(255,255,255,.85);filter:blur(.6px);pointer-events:none;
}
.dice-holder.rolling .dice-cube{filter:none}
@media(min-width:361px) and (max-width:600px){
  .dice-holder{--dice:93px}
  .die-face{padding:14px}
  .die-face .pip{width:11px;height:11px}
  .dice-row{margin-bottom:2px}
}
@media(max-width:360px){
  .dice-holder{--dice:84px}
  .die-face{padding:12px}
  .die-face .pip{width:10px;height:10px}
}
