body {
  display: flow-root;
  background-image: var(--scene-background, url("assets/art/table.webp"));
  transition: background-color 1s;
}
body::before {
  content: "";
  position: fixed;
  inset: -15%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 90%, #b7792422, transparent 55%),
    radial-gradient(ellipse at 90% 10%, #e1a04219, transparent 55%);
  animation: mist-drift 19s ease-in-out infinite alternate;
  z-index: 0;
  mix-blend-mode: screen;
}
body[data-atmosphere="moon"]::before {
  background:
    radial-gradient(ellipse at 10% 90%, #7bbbd52b, transparent 60%),
    radial-gradient(ellipse at 90% 10%, #8ad8c926, transparent 55%);
}
body[data-atmosphere="forge"]::before {
  background:
    radial-gradient(ellipse at 10% 90%, #f85b292b, transparent 55%),
    radial-gradient(ellipse at 90% 10%, #d16a1b26, transparent 55%);
}
.atmosphere {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 8;
  mix-blend-mode: screen;
}
.table {
  width: min(710px, 70vh);
  max-height: 1060px;
  margin-top: max(12px, calc((100svh - 1060px) / 2));
  z-index: 1;
  background:
    linear-gradient(#13100c77, #13100caa),
    url("assets/art/stone.webp") center/cover;
}
.table::before {
  background: var(--scene-frame, url("assets/art/frame.webp")) center/100% 100%
    no-repeat;
  border: 0;
  z-index: 2;
}
.camp {
  position: relative;
  z-index: 3;
}
.masthead {
  z-index: 10;
}
.brand span {
  font-size: clamp(11px, 1.25vw, 18px);
}
.grid {
  position: relative;
  padding: 0 5%;
  gap: 6%;
  isolation: isolate;
}
.grid::before {
  display: none;
}
.board-surface {
  position: absolute;
  inset: 48px 30px 40px;
  background: none;
  pointer-events: none;
  border-radius: 14px;
  box-shadow: 0 10px 20px #0008;
  z-index: 0;
}
.board-surface::before,
.board-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url("assets/art/channels.webp") center/100% 100% no-repeat;
  pointer-events: none;
}
.board-surface::before {
  z-index: 0;
}
.board-surface::after {
  z-index: 2;
  mask: url("assets/art/channel-ornaments-mask.svg") center/100% 100% no-repeat;
}
.board-light {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.divine-beam {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  mask-image: linear-gradient(
    transparent,
    #0006 18%,
    #000c 38%,
    #0008 64%,
    #0003 84%,
    transparent
  );
  transition:
    opacity 0.35s ease-out,
    filter 0.2s ease-out;
  background:
    radial-gradient(
      ellipse at 50% 18%,
      #fff6d618,
      #fff6d609 35%,
      transparent 75%
    ),
    radial-gradient(
      ellipse at 50% 28%,
      color-mix(in srgb, var(--scene-accent) 26%, transparent),
      color-mix(in srgb, var(--scene-accent) 13%, transparent) 35%,
      color-mix(in srgb, var(--scene-accent) 4%, transparent) 65%,
      transparent 95%
    );
}
.divine-beam::before {
  content: "";
  position: absolute;
  inset: 0 12%;
  background: linear-gradient(
    90deg,
    transparent 12%,
    #fff2cb08 35%,
    #fff2cb12 50%,
    #fff2cb08 65%,
    transparent 88%
  );
  mask-image: linear-gradient(#000, transparent 90%);
  filter: blur(10px);
}
.divine-beam[data-light-player="p2"] {
  transform: rotate(180deg);
}
.divine-beam.lit {
  opacity: 1;
}
.divine-beam.lit.target {
  filter: brightness(1.2);
}
.reduced .divine-beam {
  transition: none;
}
.column {
  border-color: transparent;
  background: transparent;
  border-radius: 8px;
  box-shadow: none;
  padding: 0;
  gap: 4px;
}
.column:hover {
  background: transparent;
}
.slot {
  border: 0;
  background: none;
  box-shadow: none;
  container-type: size;
}
.slot .die {
  width: min(78cqw, 78cqh);
  height: min(78cqw, 78cqh);
  max-width: none;
  max-height: none;
  transform: none;
}
.slot .die[data-skin="obsidian"],
.slot .die[data-skin="crystal"] {
  transform: none;
}
.slot {
  overflow: clip;
  overflow-clip-margin: 4px;
}
.column.available {
  border-color: transparent;
  box-shadow: none;
  background: transparent;
}
.column.target {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.die {
  height: 96%;
  max-width: 96%;
  background-image: var(--die-image, url("assets/art/die-bone.webp"));
  filter: drop-shadow(0 7px 3px #000b);
  transform: perspective(400px) rotateX(8deg) rotateZ(-2deg);
}
.die[data-skin="obsidian"],
.die[data-skin="crystal"] {
  transform: perspective(400px) rotateX(8deg) rotateZ(3deg);
}
.pips {
  inset: 24% 25% 27% 23%;
}
.die[data-skin="bronze"] .pips,
.die[data-skin="crystal"] .pips {
  inset: 28%;
}
.pip {
  background: var(--pip-color, #352014);
  box-shadow:
    inset 0 2px 2px #0008,
    0 1px 1px #fff5;
}
.die.combo {
  filter: drop-shadow(0 0 4px #ffd175) drop-shadow(0 5px 3px #000c);
}
#roll.rolling:not(.has-3d) .die {
  animation: fallback-roll 1.12s ease-out both;
}
@keyframes fallback-roll {
  0% {
    transform: translateY(0) rotate(0);
  }
  20% {
    transform: translate(12px, -24px) rotate(160deg) scale(1.15);
  }
  40% {
    transform: translate(-8px, 0) rotate(290deg);
  }
  60% {
    transform: translate(4px, -12px) rotate(340deg);
  }
  80% {
    transform: translate(0, 0) rotate(363deg);
  }
  100% {
    transform: rotate(0);
  }
}
.arena {
  overflow: visible;
  z-index: 3;
  border-color: color-mix(in srgb, var(--scene-accent) 65%, #4b3a25);
  background:
    radial-gradient(
      ellipse at 18% 50%,
      color-mix(in srgb, var(--scene-accent) 13%, transparent),
      transparent 58%
    ),
    #17120fd9;
}
#roll {
  position: relative;
  isolation: isolate;
  overflow: visible;
  opacity: 1;
}
#roll::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 3%;
  height: 22%;
  border-radius: 50%;
  background: #0009;
  filter: blur(5px);
  z-index: -1;
}
.roll-view {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
  z-index: 2;
}
#roll.has-3d > #active-die {
  opacity: 0;
}
#roll.has-3d.rolling .die {
  animation: none;
}
#roll.has-3d.ready {
  animation: none;
}
#roll.physical-roll::after {
  animation: contact-shadow 1.12s ease-out;
}
.turn-copy {
  position: relative;
  z-index: 3;
  pointer-events: none;
}
body[data-atmosphere="moon"] .table {
  background:
    linear-gradient(#09202577, #0c1319b0),
    url("assets/art/stone.webp") center/cover;
}
body[data-atmosphere="moon"] .board-surface::before,
body[data-atmosphere="moon"] .board-surface::after {
  filter: sepia(0.12) hue-rotate(95deg) saturate(0.65);
}
body[data-atmosphere="forge"] .table {
  background:
    linear-gradient(#36150c55, #17100db0),
    url("assets/art/stone.webp") center/cover;
}
body[data-atmosphere="forge"] .board-surface::before,
body[data-atmosphere="forge"] .board-surface::after {
  filter: sepia(0.3) saturate(1.15);
}
body[data-atmosphere="moon"] .primary {
  background: linear-gradient(#356256, #203f3b);
  border-color: #88bfa6;
}
body[data-atmosphere="forge"] .primary {
  background: linear-gradient(#844226, #4c2419);
  border-color: #d88657;
}
@keyframes mist-drift {
  to {
    transform: translate(4%, -3%) scale(1.1);
    opacity: 0.5;
  }
}
@keyframes contact-shadow {
  15%,
  50% {
    transform: scale(0.6);
    opacity: 0.35;
  }
  35%,
  70%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Keep all sizes in one responsive system so the mobile board uses the available height. */
.masthead {
  inset: max(4px, env(safe-area-inset-top)) 14px auto;
  align-items: center;
  height: 44px;
}
.brand {
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.04em;
}
.brand span {
  font-size: 10px;
  margin-top: 4px;
}
nav {
  gap: 6px;
}
nav button {
  font-size: 14px;
  min-height: 44px;
  padding: 6px 10px;
  box-shadow: none;
  background: #17120f14;
  border-color: #d7bd8c24;
  color: #d7c29fe0;
  backdrop-filter: blur(2px);
}
nav button:hover,
nav button:focus-visible {
  background: #17120f55;
  border-color: #d7bd8c80;
  color: #f0dfba;
}
.masthead .brand {
  opacity: 0.72;
}
.table {
  width: min(710px, calc(100vw - 24px));
  height: min(
    1060px,
    calc(100svh - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom))
  );
  margin: max(58px, calc((100svh - 1060px) / 2)) auto 0;
  padding: 26px 28px 22px;
  gap: 8px;
}
.board-surface {
  inset: 12px 18px;
}
.camp {
  gap: 5px;
}
.nameplate {
  min-height: 34px;
  font-size: 20px;
}
.nameplate strong {
  min-width: 65px;
  font-size: 1.4em;
}
.nameplate {
  transition:
    box-shadow 0.3s,
    border-color 0.3s,
    opacity 0.3s;
}
.camp:not(.active-turn) .nameplate {
  opacity: 0.75;
}
.active-turn .nameplate {
  border-color: var(--scene-accent);
  box-shadow:
    0 0 10px color-mix(in srgb, var(--scene-accent) 25%, transparent),
    inset 0 1px var(--scene-accent);
}
.grid {
  gap: 4%;
  padding: 0 4%;
}
.column {
  gap: 3px;
  grid-template-rows: repeat(3, minmax(0, 1fr)) 23px;
}
.column-score {
  font-size: 19px;
  line-height: 21px;
  margin: 0 8px;
}
.slot {
  overflow: visible;
  overflow-clip-margin: 0;
}
.slot .die {
  width: min(75cqw, 86cqh);
  height: min(75cqw, 86cqh);
  transform: none;
}
.slot .die.combo::after {
  display: none;
}
.slot .die.spawn {
  animation: contained-land 0.28s ease-out;
}
.slot .die.resonate {
  animation: contained-resonance 0.55s ease-in-out;
}
.slot .die.shatter {
  animation: contained-shatter 0.45s ease-out forwards;
}
@keyframes contained-land {
  0% {
    transform: scale(0.88);
    opacity: 0.3;
  }
  65% {
    transform: scale(1.02);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}
@keyframes contained-resonance {
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 0 7px #ffcb47);
  }
}
@keyframes contained-shatter {
  30% {
    filter: brightness(2);
    transform: scale(1.02);
  }
  100% {
    transform: scale(0.3) rotate(30deg);
    opacity: 0;
  }
}
.combo-multiplier {
  position: absolute;
  left: calc(50% + min(37.5cqw, 43cqh) + 2px);
  top: 50%;
  transform: translateY(-50%);
  font:
    600 11px Georgia,
    serif;
  line-height: 18px;
  color: #ffe3a1;
  text-shadow:
    0 1px 3px #000,
    0 0 6px #000;
  pointer-events: none;
  white-space: nowrap;
}
.arena {
  height: 112px;
  min-height: 0;
  flex-shrink: 0;
  justify-content: center;
  gap: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.arena::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--scene-accent) 45%, transparent),
    transparent
  );
  pointer-events: none;
}
#roll {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--scene-accent) 13%, transparent),
    transparent 70%
  );
}
#roll::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--scene-accent) 30%, transparent);
  pointer-events: none;
}
#roll.ready::before {
  border-color: var(--scene-accent);
  box-shadow: 0 0 15px color-mix(in srgb, var(--scene-accent) 18%, transparent);
}
.turn-copy,
#event {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 900px) {
  .masthead {
    inset: max(4px, env(safe-area-inset-top)) 12px auto;
  }
  .brand {
    font-size: 23px;
  }
  .brand span {
    display: none;
  }
  .table {
    width: min(600px, calc(100vw - 20px));
    height: calc(
      100svh - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
    );
    max-height: 1060px;
    margin-top: calc(58px + env(safe-area-inset-top));
    padding: 20px 12px 18px;
    gap: 7px;
  }
  .board-surface {
    inset: 12px 8px;
  }
  .nameplate {
    min-height: 28px;
    font-size: 15px;
    margin-inline: 6px;
  }
  .nameplate strong {
    min-width: 50px;
  }
  .column {
    grid-template-rows: repeat(3, minmax(0, 1fr)) 21px;
  }
  .column-score {
    font-size: 17px;
    line-height: 19px;
    margin-inline: 4px;
  }
}
@media (max-width: 450px) {
  .table {
    padding: 18px 12px 16px;
  }
  .arena {
    height: 104px;
  }
  #roll {
    width: 104px;
    height: 104px;
  }
  .combo-multiplier {
    font-size: 10px;
  }
}
@media (max-height: 700px) {
  .table {
    gap: 5px;
    padding-top: 15px;
    padding-bottom: 13px;
  }
  .camp {
    gap: 3px;
  }
  .nameplate {
    min-height: 25px;
    font-size: 14px;
  }
  .column {
    gap: 2px;
    grid-template-rows: repeat(3, minmax(0, 1fr)) 19px;
  }
  .column-score {
    font-size: 15px;
    line-height: 17px;
  }
  .arena {
    height: 80px;
  }
  #roll {
    width: 80px;
    height: 80px;
  }
  .combo-multiplier {
    font-size: 9px;
  }
}
@media (max-height: 500px) and (min-width: 650px) {
  .table {
    width: 350px;
    height: calc(100svh - 20px);
    margin-top: 10px;
    padding: 10px 20px;
    gap: 4px;
  }
  .board-surface {
    inset: 12px;
  }
  .masthead {
    inset: 4px 12px auto;
  }
  .nameplate {
    min-height: 22px;
    font-size: 12px;
  }
  .arena {
    height: 58px;
  }
  #roll {
    width: 58px;
    height: 58px;
  }
  .column {
    grid-template-rows: repeat(3, minmax(0, 1fr)) 17px;
  }
  .column-score {
    font-size: 13px;
    line-height: 15px;
  }
}
.reduced::before {
  animation: none;
}
.grid::after {
  display: none;
}
.awaiting-placement .column.available .column-score {
  color: #fff0c8;
  text-shadow: 0 0 9px var(--scene-accent);
}
#quick-guide {
  position: fixed;
  top: calc(56px + env(safe-area-inset-top));
  left: 50%;
  z-index: 12;
  width: max-content;
  max-width: calc(100vw - 36px);
  margin: 0;
  padding: 10px 16px;
  border: 1px solid #c5a97566;
  border-radius: 24px;
  background: #19150fef;
  color: #f4e4c9;
  font:
    13px/1.4 Arial,
    sans-serif;
  text-align: center;
  box-shadow: 0 5px 22px #0008;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -5px);
  transition:
    opacity 0.2s,
    transform 0.2s,
    visibility 0.2s;
}
#quick-guide.visible {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}
.versus.p2-turn #quick-guide {
  transform: translate(-50%, 0) rotate(180deg);
}
#settings .dialog-inner {
  padding: 30px 22px 20px;
}
#settings h2 {
  font-size: 28px;
}
#settings fieldset {
  margin: 18px 0;
}
#settings legend {
  color: #e9c891;
  font-size: 15px;
}
#dice-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.skin-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 3px;
  border: 1px solid #756149;
  border-radius: 7px;
  background: #100d0977;
  cursor: pointer;
  font:
    12px/1.3 Arial,
    sans-serif;
}
.skin-choice:has(input:checked) {
  border-color: #ddbe80;
  background: #b48b4a26;
}
.skin-choice:focus-within {
  outline: 2px solid #fff0c8;
  outline-offset: 2px;
}
.skin-choice input {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #b48b4a;
}
.skin-choice .die {
  flex: none;
  width: 46px;
  height: 46px;
  transform: none;
}
#dice-selection-help {
  min-height: 2.6em;
  margin: 10px 0 0;
  color: #c6b294;
  font:
    12px/1.4 Arial,
    sans-serif;
}
#settings .check {
  min-height: 44px;
  margin: 2px 0;
  font-size: 14px;
}
#settings .check input {
  width: 18px;
  height: 18px;
  flex: none;
}
#settings .range {
  margin: 14px 0;
  font-size: 15px;
}
.reduced #quick-guide,
.reduced .grid::after {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}
/* Incandescent inscriptions sit directly on the existing ornament. */
.table {
  --die-height-release: 11.2px;
  --dice-inset: 8px;
  --rune-ink: #ffe2b3;
  --rune-glow: #ff9b3e;
  --rune-bloom: #ff8b304d;
  --rune-outline: 0.7px;
  --rune-depth:
    -1px 0 0 #130c08, 1px 0 0 #130c08, 0 -1px 0 #130c08, 0 1px 0 #130c08,
    0 2px 3px #000, 0 0 4px #000;
  --score-row-height: 23px;
  --rail-width: 24px;
  --inscription-inset: 6px;
  --column-score-inset: 8px;
}
.camp {
  gap: 0;
}
.versus .opponent {
  transform: none;
}
.versus .opponent .grid {
  transform: rotate(180deg);
}
.camp .nameplate {
  position: absolute;
  left: calc(-8px + var(--inscription-inset));
  top: 0;
  bottom: var(--score-row-height);
  width: var(--rail-width);
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: none;
  box-shadow: none;
  opacity: 1;
  pointer-events: none;
}
.opponent .nameplate {
  left: auto;
  right: calc(-8px + var(--inscription-inset));
  top: var(--score-row-height);
  bottom: 0;
}
.nameplate::before {
  display: none;
}
.inscription {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: max-content;
  transform: translate(-50%, -50%) rotate(-90deg);
  font:
    600 15px/1 Cinzel,
    Georgia,
    serif;
  letter-spacing: 0.075em;
  white-space: nowrap;
}
.nameplate .inscription span {
  flex: none;
}
.nameplate .inscription strong {
  min-width: 0;
  border: 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}
