* {
  box-sizing: border-box;
}
h1,
h2 {
  text-align: center;
  margin-bottom: 0;
}
body {
  font-family: sans-serif;
  margin: 0;
  background-color: #def;
  min-width: var(--board-width);
}
body[data-stage=intro] #game,
body[data-stage=intro] #outro,
body[data-stage=intro] #score {
  display: none;
}
body[data-stage=game] #intro,
body[data-stage=game] #outro,
body[data-stage=game] #score,
body[data-stage=game] h1 {
  display: none;
}
body[data-stage=outro] #intro,
body[data-stage=outro] #game,
body[data-stage=outro] h1 {
  display: none;
}
main {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tile {
  transition: all 300ms;
  width: calc(var(--tile-size) * 1px);
  height: calc(var(--tile-size) * 1px);
  display: block;
  user-select: none;
}
button {
  border: 1px solid #000;
  padding: 8px;
}
button:not(:disabled) {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
}
.-menu ul {
  list-style: none;
  padding: 0 8px;
  display: flex;
  width: 100%;
}
.-menu ul li {
  flex: 1 0 0;
}
.-menu ul li + li {
  margin-left: 8px;
}
.-menu ul button {
  display: block;
  width: 100%;
  height: 100%;
}
:root {
  --board-width: auto;
  --tile-size: 64;
  --center-bg: rgba(255, 255, 255, 0.2);
  --border-thick: 3;
  --border-thin: 1;
  --round-bg: rgba(255, 255, 255, 0.5);
  --round-size: 18;
  --round-font: 14px cursive;
}
#intro {
  width: var(--board-width);
}
#intro p {
  text-align: center;
}
#intro ul {
  list-style: none;
  padding: 0 8px;
  display: flex;
  width: 100%;
}
#intro ul li {
  flex: 1 0 0;
}
#intro ul li + li {
  margin-left: 8px;
}
#intro ul button {
  display: block;
  width: 100%;
  height: 100%;
}
#outro {
  min-width: var(--board-width);
}
#outro ul {
  list-style: none;
  padding: 0 8px;
  display: flex;
  width: 100%;
}
#outro ul li {
  flex: 1 0 0;
}
#outro ul li + li {
  margin-left: 8px;
}
#outro ul button {
  display: block;
  width: 100%;
  height: 100%;
}
#score {
  padding-bottom: 1em;
  max-width: 100%;
  overflow-x: auto;
}
#score .score {
  border-collapse: collapse;
  white-space: nowrap;
  margin: auto;
}
#score .score .best {
  font-weight: bold;
}
#score .score thead td.active::before {
  content: "⇧";
}
#score .score thead td.active::after {
  content: "⇧";
}
#score .score thead td:not(.active) {
  text-decoration: underline;
  cursor: pointer;
}
#score .score td:not(:first-child) {
  text-align: right;
  padding-left: 1ch;
}
#score .score tfoot td {
  border-top: 3px double #000;
  font-size: 120%;
}
#game .pool {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #000;
}
#game .pool h2 {
  font-size: inherit;
  width: calc(var(--tile-size) * 1px);
  margin: 0;
  align-self: center;
}
#game .pool .dice {
  border: 1px solid #000;
  border-radius: 6px;
  background-color: #fff;
  overflow: hidden;
}
#game .pool .dice.lake {
  background-color: rgba(100, 200, 255, 0.2);
}
#game .pool .dice.forest {
  background-color: rgba(200, 255, 100, 0.2);
}
#game .pool .dice.pending {
  box-shadow: inset 0 0 5px 5px lime;
}
#game .pool .dice.blocked {
  box-shadow: inset 0 0 5px 5px red;
}
#game .pool .dice.disabled {
  opacity: 0.4;
}
#game .pool .dice + .dice {
  margin-left: 8px;
}
#game .pool button {
  --size: calc(var(--tile-size) + 2);
  cursor: pointer;
  margin-left: 8px;
  width: calc(var(--size) * 1px);
  height: calc(var(--size) * 1px);
}
#game #multi-setup {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: var(--board-width);
}
#game #multi-setup ul {
  list-style: none;
  padding: 0 8px;
  display: flex;
  width: 100%;
}
#game #multi-setup ul li {
  flex: 1 0 0;
}
#game #multi-setup ul li + li {
  margin-left: 8px;
}
#game #multi-setup ul button {
  display: block;
  width: 100%;
  height: 100%;
}
#game .wait {
  text-align: center;
}
table.board {
  border-collapse: collapse;
}
table.board td {
  position: relative;
  border: 1px solid transparent;
  padding: 0;
  --b-thick: calc(1px * var(--border-thick)) solid black;
  --b-thin: calc(1px * var(--border-thin)) solid black;
}
table.board td.signal::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  box-shadow: inset 0 0 5px 5px lime;
}
table.board td.center {
  background-color: var(--center-bg);
  --suffix: inset red;
}
table.board td.center.left {
  box-shadow: 4px 0 1px -2px var(--suffix);
}
table.board td.center.right {
  box-shadow: -4px 0 1px -2px var(--suffix);
}
table.board td.center.top {
  box-shadow: 0 4px 1px -2px var(--suffix);
}
table.board td.center.bottom {
  box-shadow: 0 -4px 1px -2px var(--suffix);
}
table.board td.center.left.top {
  box-shadow: 2px 2px 1px var(--suffix);
}
table.board td.center.right.top {
  box-shadow: -2px 2px 1px var(--suffix);
}
table.board td.center.left.bottom {
  box-shadow: 2px -2px 1px var(--suffix);
}
table.board td.center.right.bottom {
  box-shadow: -2px -2px 1px var(--suffix);
}
table.board tr:not(:first-child):not(:last-child) td:not(:first-child):not(:last-child) {
  border: var(--b-thin);
}
table.board tr:first-child td:not(:first-child):not(:last-child) {
  border-bottom: var(--b-thick);
}
table.board tr:last-child td:not(:first-child):not(:last-child) {
  border-top: var(--b-thick);
}
table.board tr:not(:first-child):not(:last-child) td:first-child {
  border-right: var(--b-thick);
}
table.board tr:not(:first-child):not(:last-child) td:last-child {
  border-left: var(--b-thick);
}
table.board .dummy {
  width: calc(var(--tile-size) * 1px);
  height: calc(var(--tile-size) * 1px);
}
div.board {
  position: relative;
}
div.board canvas {
  display: block;
}
div.board .cell,
div.board .signal {
  position: absolute;
  width: calc(var(--tile-size) * 1px);
  height: calc(var(--tile-size) * 1px);
}
div.board .signal {
  box-shadow: inset 0 0 5px 5px lime;
}
.board {
  touch-action: manipulation;
}
.board .round {
  --size: calc(1px * var(--round-size));
  position: absolute;
  right: 0;
  top: 0;
  width: var(--size);
  height: var(--size);
  line-height: var(--size);
  background-color: var(--round-bg);
  text-align: center;
  font: var(--round-font);
}
footer {
  border-top: 1px solid #000;
  font-size: 90%;
}
footer ul {
  list-style: none;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  padding: 0;
}
footer li {
  white-space: nowrap;
}
footer li + li::before {
  content: "•";
  margin: 0 0.5em;
}
