* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at top, #373023, transparent 58%), #15171b;
  color: #fff7df;
  font:
    600 16px system-ui,
    sans-serif;
  min-height: 100svh;
  display: grid;
  place-items: center;
}
main {
  width: min(94vw, calc(100svh - 318px), 510px);
  min-width: min(94vw, 294px);
  padding: 12px 0;
}
header,
.stats,
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header button,
header a {
  background: none;
  border: 0;
  color: #f6e8ce;
  text-decoration: none;
  font-size: 14px;
  padding: 7px 2px;
  box-shadow: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid #595852;
  border-radius: 9px;
  background: #292b30;
  padding: 10px 12px;
  box-shadow: 0 3px 0 #0a0c0e;
  touch-action: manipulation;
}
button:disabled {
  opacity: 0.42;
  cursor: default;
}
button:enabled:hover,
a:hover {
  color: #ffbc2d;
}
:focus-visible {
  outline: 3px solid #ffd02b;
  outline-offset: 3px;
}
h1 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 6px 0;
  font:
    italic 1000 clamp(36px, 6svh, 58px)/1 Arial,
    sans-serif;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  text-shadow: 0 4px #9e4518;
}
h1 svg {
  width: 0.88em;
}
p {
  margin: 10px auto 15px;
  max-width: 370px;
  color: #d6d3c9;
  text-align: center;
  font-size: clamp(13px, 1.9svh, 16px);
  line-height: 1.35;
}
.stats {
  font: bold 12px monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #b8b7af;
  text-align: center;
  margin: 8px 0;
}
.stats div {
  flex: 1;
}
strong {
  display: block;
  color: white;
  font-size: 23px;
}
#taps {
  color: #ffbd28;
}
canvas {
  display: block;
  width: 100%;
  background: #16181d;
  border-radius: 12px;
  border: 2px solid #55534f;
  box-shadow: 0 6px 0 #0b0c10;
  touch-action: none;
  cursor: pointer;
}
footer {
  text-align: center;
}
#status {
  margin: 15px 0 10px;
  color: #ffcd55;
  font-size: 15px;
  line-height: 1.3;
  min-height: 20px;
}
.controls {
  gap: 8px;
}
.controls button {
  flex: 1;
}
#next {
  width: 100%;
  background: #ffbc28;
  color: #22190e;
  border-color: #ffe080;
  margin-bottom: 10px;
}
#next:not([hidden]) + .controls {
  display: none;
}
@media (max-height: 675px) {
  h1 {
    font-size: 29px;
    margin: 0;
  }
  p {
    margin: 5px auto;
  }
  main {
    width: min(94vw, calc(100svh - 254px));
    padding: 5px 0;
  }
  .stats {
    margin: 5px 0;
  }
  #status {
    margin: 10px 0 6px;
  }
}
@media (orientation: landscape) and (max-height: 620px) {
  main {
    display: grid;
    grid-template-columns: 1fr min(54vw, 96svh);
    width: min(96vw, 900px);
    gap: 4px 18px;
    align-items: center;
  }
  .board {
    grid-area: 1/2/5/3;
  }
  .controls button {
    padding: 8px 1px;
    font-size: 13px;
  }
  .stats {
    font-size: 10px;
  }
  header {
    align-self: end;
  }
  footer {
    align-self: start;
  }
}
#goal {
  color: #ffcd55;
  font-size: clamp(17px, 2.5svh, 22px);
  font-weight: 850;
  margin-bottom: 4px;
}
#lesson {
  margin: 0 auto 8px;
  min-height: 2.7em;
  text-wrap: balance;
}
.picker {
  position: relative;
  border-radius: 8px;
  background: #ffffff0a;
  color: #fff7df;
  box-shadow: inset 0 0 0 1px #ffffff30;
  padding: 3px;
}
.picker:focus-within {
  outline: 3px solid #ffd02b;
}
#boards {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}
#stars {
  color: #ffcd55;
}
#again {
  margin-bottom: 10px;
}
canvas {
  -webkit-touch-callout: none;
  user-select: none;
}
@media (orientation: portrait) and (max-height: 610px) {
  main { min-width: min(94vw, 260px); width: min(94vw, calc(100svh - 284px)); }
  #lesson { font-size: 13px; margin-bottom: 3px; }
  #status { margin-top: 5px; }
}
