:root {
  color-scheme: dark;
  font:
    16px/1.5 system-ui,
    sans-serif;
  color: #ebece2;
  background: #152023;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 760px;
  padding: 24px clamp(12px, 3vw, 30px);
  margin: auto;
}
header,
footer,
.controls,
.readings,
.round-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}
header,
.controls,
footer {
  justify-content: space-between;
}
h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.15;
  margin: 0;
}
p {
  margin: 0.7em 0;
}
.intro {
  color: #c5d1cc;
  max-width: 65ch;
}
a {
  color: #f3d291;
  text-underline-offset: 0.2em;
}
.board {
  background: #192427;
  border: 1px solid #51605c;
}
canvas {
  display: block;
  width: 100%;
  aspect-ratio: 7 / 4.25;
}
#render-note {
  padding: 0.5em;
}
.readings {
  justify-content: space-around;
  padding: 0.55em;
  background: #253335;
  color: #c5d1cc;
  font-variant-numeric: tabular-nums;
}
.readings strong {
  color: #fff2ca;
  margin-left: 0.2em;
}
.controls {
  margin-top: 0.8em;
  flex-wrap: wrap;
}
button {
  font: inherit;
  color: inherit;
  border: 1px solid #667871;
  border-radius: 5px;
  padding: 0.45em 0.8em;
  min-height: 44px;
  background: #283a3b;
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button:enabled:hover,
button:enabled:active {
  background: #40524f;
}
#start {
  color: #202423;
  border-color: #dfbd77;
  background: #dfbd77;
  font-weight: 650;
}
:focus-visible {
  outline: 2px solid #a6e5ff;
  outline-offset: 2px;
}
.dpad {
  display: flex;
  gap: 4px;
}
.dpad button {
  width: 44px;
  padding: 0;
  font-size: 1.15em;
}
#status {
  color: #f1d494;
  min-height: 1.5em;
}
details {
  border-top: 1px solid #455559;
  padding: 0.6em 0;
}
summary {
  cursor: pointer;
}
pre {
  font:
    1.1em/1.4 ui-monospace,
    monospace;
  letter-spacing: 0.3em;
}
footer {
  border-top: 1px solid #455559;
  padding-top: 0.75em;
  font-size: 0.85em;
  color: #adbdba;
  flex-wrap: wrap;
}
@media (max-width: 440px) {
  main {
    padding-top: 16px;
  }
  .controls {
    gap: 8px;
  }
  .round-buttons {
    gap: 5px;
  }
  button {
    padding: 0.35em 0.5em;
  }
}