.nameplate .inscription strong::before {
  content: "·";
  display: inline-block;
  margin-right: 13px;
  font-weight: 400;
}
.versus .opponent .inscription {
  transform: translate(-50%, -50%) rotate(90deg);
}
body:not(.versus) .opponent .column {
  grid-template-rows: var(--score-row-height) repeat(3, minmax(0, 1fr));
}
body:not(.versus) .opponent .column-score {
  grid-row: 1;
}
.column .column-score,
.awaiting-placement .column.available .column-score {
  border: 0;
  border-radius: 0;
  background: none;
  clip-path: none;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
  line-height: 1;
  translate: 0 calc(-1 * var(--column-score-inset));
}
body:not(.versus) .opponent .column-score {
  translate: 0 var(--column-score-inset);
}
.inscription,
.column .column-score,
.awaiting-placement .column.available .column-score {
  color: var(--rune-ink);
  -webkit-text-stroke: var(--rune-outline) #160d09;
  paint-order: stroke fill;
  text-shadow:
    var(--rune-depth),
    0 0 4px var(--rune-glow),
    0 0 11px var(--rune-bloom);
  animation: engraving-heat 4.6s ease-in-out infinite alternate;
}
.column:nth-of-type(2) .column-score {
  animation-delay: -1.5s;
}
.column:nth-of-type(3) .column-score {
  animation-delay: -3s;
}
.opponent .inscription {
  animation-delay: -2.3s;
}
.column .column-score.engraving-flare {
  animation:
    engraving-flare 0.8s ease-out,
    engraving-heat 4.6s 0.8s ease-in-out infinite alternate;
}
.nameplate strong.engraving-flare {
  animation: engraving-flare 0.8s ease-out;
}
@keyframes engraving-heat {
  to {
    text-shadow:
      var(--rune-depth),
      0 0 3px var(--rune-glow),
      0 0 7px var(--rune-bloom);
  }
}
@keyframes engraving-flare {
  0%,
  18% {
    color: #fff5d9;
    text-shadow:
      var(--rune-depth),
      0 0 4px #fff0c4,
      0 0 12px var(--rune-glow),
      0 0 20px var(--rune-bloom);
  }
}
body[data-atmosphere="moon"] .table {
  --rune-ink: #d5fff1;
  --rune-glow: #73dec7;
  --rune-bloom: #51d1ca50;
}
body[data-atmosphere="forge"] .table {
  --rune-ink: #ffe0b9;
  --rune-glow: #ff752e;
  --rune-bloom: #ff5a2459;
}
.slot {
  translate: 0 calc(-1 * var(--dice-inset));
}
@media (min-width: 901px) {
  .table {
    --rune-outline: 1px;
  }
  .inscription {
    font-weight: 700;
  }
}
.opponent .slot {
  translate: 0 var(--dice-inset);
}
.versus .opponent .slot {
  translate: 0 calc(-1 * var(--dice-inset));
}
.reduced .inscription,
.reduced .column .column-score,
.reduced .nameplate strong.engraving-flare {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .inscription,
  .column .column-score,
  .nameplate strong.engraving-flare {
    animation: none;
  }
}
.slot .die {
  width: calc(min(75cqw, calc(86cqh - var(--die-height-release))) * 0.97);
  height: calc(min(75cqw, calc(86cqh - var(--die-height-release))) * 0.97);
  translate: calc(var(--tilt-direction, 1) * var(--tilt-x, 0px))
    calc(var(--tilt-direction, 1) * var(--tilt-y, 0px));
  rotate: var(--tilt-z, 0deg);
}
.combo-multiplier {
  left: calc(
    50% + min(37.5cqw, calc(43cqh - var(--die-height-release) / 2)) * 0.97 + 2px
  );
  translate: calc(var(--tilt-direction, 1) * var(--tilt-x, 0px))
    calc(var(--tilt-direction, 1) * var(--tilt-y, 0px));
}
.versus .opponent {
  --tilt-direction: -1;
}
#roll:not(.has-3d) #active-die {
  scale: 0.97;
  translate: calc(var(--tilt-direction, 1) * var(--tilt-x, 0px))
    calc(var(--tilt-direction, 1) * var(--tilt-y, 0px));
  rotate: var(--tilt-z, 0deg);
}
.versus.p2-turn .arena {
  --tilt-direction: -1;
}
.haptics-setting,
.tilt-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#haptics-test,
#tilt-calibrate {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 14px;
}
#haptics-help,
#tilt-help {
  margin: 0 0 12px;
  text-align: left;
  color: #c6b294;
  font:
    12px/1.4 Arial,
    sans-serif;
}
@media (max-width: 900px) {
  .table {
    --dice-inset: 6px;
    --die-height-release: 9.5px;
    --score-row-height: 21px;
    --rail-width: 20px;
  }
  .camp .nameplate {
    left: calc(-6px + var(--inscription-inset));
  }
  .opponent .nameplate {
    left: auto;
    right: calc(-6px + var(--inscription-inset));
  }
  .inscription {
    font-size: 13px;
  }
  .nameplate .inscription strong {
    font-size: 18px;
  }
}
@media (max-height: 700px) {
  .table {
    --dice-inset: 4px;
    --inscription-inset: 5px;
    --column-score-inset: 6px;
    --die-height-release: 8.1px;
    --score-row-height: 19px;
  }
  .inscription {
    font-size: 12px;
    gap: 10px;
  }
  .nameplate .inscription strong {
    font-size: 17px;
  }
  .nameplate .inscription strong::before {
    margin-right: 10px;
  }
}
@media (max-height: 500px) and (min-width: 650px) {
  .table {
    --die-height-release: 7.2px;
    --score-row-height: 17px;
    --rail-width: 18px;
    --inscription-inset: 4px;
    --column-score-inset: 4px;
  }
  .camp .nameplate {
    top: 0;
    bottom: var(--score-row-height);
  }
  .inscription {
    font-size: 10px;
    gap: 7px;
  }
  .nameplate .inscription strong {
    font-size: 14px;
  }
  .nameplate .inscription strong::before {
    margin-right: 7px;
  }
}
