body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 0;
}

main {
  max-width: 1200px;
}

footer a {
  margin: .5rem;
}

footer a:not(:hover) {
  color: grey;
}

#fullscreen {
  display: none;
}

#fullscreen:fullscreen {
  display: initial;
}

#fullscreen.debug {
  display: block;
  width: 1000px;
  height: 600px;
}

#board {
  --glow-rgb: 255, 102, 0;
  --text-color: #fa0;
  --danger-fill-color: #f23;
  --danger-glow-rgb: 255, 0, 0;
  --danger-text-color: #f30;
  --gutter-size: 8px;
  padding-left: 1rem;
  padding-top: 1rem;

  height: 100%;
  width: 100%;

  display: flex;
  justify-content: center;
  align-items: center;
}

.-bordered {
  --border-glow-color: rgba(var(--glow-rgb), .7);
  border-radius: var(--gutter-size);
  border-style: solid;
  border-width: 5px;
  box-shadow:
    inset 0 0 0 1px var(--border-glow-color),
    0 0 0 1px var(--border-glow-color);
}

.label {
  display: inline-block;
  font: 500 64px 'Roboto Condensed';
  letter-spacing: -1px;
  line-height: 1;
  padding: 1px calc(var(--gutter-size) - 3px);
  text-transform: uppercase;
  user-select: none;
  white-space: nowrap;
  /* skin */
  --text-glow-color: rgba(var(--glow-rgb), .5);
  color: var(--text-color);
  text-shadow:
    -1px 1px 0 var(--text-glow-color),
    1px -1px 0 var(--text-glow-color),
    -1px -1px 0 var(--text-glow-color),
    1px 1px 0 var(--text-glow-color);
}

#hex-display {
  display: none;
}

.hex {
  --edge-size: 60px;
  --diagonal-size: calc(var(--edge-size) * 2);
  --diagonal-s-size: calc(var(--edge-size) * 1.75); /* diagonal */
  --gutter-ratio: .85;
  --gutter-size: calc(var(--edge-size) * .35);
  --gutter-d-size: calc(var(--edge-size) / 2);
  float: left;
  height: var(--diagonal-s-size);
  margin-bottom: var(--gutter-size);
  margin-left: calc(var(--gutter-ratio) * var(--edge-size) / 2);
  margin-right: calc(var(--gutter-ratio) * var(--edge-size) / 2);
  position: relative;
  width: var(--edge-size);
  /* skin */
  --fill-color: var(--danger-text-color);
  --glow-color: rgba(var(--danger-glow-rgb), .5);
  background: var(--fill-color);
  box-shadow:
    0 0 var(--gutter-d-size) var(--glow-color),
    0 0 calc(var(--gutter-d-size) / 2) var(--glow-color);
  /* animation */
  --blink-duration: 3s;
  animation-delay: .1s;
}
.hex::before, .hex::after { content: ''; display: block; position: absolute; }
.hex:nth-child(odd) {
  top: calc((var(--diagonal-s-size) + var(--gutter-size)) / 2);
}
.hex:nth-child(2n) { animation-delay: .2s; }
.hex:nth-child(3n) { animation-delay: .4s; }
.hex-row:nth-child(even) > .hex { animation-delay: .5s; }
.hex-row:nth-child(even) > .hex:nth-child(2n) { animation-delay: .2s; }
.hex-row:nth-child(even) > .hex:nth-child(3n) { animation-delay: .1s; }

.-border-method .hex {
  --tip-height: var(--diagonal-s-size);
  --tip-width: calc(var(--edge-size) * 2);
}
.-border-method .hex::before, .-border-method .hex::after {
  border-color: transparent var(--fill-color);
  border-style: solid;
  border-width: calc(var(--tip-height) / 2) var(--tip-width);
}
.-border-method .hex::before { border-left: 0; left: calc(-1 * var(--tip-width)); }
.-border-method .hex::after { border-right: 0; right: calc(-1 * var(--tip-width)); }

.-rotate-method .hex::before, .-rotate-method .hex::after {
  background: var(--fill-color);
  box-shadow: inherit;
  height: var(--diagonal-s-size);
  width: var(--edge-size);
}
.-rotate-method .hex::before { transform: rotate(60deg); }
.-rotate-method .hex::after { transform: rotate(-60deg); }
