* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #101916;
  color: #e8eee6;
  font: 14px system-ui;
}
header {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  border-bottom: 1px solid #344039;
}
h1 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 5px;
}
small,
.muted {
  color: #97a99b;
}
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  height: calc(100dvh - 84px);
}
.board-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}
.board-column .stage {
  min-height: 0;
}
.slice-overview {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid #344039;
  background: #16221b;
}
.slice-overview p {
  margin: 6px 0;
  color: #afc2b4;
  font-size: 12px;
}

.slice-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px 2px;
}
.slice-tile {
  min-width: 0;
  padding: 2px 1px 3px;
  font-size: 11px;
  line-height: 1.2;
}
.slice-tile svg {
  display: block;
  width: 100%;
  height: auto;
}
.slice-tile span {
  white-space: nowrap;
}
.slice-tile[aria-pressed="true"] {
  border-color: #cfe8ad;
  background: #354639;
  color: #fff2a6;
}
.slice-tile b {
  color: #a9ef63;
}
.stage {
  position: relative;
  min-height: 440px;
  background: radial-gradient(ellipse at center, #25372e, #101916 75%);
}
canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.caption {
  position: absolute;
  left: 30px;
  top: 26px;
  pointer-events: none;
}
.caption strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}
.hint {
  position: absolute;
  bottom: 24px;
  left: 30px;
  color: #a6b8aa;
  pointer-events: none;
}
aside {
  padding: 28px 24px;
  border-left: 1px solid #344039;
  overflow: auto;
  background: #16221b;
}
label {
  display: block;
  margin: 24px 0 12px;
  color: #bdcbbb;
}
button {
  border: 1px solid #465748;
  border-radius: 7px;
  padding: 10px 14px;
  background: transparent;
  color: #dce6d9;
  cursor: pointer;
  font: inherit;
}
button:hover {
  background: #334836;
}
button.active,
.primary {
  background: #d4e6ac;
  color: #1d2b20;
  border-color: #d4e6ac;
}
.row {
  display: flex;
  gap: 8px;
}
.row button {
  flex: 1;
}
input[type="range"] {
  width: 100%;
  accent-color: #d4e6ac;
}
select {
  width: 100%;
  padding: 10px;
  background: #1e3025;
  color: #e8eee6;
  border: 1px solid #465748;
  border-radius: 6px;
}
.status {
  padding: 16px;
  background: #24362a;
  border-radius: 8px;
  margin-top: 24px;
}
.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #151716;
  border: 1px solid #9ba997;
  margin-right: 8px;
}
.mini {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 3px;
  margin-top: 12px;
}
.mini button {
  padding: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: 10px;
  background: #314536;
}
.mini button.b {
  background: #080d0b;
}
.mini button.w {
  background: #edf0df;
}
.foot {
  font-size: 12px;
  line-height: 1.8;
  color: #91a38f;
  margin-top: 20px;
}
#note {
  min-height: 20px;
  color: #d4e6ac;
  margin-top: 12px;
}
@media (max-width: 760px) {
  header {
    padding: 0 20px;
    height: 64px;
  }
  main {
    height: auto;
    grid-template-columns: 1fr;
  }
  .stage {
    height: 58dvh;
  }
  .board-column {
    grid-template-rows: auto;
  }
  .slice-overview {
    padding: 8px;
  }
  .slice-strip {
    gap: 5px;
  }

  .slice-tile {
    font-size: 10px;
  }
  aside {
    border-left: 0;
  }
  h1 {
    font-size: 20px;
  }
  .caption {
    left: 20px;
  }
  .hint {
    font-size: 12px;
    left: 20px;
  }
}

header a {
  color: #cfe8ad;
  text-decoration: none;
}
header h1 {
  margin: 0;
}
aside label {
  margin-top: 16px;
}
.mini button {
  color: #eaf2e4;
  min-width: 0;
  overflow: hidden;
}
.mini button[data-owner="0"] {
  background: #a4493c;
}
.mini button[data-owner="1"] {
  background: #326b8b;
}
.mini button[data-owner="2"] {
  background: #846329;
}
.mini button.target {
  outline: 2px solid #a9ed75;
  outline-offset: -2px;
}
.mini button.selected {
  outline: 2px solid #fff2a6;
  outline-offset: -2px;
}
#destination,
#facing {
  margin: 8px 0;
}
#history {
  padding-left: 20px;
  color: #bacaba;
}
details {
  margin-top: 18px;
}
summary {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.game-fullscreen main {
  height: calc(100dvh - 84px);
}
.fullscreen-floating {
  z-index: 5;
}
@media (max-width: 760px) {
  .game-fullscreen main {
    height: auto;
  }
  .hint {
    bottom: 10px;
  }
  aside {
    padding-bottom: 72px;
  }
}

