/* Dice Roller & Probability Calculator */
.dice-input { display: flex; gap: .6rem; align-items: flex-end; }
.dice-input input { font-size: 1.15rem; font-weight: 600; }
.dice-presets { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.chip {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft);
  border-radius: 999px; padding: .35rem .75rem; font: 600 .82rem/1.2 var(--font-body); cursor: pointer; min-height: 32px;
}
.chip:hover { border-color: var(--gold); color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.dice-roll-out { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; padding: .75rem 1rem; background: var(--surface); border: 2px solid var(--gold); border-radius: var(--radius-sm); }
.dice-roll-out__total { font: 700 2.6rem/1 var(--font-serif); color: var(--accent); min-width: 2ch; text-align: center; }
.dice-roll-out__total.is-pop { animation: dicePop .35s ease-out; }
.dice-roll-out__detail { font-family: var(--font-mono); font-size: .92rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.die { display: inline-block; min-width: 1.8em; text-align: center; padding: .1em .3em; margin: 0 .1em; border-radius: 5px; background: var(--surface-3); }
.die.is-drop { text-decoration: line-through; opacity: .5; }
.die.is-max { background: var(--good-soft); color: var(--good); font-weight: 700; }
.die.is-min { background: var(--bad-soft); color: var(--bad); font-weight: 700; }
.dice-chart-wrap { margin-top: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem; }
.dice-history { margin: 0; padding-left: 1.4rem; font-size: .9rem; display: grid; gap: .2rem; }
.dice-history li::marker { color: var(--muted); }
.dice-table { margin-top: 1rem; }
.dice-table summary { cursor: pointer; font-weight: 700; }
@keyframes dicePop { 0% { transform: scale(.6) rotate(-12deg); opacity: 0; } 70% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
@media (max-width: 480px) { .dice-input { flex-direction: column; align-items: stretch; } }
