/* Dice Roller: page-specific styles. Shared ones are in /assets/css/tool.css. */

.dice-types .seg { min-width: 58px; font-variant-numeric: tabular-nums; }

.roll-box { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }

.tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.die {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 10px;
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: 0 3px 6px rgba(28, 28, 28, 0.12);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.die.is-crit { background: var(--accent); border-color: var(--accent); color: #fff; }
.die.is-fumble { background: var(--highlight); border-color: var(--highlight); color: #fff; }

@keyframes die-in {
  0%   { opacity: 0; transform: translateY(-10px) rotate(-14deg) scale(0.9); }
  100% { opacity: 1; transform: none; }
}
.tray.is-fresh .die { animation: die-in 0.34s cubic-bezier(0.16, 1, 0.3, 1) both; }
.tray.is-fresh .die:nth-child(2) { animation-delay: 0.03s; }
.tray.is-fresh .die:nth-child(3) { animation-delay: 0.06s; }
.tray.is-fresh .die:nth-child(4) { animation-delay: 0.09s; }
.tray.is-fresh .die:nth-child(n+5) { animation-delay: 0.12s; }

.roll-total { display: flex; align-items: baseline; gap: 0.6rem; }
.roll-total-label {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--stone);
}
.crit {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
}
