#equipment-status {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 18px;
  text-align: left;
  min-width: 210px;
  padding: 13px 16px;
  color: #e9e8d8;
  background: rgba(14, 28, 26, 0.91);
  border: 1px solid #55786d;
  border-radius: 5px;
  pointer-events: auto;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 5px 30px #0005;
}
#equipment-status[hidden],
#pace-status[hidden],
#equipment-reticle[hidden],
#equipment-wheel[hidden] {
  display: none;
}
#pace-status {
  position: absolute;
  right: 28px;
  bottom: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 12px;
  min-width: 138px;
  border: 1px solid #55786d;
  border-radius: 5px;
  color: #dce5d6;
  background: #0e1c1ae8;
  font: inherit;
  font-size: 11px;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
}
#pace-status[aria-pressed="true"] {
  border-color: #c6b678;
  color: #eedbb2;
}
.kit-name {
  font-weight: 700;
  font-size: 14px;
}
.kit-state {
  grid-column: 1;
  font-size: 11px;
  color: #b6c7bc;
}
.kit-name + span + kbd {
  grid-column: 2;
  grid-row: 1/3;
  align-self: center;
}
/* The held relay's charge: a dull bronze bead, or a bright core inside a draining ring. */
.kit-charge {
  display: none;
  position: absolute;
  pointer-events: none;
  left: 14px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(
    #69ffe0 calc(var(--charge, 0) * 360deg),
    #ffffff14 0
  );
}
.kit-charge i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 36% 30%,
    #c9ad74,
    #7d5f34 55%,
    #2b2a22 92%
  );
  box-shadow: inset 0 0 0 1px #00000055;
}
#equipment-status.orb {
  padding-left: 54px;
}
#equipment-status.orb .kit-charge {
  display: block;
}
#equipment-status.charged {
  border-color: #69ffe0;
  box-shadow:
    0 0 18px #39e3d066,
    0 5px 30px #0005;
}
#equipment-status.charged .kit-state {
  color: #9dfff0;
}
#equipment-status.charged .kit-charge i {
  background: radial-gradient(
    circle,
    #ffffff 0 14%,
    #9dfff0 32%,
    #39e3d0 58%,
    #1d5f63cc 86%
  );
  box-shadow:
    0 0 10px #39e3d0,
    inset 0 0 0 1px #c9fff6aa;
}
#equipment-status.fading .kit-charge i,
#equipment-reticle.fading .sight-charge {
  animation: charge-fading 0.32s steps(2, jump-none) infinite;
}
@keyframes charge-fading {
  50% {
    opacity: 0.3;
  }
}
#equipment-reticle {
  --gap: 4px;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  color: #f3f0db;
  pointer-events: none;
}
#equipment-reticle::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 17px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 2px 1px #101a17;
}
#equipment-reticle:not(.guns)::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 2px 1px #101a1760;
}
#equipment-reticle.charged {
  color: #69ffe0;
}
#equipment-reticle.charged::before {
  box-shadow:
    0 0 6px 1px #39e3d0aa,
    0 0 2px 1px #101a1760;
}
.sight-charge {
  display: none;
  position: absolute;
  inset: 0;
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
  overflow: visible;
}
.sight-charge circle {
  fill: none;
  stroke: #69ffe0;
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-dasharray: var(--charge, 0) 1;
  filter: drop-shadow(0 0 3px #39e3d0);
}
#equipment-reticle.charged .sight-charge {
  display: block;
}
.sight-tick {
  display: none;
  position: absolute;
  width: 1px;
  height: 5px;
  left: 17.5px;
  top: 15.5px;
  background: currentColor;
  box-shadow: 0 0 2px 1px #101a1790;
  opacity: 0.6;
}
.guns .sight-tick {
  display: block;
}
.aiming .sight-tick {
  opacity: 1;
}
.sight-tick.north {
  transform: translateY(calc(-1 * var(--gap) - 3px));
}
.sight-tick.south {
  transform: translateY(calc(var(--gap) + 3px));
}
.sight-tick.east {
  transform: translateX(calc(var(--gap) + 3px)) rotate(90deg);
}
.sight-tick.west {
  transform: translateX(calc(-1 * var(--gap) - 3px)) rotate(90deg);
}
#equipment-reticle.guns.target {
  color: #bbd7ae;
}
#equipment-reticle.guns.blocked {
  color: #efa88d;
}
#equipment-reticle.guns.protected {
  color: #ffb24a;
}
.sight-feedback {
  display: none;
  position: absolute;
  left: 50%;
  top: 44px;
  transform: translateX(-50%);
  padding: 4px 7px;
  border-radius: 3px;
  background: #14221de8;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}
.protected .sight-feedback {
  display: block;
}
.sight-bore {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 4px;
  height: 4px;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 2px 1px #101a1790;
  opacity: 0.7;
}
.sight-bore[hidden] {
  display: none;
}
.sight-hit {
  display: none;
  position: absolute;
  inset: 8px;
  background:
    linear-gradient(
      45deg,
      transparent 47%,
      currentColor 48% 52%,
      transparent 53%
    ),
    linear-gradient(
      -45deg,
      transparent 47%,
      currentColor 48% 52%,
      transparent 53%
    );
  mask: radial-gradient(
    circle,
    transparent 4px,
    #000 5px 11px,
    transparent 12px
  );
  filter: drop-shadow(0 0 1px #101a17);
}
.hit .sight-hit {
  display: block;
  color: #f4d2a0;
}
.sight-reload {
  display: none;
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
}
.sight-reload circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5px;
  stroke-linecap: round;
  stroke-dasharray: var(--reload) 1;
}
.reloading .sight-reload {
  display: block;
}
.reloading .sight-tick {
  display: none;
}
#equipment-wheel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 13, 14, 0.83);
  backdrop-filter: blur(9px);
  color: #ede6d3;
  touch-action: manipulation;
}
.kit-panel {
  width: min(600px, 100%);
  text-align: center;
}
.kit-kicker {
  color: #70c9b7;
  letter-spacing: 0.23em;
  text-transform: uppercase;
  font-size: 11px;
  margin: 0 0 8px;
}
.kit-panel h2 {
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 44px);
  margin: 0 0 22px;
  font-weight: 700;
}
.kit-wheel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 460px;
  aspect-ratio: 1.45;
  margin: auto;
  border: 1px solid #8cae8d36;
  border-radius: 50%;
  padding: 8px;
}
.kit-wheel button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 30px 25px;
  border: 1px solid #79887955;
  background: radial-gradient(ellipse at center, #27443b, #182723);
  color: #dedecf;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
  min-width: 0;
}
.kit-wheel button:first-child {
  border-radius: 100% 10px 10px 100%;
}
.kit-wheel button:nth-child(2) {
  border-radius: 10px 100% 100% 10px;
}
.kit-wheel button.focused {
  border-color: #c6b678;
  background: radial-gradient(ellipse at center, #3c5140, #25352c);
  box-shadow: inset 0 0 28px #b4bd6420;
}
.kit-wheel button:disabled {
  opacity: 0.48;
  cursor: default;
}
.kit-wheel strong {
  font-size: 17px;
}
.kit-wheel button > span:last-child {
  font-size: 11px;
  line-height: 1.5;
  max-width: 130px;
  color: #b8c5b8;
}
.kit-wheel kbd {
  position: absolute;
  top: 32px;
  font-size: 11px;
}
.kit-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #14251f;
  border: 1px solid #b3a56a;
  color: #d2bf83;
  font:
    700 22px "Barlow Condensed",
    sans-serif;
}
.kit-icon {
  display: block;
  width: 44px;
  height: 44px;
  margin-top: 8px;
}
.orb-icon {
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 27%,
    #e4d09a,
    #9c7f4d 45%,
    #233e35 74%
  );
  box-shadow:
    inset 0 0 0 2px #b79d62,
    0 0 20px #5dcebf25;
  position: relative;
}
.orb-icon::after {
  content: "";
  position: absolute;
  inset: 5px 15px;
  border: 2px solid #81f9de;
  border-radius: 50%;
  transform: rotate(35deg);
}
.pistol-icon {
  font-size: 0;
  position: relative;
}
.pistol-icon::before,
.pistol-icon::after {
  content: "";
  position: absolute;
  width: 35px;
  height: 9px;
  background: #bcc8c5;
  border-radius: 3px;
  box-shadow: -8px 8px 0 -1px #647874;
  transform: rotate(-25deg);
  top: 9px;
  left: -2px;
}
.pistol-icon::after {
  transform: rotate(25deg);
  left: 12px;
  top: 24px;
}
.kit-detail {
  font-size: 13px;
  line-height: 1.6;
  max-width: 420px;
  min-height: 42px;
  margin: 20px auto 8px;
  color: #d3d9c9;
}
.kit-controls {
  font-size: 11px;
  color: #95aaa2;
}
.kit-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}
.kit-buttons button {
  font: inherit;
  font-size: 12px;
  padding: 10px 16px;
  background: #21382f;
  color: #e3e6d5;
  border: 1px solid #749585;
  border-radius: 3px;
  cursor: pointer;
}
.kit-buttons button:disabled {
  opacity: 0.45;
  cursor: default;
}
.kit-buttons button:focus-visible {
  outline: 2px solid #c6b678;
  outline-offset: 3px;
}
#local-tools {
  position: fixed;
  bottom: 14px;
  left: 18px;
  z-index: 30;
  font-size: 11px;
  color: #d6e0d1;
  background: #14221dd9;
  padding: 7px 10px;
  border: 1px solid #577d6b;
  border-radius: 3px;
}
#local-tools a {
  color: #9ae4ce;
  margin-right: 12px;
}
#local-tools span {
  color: #b6bfae;
}
body.touch #equipment-status {
  right: auto;
  left: calc(var(--pad-left) + 146px);
  bottom: calc(var(--pad-bottom) + 88px);
  min-width: 0;
  width: 64px;
  height: 50px;
  padding: 5px;
  gap: 2px;
  grid-template-columns: 1fr;
  text-align: center;
  border-radius: 8px;
}
body.touch .kit-name {
  display: none;
}
body.touch #equipment-status.orb {
  padding-left: 5px;
}
body.touch .kit-charge {
  left: auto;
  right: -9px;
  top: -9px;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 2px;
}
body.touch #pace-status {
  right: auto;
  left: calc(var(--pad-left) + 146px);
  bottom: calc(var(--pad-bottom) + 148px);
  min-width: 64px;
  min-height: 44px;
  padding: 5px;
  justify-content: center;
  font-size: 10px;
}
body.touch #pace-status kbd {
  display: none;
}
body.touch .kit-state {
  font-size: 8px;
  grid-row: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 54px;
}
body.touch #equipment-status kbd {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
}
@media (max-width: 520px) {
  .kit-wheel {
    aspect-ratio: 1.35;
  }
  .kit-wheel button {
    padding: 25px 15px;
    gap: 8px;
  }
  .kit-wheel strong {
    font-size: 14px;
  }
  .kit-wheel button > span:last-child {
    font-size: 10px;
  }
  .kit-wheel kbd {
    top: 23px;
  }
  .kit-detail {
    font-size: 12px;
  }
  .kit-panel h2 {
    margin-bottom: 14px;
  }
  #local-tools {
    bottom: 5px;
    left: 8px;
    font-size: 9px;
  }
  #equipment-status {
    bottom: 18px;
    right: 18px;
    min-width: 175px;
  }
  #pace-status {
    right: 18px;
    bottom: 101px;
  }
}
@media (max-width: 379px) and (min-height: 501px) {
  body.touch #equipment-status {
    left: var(--pad-left);
    bottom: calc(var(--pad-bottom) + 140px);
  }

  body.touch #pace-status {
    left: calc(var(--pad-left) + 74px);
  }
}

