#hud {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

#hud button { pointer-events: auto; }

.objective,
.through,
.clock {
  position: absolute;
  top: calc(12px + var(--safe-t));
  padding: 7px 14px;
  background: rgb(10 52 60 / 82%);
}

.objective {
  left: calc(12px + var(--safe-l));
  display: grid;
  max-width: 34vw;
  border-left: 5px solid var(--brass);
  border-radius: 4px;
}

.objective strong { font-size: 19px; hyphens: manual; overflow-wrap: anywhere; }
.objective span { color: var(--mint); font-size: 14px; }

.clock {
  left: 50%;
  border: 4px solid var(--brass);
  border-radius: 24px;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
}

.clock.late { color: var(--hot); }

.through {
  right: calc(70px + var(--safe-r));
  display: grid;
  border-radius: 4px;
  text-align: right;
}

.through strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.through span { color: var(--mint); font-size: 13px; }

.menu-button {
  position: absolute;
  top: calc(12px + var(--safe-t));
  right: calc(12px + var(--safe-r));
  display: grid;
  gap: 4px;
  place-content: center;
  width: 48px;
  height: 48px;
  min-height: 0;
  padding: 0;
  border: 4px solid var(--brass);
  border-radius: 50%;
  background: var(--enamel-deep);
}

.menu-button i { display: block; width: 18px; height: 3px; background: var(--porcelain); }

.heat {
  position: absolute;
  top: calc(76px + var(--safe-t));
  left: 50%;
  width: min(330px, 60vw);
  text-align: center;
  transform: translateX(-50%);
}

.heat-track {
  height: 20px;
  overflow: hidden;
  border: 4px solid var(--brass);
  border-radius: 10px;
  background: var(--enamel-deep);
}

.heat-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brass), var(--hot));
  transform-origin: left;
}

.heat span { font-size: 14px; text-shadow: 0 1px 3px var(--enamel-deep); }

.pressure {
  position: absolute;
  right: calc(16px + var(--safe-r));
  bottom: calc(16px + var(--safe-b));
  width: 108px;
  height: 108px;
}

.pressure .track,
.pressure .fill { fill: none; stroke-width: 9; stroke-linecap: round; }
.pressure .track { stroke: #25585f; }
.pressure .fill { stroke: var(--mint); stroke-dasharray: 100 100; }
.pressure.ready .fill { stroke: var(--hot); }

.feed {
  position: absolute;
  bottom: calc(16px + var(--safe-b));
  left: calc(16px + var(--safe-l));
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  font-size: 14px;
  list-style: none;
}

.feed li { width: fit-content; padding: 3px 10px; border-radius: 4px; background: rgb(10 52 60 / 72%); }
.feed li.mine { background: var(--brass); color: var(--enamel-deep); }

.round-card {
  position: absolute;
  bottom: calc(8vh + var(--safe-b));
  left: calc(6vw + var(--safe-l));
  max-width: min(540px, 86vw);
  padding: 18px 24px;
  border-left: 8px solid var(--brass);
  border-radius: 6px;
  background: rgb(10 52 60 / 86%);
}

.round-card h2 {
  margin: 2px 0 6px;
  color: var(--brass);
  font-size: clamp(24px, 6.4vw, 52px);
  overflow-wrap: anywhere;
}
.round-card p { margin: 0 0 4px; }
.round-no { color: var(--mint); }
.round-goal { font-size: 21px; }
.round-tip { color: var(--mint); font-size: 15px; }
.round-card button { margin-top: 8px; }

.countdown,
.banner {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  -webkit-text-stroke: 3px var(--enamel-deep);
  paint-order: stroke fill;
}

.countdown {
  color: var(--brass);
  font-size: clamp(72px, 17vmin, 150px);
  line-height: 1;
}

.banner { font-size: clamp(30px, 8vmin, 64px); line-height: 1.1; }
.banner.good { color: var(--brass); }
.banner.bad { color: var(--copper); }

.lock-hint {
  position: absolute;
  bottom: calc(14px + var(--safe-b));
  left: 50%;
  margin: 0;
  padding: 8px 16px;
  border-radius: 4px;
  background: rgb(10 52 60 / 80%);
  transform: translateX(-50%);
}

.watch {
  position: absolute;
  bottom: calc(14px + var(--safe-b));
  left: 50%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 92vw;
  transform: translateX(-50%);
}

.watch span {
  min-width: 150px;
  padding: 10px 14px;
  border-radius: 6px;
  background: rgb(10 52 60 / 82%);
  text-align: center;
}

.perf {
  position: absolute;
  top: calc(80px + var(--safe-t));
  left: calc(12px + var(--safe-l));
  padding: 4px 8px;
  background: rgb(10 52 60 / 70%);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: pre;
}

/* touch */
#touch {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.stick {
  position: fixed;
  display: none;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border: 5px solid rgb(242 184 75 / 70%);
  border-radius: 50%;
  background: rgb(10 52 60 / 25%);
}

.stick.on { display: block; }

.knob {
  position: absolute;
  top: 31px;
  left: 31px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgb(243 250 246 / 75%);
}

.touch-jump,
.touch-blast {
  position: fixed;
  padding: 0;
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
}

.touch-jump {
  right: calc(22px + var(--safe-r));
  bottom: calc(22px + var(--safe-b));
  width: 92px;
  height: 92px;
  border: 6px solid var(--brass);
  background: rgb(243 250 246 / 75%);
}

.touch-blast {
  right: calc(126px + var(--safe-r));
  bottom: calc(18px + var(--safe-b));
  width: 76px;
  height: 76px;
  border: 6px solid var(--hot);
  background: rgb(10 52 60 / 72%);
  color: var(--porcelain);
  font-size: 14px;
}

.touch-jump.held,
.touch-blast.held { transform: scale(0.92); }

/* with thumbs on the bottom corners the gauge and feed move up */
body.touch .pressure {
  right: calc(26px + var(--safe-r));
  bottom: calc(124px + var(--safe-b));
  width: 64px;
  height: 64px;
}

body.touch .feed { top: calc(132px + var(--safe-t)); bottom: auto; font-size: 12px; }
body.touch .watch { bottom: calc(10px + var(--safe-b)); }

@media (max-width: 620px) {
  .objective { max-width: 36vw; padding: 5px 8px; }
  .objective strong { font-size: 14px; }
  .objective span { display: none; }
  .clock { padding: 4px 10px; font-size: 18px; }
  .through { padding: 5px 6px; right: calc(64px + var(--safe-r)); }
  .through strong { font-size: 17px; }
  .through span { font-size: 11px; }
}

@media (max-height: 500px) {
  .objective span { display: none; }
  .round-card { bottom: calc(8px + var(--safe-b)); padding: 8px 16px; }
  .round-card h2 { font-size: 30px; }
  .round-goal { font-size: 16px; }
  .countdown { top: 16%; }
}

/* the narrowest phones, and languages with long words */
@media (max-width: 400px) {
  .objective { left: calc(8px + var(--safe-l)); max-width: 34vw; }
  .objective strong { font-size: 12px; }
  .clock { padding: 3px 7px; border-width: 3px; font-size: 16px; }
  .through { right: calc(56px + var(--safe-r)); max-width: 72px; padding: 4px 5px; }
  .through strong { font-size: 15px; }
  .through span { font-size: 10px; }
  .menu-button { right: calc(8px + var(--safe-r)); width: 44px; height: 44px; }
}
