body {
  touch-action: manipulation;
  margin: 8px;
}
body, button, select {
  font-family: MS Sans Serif, sans-serif, Segoe UI Symbol, Twemoji Mozilla, Apple Color Emoji, Noto Color Emoji, Noto Emoji;
  font-size: 11px;
}
button, input.hidden + label {
  border: 2px outset;
}
button:active:not(:disabled), input.hidden:checked + label {
  border: 2px inset;
}
button:disabled, input.hidden:disabled + label, #mainframe.loading {
  filter: contrast(0.5);
}
button.used:disabled, input.hidden.used:disabled + label {
  filter: contrast(0.25);
}
fieldset ol, fieldset ul {
  list-style-type: none;
  padding-left: 0;
}
fieldset {
  padding-block: 0;
}
.sel {
  width: 40px;
  height: 40px;
}
.die {
  width: 110px;
  height: 110px;
  border: 2px inset;
  object-fit: none;
}
.die:nth-child(odd) {
  background-color: whitesmoke;
}
.die:nth-child(even) {
  background-color: lightgray;
}
input.hidden {
  appearance: none;
  position: absolute;
  inset: 0;
}
label.hold {
  padding: 8px;
  color: whitesmoke;
  background-color: firebrick;
  text-transform: uppercase;
  text-align: center;
  flex: 1;
}
input:checked + label.hold {
  background-color: salmon;
}
.action:active:not(:disabled), input:active:not(:disabled) + label.hold {
  background-color: crimson;
}
input.hidden:active:not(:disabled) + label.sel {
  border-color: silver;
}
.action {
  color: peachpuff;
  background-color: firebrick;
  width: 128px;
  height: 36px;
}
.container {
  display: flex;
  position: relative;
}
.auxiliary {
  display: inline-flex;
  position: absolute;
  top: 0;
  left: max(570px - 32px, calc(50% + 570px / 2 + 7px));
  background: #00000064;
  border-radius: 24px;
  padding: 5px;
  gap: 6px;
  margin-left: 8px
}
.auxiliary button {
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
}
.trophiesContainer {
  margin: auto;
  width: 570px;
  margin-top: 1em;
}
@media (min-height: 500px) {
  .zoom:not(.stay) {
    display: none;
  }
}
.help-emphasis {
  text-transform: uppercase;
}
#rollButton {
  color: whitesmoke;
}
#selectButton {
  background-color: yellow;
}
#selectButton:active:not(:disabled) {
  background-color: gold;
}
#onesButton {
  background-image: url("static/img/sel1.gif");
}
#twosButton {
  background-image: url("static/img/sel2.gif");
}
#threesButton {
  background-image: url("static/img/sel3.gif");
}
#foursButton {
  background-image: url("static/img/sel4.gif");
}
#fivesButton {
  background-image: url("static/img/sel5.gif");
}
#sixesButton {
  background-image: url("static/img/sel6.gif");
}
#threeOfAKindButton {
  background-image: url("static/img/sel7.gif");
}
#fourOfAKindButton {
  background-image: url("static/img/sel8.gif");
}
#fullHouseButton {
  background-image: url("static/img/sel9.gif");
}
#smallStraightButton {
  background-image: url("static/img/sel10.gif");
}
#largeStraightButton {
  background-image: url("static/img/sel11.gif");
}
#chanceButton {
  background-image: url("static/img/sel12.gif");
}
#yahtzeeButton {
  width: 80px;
  background-image: url("static/img/sel13.gif");
}
#scoreLabel {
  text-transform: uppercase;
  font-size: 28px;
  text-align: center;
}
#rollButton {
  text-transform: uppercase;
}
#mainframe {
  border: 7px solid peachpuff;
  border-radius: 8px;
  transition: transform 0.5s cubic-bezier(0, 0, 0.2, 1);
  background-color: beige;
  display: grid;
  grid-auto-rows: 1fr auto;
  width: 570px;
  margin: auto;
  image-rendering: auto;
}
#mainframe.loading {
  animation: spin 2s ease infinite;
}
#bonusYahtzee, .damageNumber {
  position: absolute;
  top: -3em;
  left: 50%;
  translate: -50%;
  text-align: center;
  padding: 2px;
}
#bonusYahtzee {
  width: 140px;
  color: indigo;
  outline: 2px solid rebeccapurple;
  animation: pulse 1.5s steps(1) infinite;
}
.damageNumber {
  animation: damage 1.5s linear forwards;
  pointer-events: none;
}
.damageNumber > span {
  font-style: italic;
  color: orangered;
  font-size: 32px;
  text-shadow:
    -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white, 1px 1px 0 white, 0px -1px 0 white, 0px 1px 0 white, -1px 0px 0 white, 1px 0px 0 white,
    -2px -2px 0 black, 2px -2px 0 black, -2px 2px 0 black, 2px 2px 0 black, -2px 0px 0 black, 2px 0px 0 black, 0px -2px 0 black, 0px 2px 0 black, -1px -2px 0 black, 1px -2px 0 black, -1px 2px 0 black, 1px 2px 0 black, -2px -1px 0 black, 2px -1px 0 black, -2px 1px 0 black, 2px 1px 0 black;
}
#trophies {
  height: 24px;
  animation: enlarge 0.5s;
}

#selectionFrame {
  grid-column: 2;
  background-color: whitesmoke;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr auto;
  place-items: center;
  border: 4px ridge;
  margin: auto;
  margin-right: 8px;
  grid-template-rows: 1fr 1fr;
}

#diceFrame {
  grid-area: 2 / 1 / 3 / 4;
  background-color: peachpuff;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  margin: auto;
}

#arctualDiceFrame {
  grid-column: span 5;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}

#selectButton {
  height: 96px;
  margin: auto;
  margin-left: 0;
}

#infoFrame {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  place-items: center;
  margin-top: 8px;
  row-gap: 8px;
}

@keyframes enlarge {
  0% {
    scale: 1;
  } 50% {
    scale: 1.5;
  } 100% {
    scale: 1;
  }
}

@keyframes spin {
  from {
    transform: rotate3d(1, 1, 1, 0deg);
  } to {
    transform: rotate3d(3, 8, 10, 360deg);
  }
}

@keyframes pulse {
  0% {
    outline-color: rebeccapurple;
  } 50% {
    outline-color: transparent;
  } 100% {
    outline-color: transparent;
  }
}

@keyframes damage {
  0% {
    opacity: 1;
    transform: translateY(0);
  } 50% {
    opacity: 1;
    transform: translateY(-1em);
  } 100% {
    opacity: 0;
    transform: translateY(-2em);
  }
}
