.bones-game {
  padding: clamp(16px, 4vw, 36px);
  border-radius: 12px;
  border: 1px solid var(--game-border);
  background: #fff5dd;
  color: var(--game-ink);
}
.bones-game p { max-width: 38rem; }
.bones-tray {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 1.6vw, 12px);
  margin-bottom: 14px;
  padding: clamp(6px, 2vw, 18px);
  border: 1px solid #d5a866;
  border-radius: 12px;
  background: #f9d99b;
}
.bone-slot {
  display: grid;
  place-items: center;
  grid-template-rows: 1fr 1.3em;
  gap: 2px;
  min-width: 0;
  min-height: clamp(90px, 16vw, 142px);
  padding: clamp(3px, .85vw, 9px) 4px 7px;
  border: 1px solid #ba8f56;
  border-radius: 8px;
  background: #fff4d9;
  color: var(--game-ink);
  perspective: 360px;
}
.bone-slot:not(:disabled):hover { border-color: #885522; }
.bone-slot[aria-pressed='true'] { border-color: #895324; background: #ffdfa0; box-shadow: inset 0 0 0 1px #895324; }
.bone-slot[data-winning] { border-color: #775017; background: #ffd26b; box-shadow: inset 0 0 0 1px #775017; }
.bone-slot:disabled { cursor: default; }
.bones-game :focus-visible { outline: 2px solid #81511e; outline-offset: 3px; }

.bone-die {
  position: relative;
  display: grid;
  place-items: center;
  width: min(95%, 192px);
  transform: rotate(var(--bone-angle));
  filter: drop-shadow(0 7px 4px #69421567);
}
.bone-biscuit { width: 100%; height: auto; }
.bone-number {
  position: absolute;
  display: grid;
  place-items: center;
  width: 1.58em;
  height: 1.38em;
  border: 1px solid #b76b33;
  border-radius: .34em;
  background: linear-gradient(#fff0c4, #ffd68e);
  color: #451f10;
  font-size: clamp(.9rem, 3.1vw, 1.68rem);
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 1px 3px #72351052, 0 1px 1px #ffe7a085;
}
.bone-number[data-kibble-bowl]::before { inset: .46em .13em .25em; }
.bone-number[data-kibble-bowl]::after { top: .39em; left: .22em; right: .22em; }
.bone-hold { min-height: 1.3em; font-size: clamp(.72rem, 2.1vw, .88rem); line-height: 1.3; font-weight: 720; }
.bone-slot[aria-pressed='true'] .bone-hold, .bone-slot[data-winning] .bone-hold { color: #623912; }
.bones-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.bones-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bones-buttons [hidden] { display: none; }
.bones-buttons .button-outline { color: #623912; }
.bones-game:has(.bones-result[data-win]) #bones-roll { background: transparent; color: #623912; }
.bones-turns { font-variant-numeric: tabular-nums; }
.bones-turns strong { color: #704018; }
.bones-actions .button:disabled { opacity: .72; cursor: default; }
.bones-result { min-height: 1.45em; margin-top: 12px; color: #704018; font-weight: 750; }
.bones-result[data-win] { color: #59400e; }

@media (max-width: 460px) {
  .bones-tray { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bone-slot { min-height: 83px; }
}
