* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #080c16;
  color: #eef7ff;
  font:
    14px system-ui,
    sans-serif;
}
body {
  display: flex;
  flex-direction: column;
}
header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 12px;
  border-bottom: 1px solid #263243;
  flex-shrink: 0;
}
header strong {
  letter-spacing: 2px;
  color: #79e1f1;
}
header span {
  font-size: 11px;
  color: #a4afc1;
  margin-right: auto;
}
button,
a {
  font: inherit;
  color: inherit;
}
button {
  border: 1px solid #526079;
  border-radius: 5px;
  padding: 7px 12px;
  background: #172235;
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button[aria-pressed="true"],
button.held {
  border-color: #79e1f1;
  background: #234453;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #fbb870;
  outline-offset: 2px;
}
a {
  color: #94deed;
}
main {
  position: relative;
  min-height: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
canvas {
  display: block;
  outline: none;
  touch-action: none;
}
#panel {
  position: absolute;
  max-width: 520px;
  width: calc(100% - 24px);
  padding: 22px;
  text-align: center;
  background: #0b1329ee;
  border: 1px solid #536381;
  border-radius: 10px;
  box-shadow: 0 12px 50px #0008;
}
h1 {
  font-size: 28px;
  letter-spacing: 3px;
  margin: 0 0 12px;
}
.instructions {
  color: #c5d0df;
  line-height: 1.7;
}
#start {
  background: #26475e;
  border-color: #79e1f1;
}
#touch {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px;
  flex-shrink: 0;
}
#touch button {
  min-height: 44px;
  touch-action: none;
  user-select: none;
}
footer {
  min-height: 26px;
  padding: 5px 12px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #aab9cc;
  flex-shrink: 0;
}
#save-warning {
  color: #ffca83;
}
[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  header {
    gap: 5px;
    padding: 4px 6px;
    font-size: 11px;
  }
  header span {
    display: none;
  }
  header strong {
    font-size: 11px;
    letter-spacing: 1px;
    margin-right: auto;
  }
  header button {
    padding: 6px;
  }
  header a {
    font-size: 10px;
  }
  #panel {
    padding: 12px;
  }
  h1 {
    font-size: 21px;
  }
  .instructions {
    font-size: 12px;
    line-height: 1.5;
  }
  footer {
    padding: 4px 6px;
    font-size: 10px;
  }
  #touch {
    gap: 5px;
  }
  #touch button {
    padding: 6px 10px;
  }
}
@media (max-height: 420px) {
  header {
    min-height: 32px;
  }
  footer {
    min-height: 20px;
  }
  #panel {
    padding: 10px;
  }
  .instructions {
    margin: 7px 0;
  }
  h1 {
    font-size: 19px;
    margin-bottom: 4px;
  }
}
