* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  background: #485c3b;
  color: #fbf7e9;
  font:
    14px/1.35 "Avenir Next",
    system-ui,
    sans-serif;
  color-scheme: dark;
}
#world,
#world canvas {
  width: 100%;
  height: 100%;
  display: block;
}
#world canvas {
  touch-action: none;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 650;
  border: 0;
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 12px;
}
button:disabled {
  opacity: 0.6;
}
button:hover,
a:hover {
  color: white;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #e8ce8c;
  outline-offset: 2px;
}
header,
.ride,
#status {
  position: fixed;
  background: #172c23f2;
  border: 1px solid #e5ecd340;
  border-radius: 12px;
  box-shadow: 0 4px 20px #06150a26;
}
header {
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  padding: 10px 16px;
}
a {
  color: #e7ebda;
  text-underline-offset: 3px;
}
header a {
  font-size: 12px;
  text-decoration: none;
}
h1 {
  font:
    30px/1.12 Georgia,
    serif;
  margin: 3px 0 1px;
}
h1 em {
  color: #dfd7b8;
  font-size: 0.84em;
}
button[aria-pressed="true"],
#play {
  background: #f0edd4;
  color: #203226;
}
.ride {
  z-index: 2;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(445px, calc(100% - 22px));
  padding: 12px 16px;
}
.route,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.route {
  font-size: 11px;
  color: #d7dfc9;
}
.route output {
  color: #fff3c3;
  font-variant-numeric: tabular-nums;
}
#scrub {
  display: block;
  width: 100%;
  margin: 2px 0 7px;
  height: 22px;
  accent-color: #ddd5a0;
}
.reading {
  line-height: 1.15;
}
.reading small {
  display: block;
  color: #c5d2c1;
  font-size: 10px;
}
.reading output {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.actions #restart {
  font-size: 23px;
  padding: 4px 8px;
}
.actions #play {
  min-width: 95px;
}
#numbers h2 {
  font:
    19px Georgia,
    serif;
  margin: 0 0 8px;
}
#numbers table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
th,
td {
  text-align: right;
  padding: 2px 0;
}
th:first-child {
  text-align: left;
  font-weight: 500;
}
#numbers p {
  margin: 7px 0;
  color: #d5ddcf;
  font-size: 11px;
}
#status {
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  text-align: center;
  padding: 13px 20px;
  max-width: 80vw;
}
noscript {
  position: fixed;
  top: 45%;
  left: 12%;
  background: #14261d;
  padding: 10px;
}
@media (max-width: 500px) {
  header {
    left: 10px;
    padding: 8px 11px;
  }
  h1 {
    font-size: 22px;
  }
  .ride {
    padding: 10px 12px;
  }
}
@media (max-height: 480px) {
  .ride {
    width: min(440px, 72vw);
    bottom: max(5px, env(safe-area-inset-bottom));
    padding: 6px 12px;
  }
  header {
    padding: 5px 9px;
  }
  h1 {
    font-size: 20px;
  }
}
[hidden] {
  display: none !important;
}
#options {
  position: fixed;
  z-index: 5;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  color: #f4f5df;
}
#options summary,
.menu,
.gauge,
.pads button {
  background: #162d24f5;
  border: 1px solid #e8e9cc45;
  border-radius: 10px;
  box-shadow: 0 4px 20px #06150a26;
}
#options summary {
  display: block;
  cursor: pointer;
  font-weight: 650;
  padding: 11px 15px;
  min-height: 44px;
  margin-left: auto;
  width: max-content;
  list-style: none;
  touch-action: manipulation;
}
#options summary::-webkit-details-marker {
  display: none;
}
#options summary span {
  font-size: 18px;
  vertical-align: -1px;
  margin-right: 3px;
}
.menu {
  margin-top: 6px;
  padding: 13px 14px;
  width: min(315px, calc(100vw - 24px));
  max-height: calc(100dvh - 83px);
  overflow: auto;
  overscroll-behavior: contain;
}
.menu fieldset {
  border: 0;
  margin: 0 0 9px;
  padding: 0;
  display: flex;
  gap: 3px;
}
.menu legend {
  color: #c1d2c2;
  font-size: 11px;
  margin: 0 0 3px;
}
.menu button {
  min-height: 41px;
  padding: 6px 10px;
}
.menu .more {
  border-top: 1px solid #e7efd135;
  padding-top: 5px;
  display: flex;
  justify-content: space-between;
}
.more button {
  font-size: 12px;
}
.menu p {
  font-size: 12px;
  color: #e2e6d5;
  margin: 3px 0 9px;
}
.menu #numbers {
  font-size: 12px;
  width: 100%;
  margin-top: 8px;
  padding: 10px 2px 2px;
  box-shadow: none;
  background: none;
  border: 0;
  border-top: 1px solid #e7efd135;
  border-radius: 0;
}
#manual {
  position: fixed;
  z-index: 2;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(13px, env(safe-area-inset-bottom));
  pointer-events: none;
}
.pads {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 7px;
}
.pads > div {
  display: flex;
  gap: 5px;
}
.pads button {
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  min-width: 48px;
  min-height: 53px;
  font-size: 14px;
  padding: 7px 10px;
}
.pads .stick button {
  font-size: 22px;
}
.pads [data-pedal="forward"] {
  background: #dce9b9;
  color: #253423;
  min-width: 62px;
}
.pads button.held {
  background: #fff0ac;
  color: #253423;
  transform: translateY(1px);
}
.gauge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  padding: 6px 10px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.gauge output {
  font-weight: 700;
}
#marker {
  position: fixed;
  border: 2px solid #fffbd1;
  box-shadow: 0 0 0 1px #274520;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
@media (pointer: coarse), (max-width: 600px) {
  #manual {
    --pedal-width: 60px;
    --reverse-width: 70px;
    --go-width: 72px;
    --pedal-height: 64px;
  }
  .pads > div {
    flex: none;
    gap: 6px;
  }
  .pads .pedals {
    margin-left: auto;
  }
  .pads button {
    flex: none;
    width: var(--pedal-width);
    min-width: 0;
    height: var(--pedal-height);
    padding: 0 3px;
    font-size: 15px;
  }
  .pads .stick button {
    font-size: 27px;
  }
  .pads [data-pedal="reverse"] {
    width: var(--reverse-width);
  }
  .pads [data-pedal="forward"] {
    width: var(--go-width);
    min-width: 0;
  }
  .actions #play,
  .actions #restart {
    flex: none;
    height: 48px;
  }
  .actions #play {
    width: 110px;
  }
  .actions #restart {
    width: 48px;
  }
}
@media (max-width: 371px) {
  #manual {
    --pedal-width: 52px;
    --reverse-width: 62px;
    --go-width: 62px;
    --pedal-height: 60px;
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
  }
  .pads {
    gap: 6px;
  }
  .pads > div {
    gap: 4px;
  }
}
