.yd-stage { max-width: 860px; display: grid; gap: 18px; }
.yd-table {
  background: radial-gradient(ellipse 90% 80% at 50% 0%, var(--felt), var(--felt-2));
  border-radius: 16px; padding: 22px 16px 16px; color: #f4ece4;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.yd-dice { display: flex; gap: clamp(8px, 2vw, 16px); justify-content: center; }
.yd-die {
  --d: clamp(48px, 14.5vw, 76px);
  width: var(--d); height: var(--d); flex: none;
  border: 0; border-radius: 16%;
  background: linear-gradient(145deg, #fffdf8, #ece4d6);
  box-shadow: 0 4px 0 #c9bba3, 0 8px 14px rgb(0 0 0 / .35);
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  padding: calc(var(--d) * .13); cursor: pointer; position: relative;
  transition: transform .15s;
}
.yd-die i { width: calc(var(--d) * .17); height: calc(var(--d) * .17); border-radius: 50%; background: #1b1b1f; place-self: center; visibility: hidden; }
.yd-die i.on { visibility: visible; }
.yd-die.blank { background: rgb(255 255 255 / .12); box-shadow: inset 0 0 0 2px rgb(255 255 255 / .25); cursor: default; }
.yd-die.held { transform: translateY(-8px); box-shadow: 0 0 0 3px #ffd54a, 0 4px 0 #c9bba3, 0 12px 16px rgb(0 0 0 / .35); }
.yd-die.held::after {
  content: 'HOLD'; position: absolute; left: 50%; bottom: -24px; transform: translateX(-50%);
  font: 800 11px system-ui, sans-serif; letter-spacing: .08em; color: #ffd54a;
}
.yd-die.shake { animation: yd-shake .45s ease; }
@keyframes yd-shake { 25% { transform: rotate(-14deg) translateY(-6px); } 50% { transform: rotate(10deg); } 75% { transform: rotate(-6deg) translateY(-3px); } }
.yd-rollrow { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.yd-roll { min-width: 140px; min-height: 46px; font-size: 16px; }
.yd-left { font-weight: 600; font-size: 14px; opacity: .85; }
.yd-help { margin: 0; font-size: 14px; opacity: .8; text-align: center; max-width: 520px; }

.yd-card { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
.yd-sheet { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.yd-sheet td { padding: 0; border-top: 1px solid var(--line); }
.yd-sheet tr:first-child td { border-top: 0; }
.yd-row {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 14px; border: 0; background: none; text-align: left; cursor: pointer; font-size: 15px;
}
.yd-row:disabled { cursor: default; }
.yd-row small { display: block; color: var(--muted); font-size: 12px; }
.yd-row .v { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.yd-row.can:not(:disabled):hover { background: var(--chip); }
.yd-row.can .v { color: var(--accent); }
.yd-row.can.zero .v { color: var(--muted); }
.yd-row.done .v { color: var(--text); }
.yd-row.just { animation: yd-flash .8s ease; }
.yd-sum { display: flex; justify-content: space-between; padding: 8px 14px; font-size: 14px; color: var(--muted); background: var(--chip); }
.yd-sum b { color: var(--text); }
@keyframes yd-flash { 30% { background: color-mix(in srgb, var(--accent) 25%, transparent); } }
