* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #1a1e22;
  color: #eee;
  font-family: system-ui, sans-serif;
}

#view {
  display: block;
  width: 100%;
  height: 100%;
}

#hud {
  position: fixed;
  left: 1.15rem;
  bottom: 1.15rem;
  max-width: 28rem;
  font-size: 0.78rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f4f1ea;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  opacity: 0.88;
  pointer-events: none;
}

#hud[hidden] {
  display: none;
}

#sticks {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  gap: 0.75rem;
}

#sticks[hidden] {
  display: none;
}

#sticks .pad {
  position: relative;
  width: 72px;
  height: 72px;
  border: 1px solid #888;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
}

#sticks .pad span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.2rem;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: #ddd;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

#sticks .pad b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #eee;
}

#gate {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  background: rgba(12, 14, 16, 0.32);
  backdrop-filter: blur(2px);
}

#gate[hidden] {
  display: none;
}

#gate h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: 0.12em;
}

#gate p {
  margin: 0;
  max-width: 26rem;
  white-space: pre-line;
  line-height: 1.55;
  color: #d8d8d4;
}

#menu {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  width: min(26rem, calc(100vw - 2.4rem));
  padding: 1rem 1.1rem 0.9rem;
  color: #f4f1ea;
  background: rgba(12, 14, 16, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.4rem;
  backdrop-filter: blur(6px);
}

#menu[hidden] {
  display: none;
}

#menu h2 {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.14em;
}

#menu .row {
  display: grid;
  grid-template-columns: 7.2rem 1fr 3rem;
  gap: 0.6rem;
  align-items: center;
  width: 100%;
  margin: 0 0 0.35rem;
  padding: 0.35rem 0.45rem;
  border: 0;
  border-left: 3px solid transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

#menu .row.on {
  border-left-color: #b8432e;
  background: rgba(255, 255, 255, 0.06);
}

#menu .row.reset {
  grid-template-columns: 1fr;
  margin-top: 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#menu .name {
  font-size: 0.82rem;
}

#menu .track {
  height: 0.35rem;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  overflow: hidden;
}

#menu .fill {
  display: block;
  height: 100%;
  width: 0;
  background: #e7e1d6;
}

#menu .val {
  font-size: 0.75rem;
  text-align: right;
  letter-spacing: 0.04em;
}

#menu p {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: #c8c4bc;
}

#source {
  position: fixed;
  right: 0.9rem;
  bottom: 0.55rem;
  z-index: 3;
  color: #e7e1d6;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  opacity: 0.72;
}
