.dice-stage{min-height:190px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:14px;padding:22px;border:1px dashed #b9ccdc;border-radius:14px;background:radial-gradient(circle at top,#fff,#edf4f9)}
.die{position:relative;display:grid;place-items:center;width:92px;height:92px;border:1px solid #d3dce5;border-radius:19px;background:#fff;box-shadow:0 10px 24px rgba(24,58,88,.15),inset 0 -4px 0 rgba(22,63,103,.06);color:var(--oc-primary-3);font-size:2rem;font-weight:900;user-select:none}
.die.rolling{animation:ocDiceRoll .48s cubic-bezier(.2,.8,.2,1)}
.die-label{font-size:1.7rem}.die-type{position:absolute;right:8px;bottom:6px;color:#7c8c9b;font-size:.65rem;font-weight:800;text-transform:uppercase}
.d6-face{display:grid;width:66px;height:66px;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr)}
.pip{align-self:center;justify-self:center;width:13px;height:13px;border-radius:50%;background:var(--oc-primary-3);box-shadow:inset 0 1px 1px rgba(255,255,255,.3)}
.dice-total{text-align:center}.dice-total .oc-result-main{font-size:3rem}
.dice-history{display:flex;flex-direction:column;gap:8px;max-height:240px;overflow:auto}
.dice-history-item{display:flex;justify-content:space-between;gap:12px;padding:9px 11px;border:1px solid var(--oc-border);border-radius:8px;background:var(--oc-surface)}
.dice-history-item span{color:var(--oc-muted);font-size:.83rem}
@keyframes ocDiceRoll{0%{transform:rotate(0) scale(.85)}45%{transform:rotate(190deg) scale(1.08)}100%{transform:rotate(360deg) scale(1)}}
@media(max-width:520px){.die{width:72px;height:72px;border-radius:15px}.d6-face{width:52px;height:52px}.pip{width:10px;height:10px}.dice-stage{min-height:150px;padding:14px}}


/* v9 Dice Roller: efficient desktop workspace, clean phone stack */
.dice-lower-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(260px,.75fr);gap:16px;align-items:stretch}
.dice-lower-grid>.oc-tool-card{height:100%;margin:0!important}
.dice-lower-grid .dice-stage{height:100%;min-height:220px}
@media(min-width:1121px){.dice-total{position:sticky;top:92px;align-self:start}}
@media(max-width:880px){
  .dice-lower-grid{grid-template-columns:1fr}
  .dice-lower-grid .dice-stage{min-height:165px}
  .dice-history{max-height:200px}
}
@media(max-width:540px){
  .dice-stage{gap:9px;padding:15px 9px}
  .die{width:66px;height:66px;border-radius:14px}
  .d6-face{width:48px;height:48px}
  .pip{width:9px;height:9px}
  .dice-history-item{gap:8px;padding:9px}
}
@media(max-width:360px){
  .die{width:60px;height:60px}
  .d6-face{width:44px;height:44px}
}
