:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #ecf0fa;
  background: #0b101d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 15% 10%, #26335780, transparent 60%), #0b101d;
}
main {
  max-width: 780px;
  margin: auto;
  padding: 30px 24px 40px;
}
header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.09em;
  color: #8f9bb2;
}
a {
  color: #c7d0df;
  text-decoration: none;
}
a:hover {
  color: #70f3d7;
}
.title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 24px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #70f3d7;
  font-weight: 700;
}
h1 {
  font-size: clamp(42px, 9vw, 74px);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 1;
  margin: 0;
}
h1 span {
  color: #70f3d7;
  font-size: 0.65em;
  margin-left: 14px;
}
.dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.dashboard div {
  padding: 12px 16px;
  border-left: 1px solid #46516a;
}
.dashboard small {
  display: block;
  color: #8f9bb2;
  font-size: 9px;
  letter-spacing: 0.12em;
}
.dashboard strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.stage {
  position: relative;
  overflow: hidden;
  border: 1px solid #38445a;
  border-radius: 18px;
  background: #121b2d;
}
canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
}
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 32px;
  background: #0a101ac9;
  backdrop-filter: blur(4px);
}
#overlay[hidden] {
  display: none;
}
h2 {
  font-size: clamp(23px, 4vw, 38px);
  line-height: 1.15;
  margin: 12px 0;
}
#description {
  max-width: 390px;
  color: #b9c6da;
  font-size: 15px;
  line-height: 1.6;
}
button {
  font: inherit;
  border: 1px solid #43516b;
  border-radius: 10px;
  background: #1a263b;
  color: #ecf0fa;
  padding: 12px 18px;
  cursor: pointer;
  touch-action: none;
}
button:hover {
  border-color: #70f3d7;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
a:focus-visible,
button:focus-visible,
canvas:focus-visible {
  outline: 3px solid #70f3d7;
  outline-offset: 3px;
}
#start,
#boost {
  background: #70f3d7;
  color: #0b2924;
  border-color: transparent;
  font-weight: 800;
}
#start {
  margin: 15px 0;
}
#record {
  color: #8f9bb2;
}
.controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}
#status {
  min-height: 24px;
  color: #a9b9d1;
  text-align: center;
  font-size: 13px;
}
footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #8796ad;
  font-size: 11px;
  text-align: center;
  line-height: 1.6;
}
@media (max-width: 520px) {
  main {
    padding: 18px 12px 28px;
  }
  header span {
    display: none;
  }
  .title {
    margin: 26px 0 20px;
  }
  .dashboard {
    gap: 0;
  }
  .dashboard div {
    padding: 8px;
  }
  .dashboard strong {
    font-size: 18px;
  }
  .dashboard small {
    font-size: 8px;
  }
  .controls {
    gap: 5px;
  }
  .controls button {
    padding: 13px 3px;
    font-size: 11px;
  }
  #overlay {
    padding: 18px;
  }
  #description {
    font-size: 12px;
    margin: 6px 0;
  }
  .title button {
    font-size: 12px;
    padding: 9px;
  }
}
