html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  position: fixed;
  inset: 0;
  touch-action: none;
}

button,
select,
dialog {
  touch-action: manipulation;
}

#board {
  height: calc(100dvh - 85px);
  overflow: visible;
  touch-action: none;
}

.prototype-controls fieldset:nth-of-type(2) {
  flex: 1 1 auto;
}

.prototype-controls #scenario {
  width: 100%;
}

.stock {
  grid-template-rows: auto auto auto;
}

.stock strong {
  color: #ffe69b;
  font-size: 7px;
  letter-spacing: 0.12em;
}

.destinations {
  position: relative;
  z-index: 46;
}

.destination {
  transform-origin: top center;
  transition: height 160ms ease, box-shadow 160ms ease;
}

.destination.expanded {
  position: relative;
  z-index: 52;
  height: min(390px, calc(100dvh - 105px));
  overflow: hidden;
  box-shadow: 0 10px 28px #000c, inset 0 4px currentColor;
}

.destination.expanded .latest {
  display: none;
}

.destination.expanded h3,
.destination.expanded .count {
  position: relative;
  z-index: 3;
  display: block;
  color: #2b2417;
}

.expanded-list {
  position: absolute;
  top: 43px;
  right: 3px;
  bottom: 4px;
  left: 3px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 2px;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  color: #211b12;
  text-align: left;
}

.expanded-list span {
  display: flex;
  gap: 2px;
  align-items: baseline;
  min-height: 16px;
  font-size: 7.5px;
  line-height: 9px;
  overflow-wrap: normal;
  word-break: normal;
}

.expanded-list small {
  flex: 0 0 9px;
  color: #777;
  font-size: 6px;
}

#destination-dimmer {
  position: fixed;
  z-index: 42;
  inset: 0;
  background: #001b15b8;
}

body.destination-expanded .destination:not(.expanded) {
  filter: brightness(0.38);
}

.column {
  overflow: visible;
}

body.stack-overflow #tableau::after {
  content: "STACK EXCEEDS READABLE HEIGHT";
  position: fixed;
  z-index: 38;
  right: 6px;
  bottom: 92px;
  left: 6px;
  padding: 4px;
  border: 1px solid #ffb4b4;
  border-radius: 5px;
  background: #7d1723ee;
  color: #fff;
  font: 800 8px/1 system-ui;
  text-align: center;
  pointer-events: none;
}
