* {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at top, #29453c, #102320 70%);
  color: #fff2d8;
  font:
    16px system-ui,
    sans-serif;
  min-height: 100svh;
  display: grid;
  align-content: center;
}
#moonhoof3 {
  width: min(100%, 1280px);
  margin: auto;
  padding: clamp(10px, 2.3vw, 32px);
  display: grid;
  gap: 0.55rem;
  font-family: "Trebuchet MS", sans-serif;
}
h2 {
  margin: 0;
  font:
    600 clamp(24px, 4vw, 40px) Georgia,
    serif;
  letter-spacing: -0.035em;
}
.viz-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.btn {
  background: #29453e;
  border: 1px solid #5b7264;
  color: #fff2d8;
  border-radius: 10px;
  padding: 10px 15px;
  font: 600 15px system-ui;
  min-height: 44px;
  cursor: pointer;
}
.btn-primary {
  background: #efcb87;
  color: #29382b;
  border-color: #efcb87;
}
.btn:hover {
  filter: brightness(1.13);
}
button:focus-visible {
  outline: 3px solid #fce5a6;
  outline-offset: 2px;
}
.text-small {
  color: #d0d9cb;
}
.scene {
  box-shadow: 0 12px 32px #07191566;
}
#moonhoof3 #mh-status {
  font: 14px system-ui;
}

#moonhoof3 header,
#moonhoof3 footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
#moonhoof3 .scene {
  position: relative;
  width: 100%;
  max-height: 72svh;
  aspect-ratio: 1.92;
  min-height: 225px;
  overflow: hidden;
  border-radius: 10px;
  background: #b1c4b0;
}
#moonhoof3 canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
#moonhoof3 .stats {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 1em;
  align-items: center;
  background: #172f32da;
  color: #fff1cf;
  padding: 6px 12px;
  border-radius: 18px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
#moonhoof3 .placard {
  position: absolute;
  left: 14px;
  bottom: 14px;
  color: #fff2d4;
  background: #172f32e6;
  padding: 9px 14px;
  border-radius: 7px;
  pointer-events: none;
}
#moonhoof3 .ride-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
#moonhoof3 .ride-picker select {
  font: inherit;
  width: auto;
  max-width: 11em;
  padding: 0.35em 0.55em;
  border-radius: 6px;
}
#moonhoof3 #mh-points {
  position: absolute;
  top: 47px;
  left: 12px;
  color: #fff2ca;
  background: #183530e8;
  font-weight: bold;
  border-radius: 6px;
  padding: 4px 9px;
  pointer-events: none;
}
#moonhoof3 #mh-corner {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: #172f32e8;
  color: #fff1cf;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 14px;
  pointer-events: none;
}
#moonhoof3 #mh-brake {
  touch-action: none;
  user-select: none;
}
#moonhoof3 #mh-banner.impact-result {
  left: 50%;
  bottom: 50%;
  transform: translate(-50%, 50%);
  min-width: 60%;
  max-width: 90%;
  padding: 14px;
  box-sizing: border-box;
  text-align: center;
  background: #152723ec;
  border-top: 2px solid #e7c48a;
  font:
    600 clamp(17px, 3vw, 32px) Georgia,
    serif;
}
#moonhoof3 .impact-result small {
  display: block;
  margin-top: 5px;
  font: 14px system-ui;
  color: #e3d6be;
}
#moonhoof3 [hidden] {
  display: none;
}
#mh-quote {
  position: absolute;
  bottom: 7%;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 94%;
  padding: 6px 12px;
  text-align: center;
  background: #10221ef2;
  color: white;
  border-radius: 8px;
  font-size: clamp(12px, 1.6vw, 18px);
  pointer-events: none;
}
#mh-quote span:not(:empty) {
  display: block;
  color: #f6d498;
}
#mh-quote strong {
  color: #ffdda0;
}
#mh-quote q {
  quotes: none;
}
#mh-club {
  background: #1a332e;
  border-radius: 8px;
  padding: 9px 12px;
}
#mh-club summary {
  cursor: pointer;
}
#mh-club input {
  padding: 8px;
  border-radius: 5px;
  max-width: 100%;
}
#mh-club li {
  padding: 3px;
}
#moonhoof3 .stats {
  max-width: calc(100% - 24px);
  flex-wrap: wrap;
  gap: 0.55em;
}
#mh-time {
  font-variant-numeric: tabular-nums;
}
#mh-time.urgent {
  color: #ffb69f;
}
@media (max-width: 600px) {
  #moonhoof3 .scene {
    aspect-ratio: 0.91;
    max-height: 64svh;
  }
  #moonhoof3 .btn {
    padding: 8px 10px;
  }
  #moonhoof3 footer {
    justify-content: flex-start;
  }
}
@media (max-height: 480px) and (orientation: landscape) {
  #moonhoof3 {
    padding: 4px 12px;
    gap: 3px;
  }
  #moonhoof3 h2 {
    font-size: 20px;
  }
  #moonhoof3 .scene {
    height: 64svh;
    min-height: 110px;
  }
}
