#pilot-secret {
  position: fixed;
  inset: auto auto 12px 12px;
  z-index: 500;
  width: 28px;
  height: 28px;
  padding: 6px;
  border: 1px solid #c8aa6e33;
  background: #09171d66;
  color: #c8aa6e;
  opacity: 0.09;
  cursor: pointer;
  transition:
    opacity 0.2s,
    box-shadow 0.2s;
}
#pilot-secret:hover,
#pilot-secret:focus-visible {
  opacity: 0.7;
  box-shadow: 0 0 15px #c8aa6e66;
  border-color: #c8aa6e88;
}
#pilot-secret[hidden] {
  display: none;
}
body.pilot-active {
  overflow: hidden;
}
body.pilot-active .app-shell {
  display: none;
}
#pilot-view {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #081820;
  color: #c8d7d7;
  font-family: "Segoe UI", sans-serif;
  user-select: none;
}
#pilot-view * {
  box-sizing: border-box;
}
#pilot-view [hidden] {
  display: none !important;
}
#pilot-view button {
  cursor: pointer;
  color: #cdbb8f;
  font: inherit;
  background: linear-gradient(#122931, #08151b);
  border: 1px solid #826e3e;
  padding: 7px;
}
#pilot-view button:hover {
  border-color: #dfc780;
  box-shadow: 0 0 10px #bdad652b;
  color: #f2e4b9;
}
#pilot-view button:disabled {
  opacity: 0.42;
  cursor: default;
}
#pilot-view kbd {
  font:
    10px "Segoe UI",
    sans-serif;
  color: #f4e9ca;
}
#pilot-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: default;
  touch-action: none;
}
#pilot-view.aiming #pilot-canvas {
  cursor: crosshair;
}
.pilot-top {
  position: absolute;
  right: 14px;
  top: 10px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 6px 6px 6px 18px;
  background: #061016ed;
  border: 1px solid #69572f;
  box-shadow: 0 3px 14px #0008;
  font-size: 12px;
}
#pilot-view .pilot-top button {
  border: 0;
  font-size: 10px;
  letter-spacing: 1px;
}
.pilot-live {
  font-size: 10px;
  color: #69c8a1;
  letter-spacing: 1px;
}
.pilot-live b {
  margin-left: 12px;
  color: #dbcea7;
}
#pilot-score {
  color: #eee1bb;
  white-space: pre;
  font-variant-numeric: tabular-nums;
}
.pilot-allies {
  position: absolute;
  right: 16px;
  top: 68px;
  display: flex;
  gap: 8px;
}
#pilot-view .pilot-allies button {
  position: relative;
  padding: 2px;
  width: 48px;
  height: 52px;
}
.pilot-allies img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pilot-allies span {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: #081820;
  padding: 0 3px;
  font-size: 10px;
}
.pilot-allies i {
  position: absolute;
  bottom: -4px;
  left: 0;
  height: 3px;
  background: #45ac79;
  max-width: 100%;
}
.pilot-allies .dead {
  filter: grayscale(1);
  opacity: 0.5;
}
.pilot-target {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #061016ef;
  border: 1px solid #6c673b;
  padding: 14px;
  min-width: 180px;
  font-size: 12px;
}
#pilot-message {
  position: absolute;
  top: 21%;
  left: 50%;
  transform: translateX(-50%);
  padding: 11px 20px;
  background: #07141ce8;
  border: 1px solid #a38a4b66;
  color: #eee0b6;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  max-width: 70%;
  font-size: 13px;
}
#pilot-message.visible {
  opacity: 1;
}
.pilot-death {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  font:
    22px Georgia,
    serif;
  letter-spacing: 3px;
  color: #e89b99;
  background: #061016de;
  border: 1px solid #a04b5666;
  padding: 24px;
}
.pilot-bottom {
  position: absolute;
  inset: auto 0 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(220px, 1fr);
  align-items: end;
  gap: 12px;
  padding: 0 12px 10px;
}
.pilot-stats {
  justify-self: start;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: #061016ee;
  border: 1px solid #6f633c;
  font-size: 11px;
  line-height: 1.5;
}
.pilot-stats > b {
  color: #dfc88d;
  letter-spacing: 1px;
  margin-bottom: 3px;
}
.pilot-stats span {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pilot-stats strong {
  color: #ebe4d0;
  font-weight: 500;
}
.pilot-hud {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, #102b32f5, #061016fc);
  border: 2px solid #9a814b;
  border-bottom: 3px solid #b29860;
  box-shadow: 0 -5px 28px #0007;
  padding: 14px 12px 11px;
  border-radius: 12px 12px 2px 2px;
  max-width: 100%;
}
.pilot-portrait {
  position: relative;
  align-self: center;
  width: 82px;
  height: 82px;
  border: 2px solid #b69b63;
  border-radius: 50%;
  box-shadow:
    0 0 0 5px #07171d,
    0 0 0 6px #655331;
  flex-shrink: 0;
  margin: 0 4px;
}
.pilot-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.pilot-portrait span {
  position: absolute;
  bottom: -11px;
  left: 28px;
  min-width: 26px;
  padding: 3px;
  background: #102729;
  border: 1px solid #b8a46e;
  color: #fff0c4;
  text-align: center;
  font-size: 12px;
  border-radius: 4px;
}
.pilot-center {
  width: 274px;
}
.pilot-identity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 7px;
  font-size: 10px;
  color: #a7bcbf;
}
.pilot-identity > b {
  font-size: 13px;
  letter-spacing: 1px;
  color: #ead5a2;
}
#pilot-xp {
  height: 3px;
  background: #172f36;
  margin-bottom: 10px;
}
#pilot-xp i {
  height: 3px;
  display: block;
  background: #9f83c7;
}
.pilot-abilities {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 8px;
}
#pilot-view .pilot-spell {
  height: 70px;
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 1px solid #a08e58;
  background: radial-gradient(
    ellipse at 40% 20%,
    #3e6766,
    #112b36 60%,
    #060f1a
  );
}
.spell-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  font-size: 33px;
  text-shadow: 0 0 15px #8ce6e4;
  color: #aee0d4;
}
.spell-art img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.pilot-spell kbd {
  position: absolute;
  top: 2px;
  left: 3px;
  background: #041116cf;
  padding: 1px 4px;
  border: 1px solid #7b7151;
}
.spell-cost {
  position: absolute;
  top: 3px;
  right: 3px;
  color: #9cdeef;
  font-size: 9px;
  text-shadow: 1px 1px #000;
}
.spell-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 3px 1px;
  background: #030e15e6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 9px;
}
.spell-cd {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  font-size: 23px;
  font-style: normal;
  color: white;
  text-shadow: 0 2px 4px black;
}
.pilot-spell.cooling .spell-art {
  filter: brightness(0.35);
}
.pilot-spell.unavailable .spell-art {
  filter: grayscale(1) brightness(0.3);
}
#pilot-view .aiming {
  box-shadow: 0 0 12px #69e3c6;
  border-color: #abfff2;
}
#pilot-view .pilot-spell.unavailable {
  border-color: #3e5254;
}
.pilot-resource {
  height: 18px;
  position: relative;
  background: #041210;
  border: 1px solid #314e3d;
  overflow: hidden;
  margin-top: 4px;
}
.pilot-resource i {
  display: block;
  height: 100%;
  background: linear-gradient(#398754, #21663c);
  transition: width 0.12s linear;
}
.pilot-resource span {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  font-size: 10px;
  color: #fff;
  text-shadow: 0 1px 2px #000;
}
.pilot-resource.mana {
  height: 13px;
  border-color: #244257;
  background: #091422;
}
.pilot-resource.mana i {
  background: linear-gradient(#28769e, #185077);
}
.pilot-equipment {
  width: 127px;
}
.pilot-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
#pilot-view .pilot-items button,
.pilot-items > span {
  padding: 0;
  background: #050e14;
  border: 1px solid #5b5b3d;
  width: 39px;
  height: 36px;
}
.pilot-items img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#pilot-view .pilot-gold {
  padding: 4px;
  width: 100%;
  margin: 5px 0;
  font-size: 11px;
  background: #0b1b20;
}
.pilot-gold kbd {
  float: right;
}
.pilot-utility {
  display: flex;
  gap: 3px;
}
#pilot-view .pilot-utility button {
  height: 35px;
  width: 30px;
  position: relative;
  padding: 0;
  font-size: 17px;
}
.pilot-utility kbd {
  position: absolute;
  top: 0;
  left: 2px;
  font-size: 8px;
}
.pilot-utility small {
  position: absolute;
  bottom: 0;
  right: 2px;
  font-size: 10px;
  background: #08141c;
}
.pilot-utility .unavailable {
  filter: grayscale(1);
  opacity: 0.35;
}
.pilot-basic {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 56px;
}
#pilot-view .pilot-basic button {
  padding: 5px;
  font-size: 13px;
}
.pilot-basic small {
  display: block;
  font-size: 7px;
  letter-spacing: 0.5px;
}
.pilot-minimap-wrap {
  pointer-events: auto;
  justify-self: end;
  width: clamp(210px, 19vw, 280px);
  background: #08171c;
  border: 2px solid #a3884f;
  box-shadow:
    0 0 0 3px #071319,
    0 0 20px #0007;
}
.pilot-minimap-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 22px;
  padding-left: 8px;
  font-size: 8px;
  letter-spacing: 1px;
}
#pilot-view .pilot-minimap-head button {
  font-size: 8px;
  padding: 3px 6px;
  border: 0;
  background: none;
}
#pilot-minimap {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  touch-action: none;
}
.pilot-help,
.pilot-shop {
  position: absolute;
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
  width: min(780px, 90vw);
  max-height: 68vh;
  overflow: auto;
  padding: 32px;
  background: linear-gradient(135deg, #102b33f9, #06121afb);
  border: 1px solid #ae965c;
  box-shadow: 0 20px 100px #000c;
  user-select: text;
}
.pilot-help h2,
.pilot-shop h2 {
  color: #e7d8b0;
  font:
    27px Georgia,
    serif;
  margin: 5px 0 18px;
}
.pilot-help p {
  font-size: 13px;
  line-height: 1.6;
}
.pilot-help dl {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 12px;
  font-size: 12px;
  line-height: 1.5;
  margin: 22px 0;
}
.pilot-help dt {
  color: #e0c991;
}
.pilot-help dd {
  margin: 0;
}
#pilot-view .pilot-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: none;
  font-size: 23px;
  padding: 0 6px;
}
.pilot-footnote {
  border-top: 1px solid #a48d5533;
  padding-top: 14px;
  color: #7f9a9e;
}
.pilot-shop-head {
  display: flex;
  gap: 10px;
}
.pilot-shop-head input {
  flex: 1;
  min-width: 0;
  background: #06121d;
  border: 1px solid #4a646a;
  color: #e1ddcf;
  padding: 10px;
}
#pilot-shop-state {
  color: #9db4b5;
  font-size: 12px;
}
#pilot-shop-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}
#pilot-view #pilot-shop-items button {
  text-align: left;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 4px;
  font-size: 10px;
  align-items: center;
}
#pilot-shop-items img {
  width: 32px;
  height: 32px;
  grid-row: span 2;
}
#pilot-shop-items small {
  color: #dcc588;
}
#pilot-shop-inventory {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
#pilot-view #pilot-shop-inventory button {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
#pilot-shop-inventory img {
  width: 24px;
  height: 24px;
}
@media (max-width: 1250px) {
  .pilot-stats {
    width: 145px;
    font-size: 10px;
    padding: 10px;
  }
  .pilot-bottom {
    gap: 7px;
    grid-template-columns: minmax(110px, 1fr) auto minmax(180px, 1fr);
  }
  .pilot-hud {
    gap: 7px;
    padding: 10px 8px;
  }
  .pilot-portrait {
    width: 62px;
    height: 62px;
  }
  .pilot-portrait span {
    left: 18px;
  }
  .pilot-center {
    width: 245px;
  }
  .pilot-basic {
    width: 42px;
  }
  .pilot-minimap-wrap {
    width: 210px;
  }
}
@media (max-width: 1000px) {
  .pilot-stats {
    display: none;
  }
  .pilot-bottom {
    grid-template-columns: auto 210px;
    justify-content: space-between;
  }
  .pilot-portrait {
    display: none;
  }
  .pilot-center {
    width: 240px;
  }
  .pilot-top {
    gap: 9px;
  }
  .pilot-help {
    top: 8%;
    max-height: 70vh;
  }
}
@media (max-width: 700px) {
  .pilot-bottom {
    grid-template-columns: 1fr 145px;
    padding: 0 6px 6px;
    gap: 4px;
  }
  .pilot-minimap-wrap {
    width: 145px;
  }
  .pilot-hud {
    gap: 4px;
    padding: 6px;
  }
  .pilot-center {
    width: 160px;
  }
  .pilot-equipment {
    width: 81px;
  }
  .pilot-items {
    gap: 2px;
  }
  #pilot-view .pilot-items button,
  .pilot-items > span {
    width: 25px;
    height: 23px;
  }
  .pilot-basic {
    display: none;
  }
  .pilot-abilities {
    gap: 3px;
  }
  #pilot-view .pilot-spell {
    height: 49px;
  }
  .spell-art {
    font-size: 25px;
  }
  .spell-name {
    font-size: 7px;
  }
  .pilot-identity {
    font-size: 8px;
  }
  .pilot-identity > b {
    font-size: 11px;
  }
  .pilot-utility {
    gap: 2px;
  }
  #pilot-view .pilot-utility button {
    width: 19px;
    height: 28px;
    font-size: 13px;
  }
  .pilot-top {
    left: 6px;
    right: 6px;
    gap: 6px;
    font-size: 10px;
    padding: 4px;
  }
  .pilot-live {
    display: none;
  }
  .pilot-allies {
    top: 52px;
  }
  .pilot-help dl {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .pilot-help dt {
    margin-top: 7px;
  }
  #pilot-shop-items {
    grid-template-columns: repeat(2, 1fr);
  }
  .pilot-shop,
  .pilot-help {
    padding: 24px 18px;
  }
  .pilot-target {
    top: 110px;
  }
  .pilot-bottom {
    overflow: hidden;
  }
}