@media (max-height: 500px) {
  .kit-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4px 20px;
    max-width: 680px;
  }
  .kit-kicker,
  .kit-panel h2 {
    grid-column: 1;
    margin: 0;
  }
  .kit-wheel {
    grid-column: 2;
    grid-row: 1/6;
    width: 260px;
  }
  .kit-detail,
  .kit-controls,
  .kit-buttons {
    grid-column: 1;
    margin: 4px 0;
  }
  .kit-panel h2 {
    font-size: 28px;
  }
  .kit-wheel strong {
    font-size: 13px;
  }
  .kit-wheel button {
    padding: 22px 10px;
    gap: 6px;
  }
  .kit-wheel button > span:last-child {
    font-size: 10px;
  }
  .kit-wheel kbd {
    top: 20px;
  }
  body.touch #equipment-status {
    bottom: calc(var(--pad-bottom) + 152px);
    left: var(--pad-left);
  }
  body.touch #pace-status {
    bottom: calc(var(--pad-bottom) + 156px);
    left: calc(var(--pad-left) + 82px);
  }
}
.kit-relay {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid #55786d66;
  font-size: 11px;
  color: #9fb4ab;
}
.kit-relay[hidden] {
  display: none;
}
.kit-relay i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: conic-gradient(
    #69ffe0 calc(var(--relay, 0) * 360deg),
    #ffffff1c 0
  );
  -webkit-mask: radial-gradient(circle, transparent 3px, #000 4px);
  mask: radial-gradient(circle, transparent 3px, #000 4px);
}
.kit-relay span {
  flex: 1;
}
.kit-relay kbd {
  font-size: 10px;
}
.kit-relay.ready {
  color: #9dfff0;
}
.kit-relay.up {
  color: #e9fffb;
}
.kit-relay.up i {
  box-shadow: 0 0 8px #39e3d0;
}
#hud:has(.kit-relay:not([hidden])) #pace-status {
  bottom: 140px;
}
@media (max-width: 520px) {
  #hud:has(.kit-relay:not([hidden])) #pace-status {
    bottom: 128px;
  }
}
.kit-upgrades {
  font-size: 12px;
  line-height: 1.5;
  max-width: 440px;
  margin: 0 auto 8px;
  color: #a9d9c8;
}
.kit-upgrades[hidden] {
  display: none;
}
.sight-pull {
  display: none;
  position: absolute;
  inset: 3px;
  border: 2px solid #69ffe0;
  border-radius: 6px;
  -webkit-mask:
    linear-gradient(#000 0 0) center / 46% 100% no-repeat,
    linear-gradient(#000 0 0) center / 100% 46% no-repeat;
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) center / 46% 100% no-repeat exclude,
    linear-gradient(#000 0 0) center / 100% 46% no-repeat;
  filter: drop-shadow(0 0 3px #39e3d0);
  opacity: 0.85;
}
.pullable .sight-pull,
.pulling .sight-pull {
  display: block;
}
.pulling .sight-pull {
  animation: pull-tighten 0.3s ease-in-out infinite alternate;
}
@keyframes pull-tighten {
  to {
    inset: 8px;
    opacity: 1;
  }
}
#touch [data-touch="shield"] {
  right: calc(var(--pad-right) + 93px);
  bottom: calc(var(--pad-bottom) + 136px);
  width: 50px;
  height: 50px;
  font-size: 0.68rem;
  border-color: rgba(57, 227, 208, 0.55);
  background:
    radial-gradient(circle, rgba(16, 12, 10, 0.55) 62%, transparent 63%),
    conic-gradient(
      rgba(105, 255, 224, 0.75) calc(var(--charge, 1) * 360deg),
      rgba(232, 207, 164, 0.18) 0
    );
}
#touch [data-touch="shield"].cooling {
  color: rgba(232, 207, 164, 0.55);
}
#touch [data-touch="shield"].raised {
  background: rgba(57, 227, 208, 0.5);
  border-color: var(--light);
  color: #fff;
}
@media (max-width: 379px) and (min-height: 501px) {
  body.touch #touch [data-touch="shield"] {
    right: var(--pad-right);
    bottom: calc(var(--pad-bottom) + 152px);
    width: 44px;
    height: 44px;
  }
}
