:root {
  color-scheme: dark;
  font-family: "Inter Variable", sans-serif;
  color: #e7f2ed;
  background: #071b24;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  display: block;
  touch-action: none;
  outline-offset: -5px;
}
button,
input {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
  min-height: 44px;
  border: 0;
  background: transparent;
}
button:hover {
  color: #81f0c7;
}
button:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 2px solid #9dfad3;
  outline-offset: 4px;
}
.identity,
.playback,
.caption,
.sequence,
.controls,
.settings-panel,
.sample {
  position: fixed;
  z-index: 2;
}
.identity {
  top: 38px;
  left: 44px;
  display: flex;
  align-items: center;
  gap: 17px;
  pointer-events: none;
}
.mark {
  color: #a3f1ca;
  font-size: 43px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.21em;
  color: #b5cdc6;
}
h1 {
  font-family: "Space Grotesk Variable", sans-serif;
  margin: 4px 0 0;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.055em;
}
h1 span {
  font:
    12px "JetBrains Mono Variable",
    monospace;
  letter-spacing: 0;
  color: #b5cdc6;
}
.playback {
  top: 39px;
  right: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #baffd4;
  box-shadow: 0 0 12px #91ecc3;
}
.playback button {
  margin-left: 12px;
  padding: 0 18px;
  border: 1px solid #65827c77;
  border-radius: 24px;
  background: #071b2488;
}
.caption {
  left: 46px;
  top: 39%;
  pointer-events: none;
}
.caption p {
  font-family: "Instrument Serif", serif;
  font-size: clamp(28px, 3.5vw, 52px);
  line-height: 1.03;
  margin: 0 0 20px;
}
.caption em {
  color: #9ec7b6;
}
.caption small,
.sample {
  font-size: 11px;
  color: #adc8c1;
}
.sequence {
  right: 46px;
  bottom: 150px;
  width: 268px;
  pointer-events: none;
}
.sequence-label {
  font:
    10px "JetBrains Mono Variable",
    monospace;
  letter-spacing: 0.08em;
  display: flex;
  justify-content: space-between;
  color: #a8c7bc;
  margin-bottom: 16px;
}
#moves {
  display: grid;
  grid-template-columns: repeat(var(--columns, 6), 1fr);
  gap: 7px;
}
#moves span {
  display: grid;
  place-items: center;
  height: 33px;
  font:
    12px "JetBrains Mono Variable",
    monospace;
  border: 1px solid #789a8c30;
  border-radius: 5px;
  color: #90b2a5;
  background: #071b2444;
}
#moves span.done {
  color: #daf4e6;
  border-color: #a9cdb670;
}
#moves span.active {
  background: #c5f8d6;
  color: #143c34;
  border-color: #c5f8d6;
}
.controls {
  bottom: 58px;
  right: 44px;
  display: flex;
  gap: 9px;
}
.controls button {
  border-radius: 9px;
  border: 1px solid #7d9b8d55;
  padding: 0 17px;
  background: #0b242dd9;
  font-size: 12px;
}
.controls button:first-child {
  background: #d5f2d7;
  color: #0e332c;
  font-weight: 600;
}
.controls span {
  margin-left: 18px;
}
.sample {
  bottom: 35px;
  left: 46px;
  pointer-events: none;
}
.settings-panel {
  right: 44px;
  bottom: 118px;
  width: 300px;
  border: 1px solid #78988d66;
  border-radius: 12px;
  padding: 19px;
  background: #0a2532f0;
  backdrop-filter: blur(18px);
}
[hidden] {
  display: none !important;
}
.settings-panel label {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}
.settings-panel input {
  width: 100%;
  height: 44px;
  accent-color: #c4edca;
}
.settings-panel p {
  font-size: 11px;
  line-height: 1.5;
  color: #a6c5bb;
  margin: 6px 0;
}
.settings-panel button {
  font-size: 12px;
  text-decoration: underline;
}
#fallback {
  position: fixed;
  inset: 35% 10%;
  text-align: center;
}
.capture * {
  transition: none !important;
}
@media (max-width: 650px) {
  .identity {
    left: 20px;
    top: 24px;
    gap: 9px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 0.12em;
  }
  .mark {
    font-size: 30px;
  }
  h1 {
    font-size: 24px;
  }
  h1 span {
    font-size: 9px;
  }
  .playback {
    top: 29px;
    right: 18px;
    gap: 7px;
  }
  .playback > span:not(.live-dot) {
    display: none;
  }
  .playback button {
    margin-left: 3px;
    padding: 0 13px;
  }
  .caption {
    top: 126px;
    left: 23px;
  }
  .caption p {
    font-size: 29px;
    margin-bottom: 10px;
  }
  .caption small {
    font-size: 10px;
  }
  .sequence {
    left: 24px;
    right: 24px;
    width: auto;
    bottom: 157px;
  }
  .sequence-label {
    font-size: 9px;
    margin-bottom: 10px;
  }
  #moves {
    grid-template-columns: repeat(var(--mobile-columns, 12), 1fr);
    gap: 3px;
  }
  #moves span {
    height: 25px;
    font-size: 9px;
    border-radius: 4px;
  }
  .controls {
    left: 20px;
    right: 20px;
    bottom: 79px;
    gap: 7px;
  }
  .controls button {
    padding: 0 12px;
    flex: 1;
    font-size: 11px;
    white-space: nowrap;
  }
  .controls span {
    margin-left: 7px;
  }
  .controls button:first-child {
    flex: 1.7;
  }
  .sample {
    bottom: 40px;
    left: 23px;
    font-size: 10px;
  }
  .settings-panel {
    right: 20px;
    left: 20px;
    width: auto;
    bottom: 137px;
  }
  .settings-panel p {
    display: none;
  }
}
@media (max-height: 580px) {
  .caption {
    display: none;
  }
  .sequence {
    bottom: 120px;
  }
  .controls {
    bottom: 34px;
  }
  .sample {
    bottom: 12px;
  }
}

.mark {
  display: block;
  width: 32px;
  height: 32px;
  position: relative;
  border: 1px solid #a3f1ca;
  transform: rotate(30deg);
  border-radius: 7px;
}
.mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid #a3f1ca;
  border-radius: 3px;
}
@media (max-width: 650px) {
  .mark {
    width: 26px;
    height: 26px;
  }
  .mark::after {
    inset: 5px;
  }
}
.eyebrow,
.sequence-label,
.caption small,
.sample {
  font-size: 11px;
}
.controls button,
.settings-panel button {
  font-size: 12px;
}
@media (max-width: 650px) {
  .eyebrow {
    font-size: 11px;
    letter-spacing: 0.02em;
  }
  .caption small,
  .sequence-label,
  .sample {
    font-size: 11px;
  }
  #moves span {
    font-size: 11px;
  }
  .controls button {
    font-size: 12px;
  }
  h1 span {
    font-size: 11px;
  }
}
