/* ---------- HUD ---------- */
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  display: none;
}

#topbar {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 0.875rem;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px #000;
}

#topbar .big {
  font-size: 1.25rem;
  color: var(--bone);
}

#topbar .sub {
  color: var(--bone-dim);
  margin-top: 2px;
}

#goldtxt {
  color: var(--gold);
}

#bosswrap {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 70vw);
  display: none;
  text-align: center;
}

#bossname {
  font-size: 0.9375rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #e3d2b5;
  text-shadow: 0 0 8px #000;
  margin-bottom: 4px;
}

#bossbar {
  height: 12px;
  border: 1px solid #000;
  outline: 1px solid #4a3b2a;
  background: #1a0508;
}

#bossfill {
  height: 100%;
  width: 100%;
  background: linear-gradient(#c2263c, #6d0b1a);
  transition: width .15s;
}

#banner {
  position: absolute;
  top: 26%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: clamp(1.625rem, 5vw, 2.875rem);
  letter-spacing: 8px;
  text-transform: uppercase;
  color: #e6d6b8;
  opacity: 0;
  transition: opacity .5s;
  text-shadow: 0 0 18px rgba(161, 18, 38, .8), 0 2px 4px #000;
}

#banner.show {
  opacity: 1;
}

#banner .small {
  display: block;
  font-size: 0.875rem;
  letter-spacing: 4px;
  color: var(--bone-dim);
  margin-top: 6px;
}

/* bottom cluster */
#bottom {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.orb {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 3px solid #241c12;
  box-shadow: 0 0 0 2px #000, inset 0 6px 14px rgba(0, 0, 0, .8), 0 4px 14px
    #000;
  background: #0a0705;
}

.orb .fill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  transition: height .12s linear;
}

#hpfill {
  background: radial-gradient(circle at 50% 20%, #e0475c, #8c0f22 60%, #4d0410);
  box-shadow: inset 0 4px 10px rgba(255, 120, 120, .35);
}

#esfill {
  background: radial-gradient(circle at 50% 20%, #7de8d4, #1d8a75 60%, #073b31);
  box-shadow: inset 0 4px 10px rgba(160, 255, 235, .3);
}

.orb .shine {
  position: absolute;
  top: 8%;
  left: 16%;
  width: 46%;
  height: 26%;
  border-radius: 50%;
  background: radial-gradient(rgba(255, 255, 255, .35), transparent 70%);
}

.orb .num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  color: #fff;
  text-shadow: 0 1px 3px #000, 0 0 6px #000;
}

#midcol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

#xpwrap {
  width: 100%;
  height: 5px;
  background: #161209;
  border: 1px solid #000;
  outline: 1px solid #33291c;
}

#xpfill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6d5a2f, #d8a53f);
}

#skillbar {
  display: flex;
  gap: 5px;
}

.slot {
  width: 52px;
  height: 52px;
  position: relative;
  background: linear-gradient(#1b1610, #0d0a07);
  border: 1px solid #000;
  outline: 1px solid #453722;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #c9b892;
  pointer-events: auto;
  cursor: pointer;
}

.slot .key {
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-size: 0.5625rem;
  color: var(--bone-dim);
  letter-spacing: 0;
}

.slot .cdveil {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .66);
  display: none;
  z-index: 1;
}

.slot .cd {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0%;
  background: rgba(158, 158, 168, .5);
  z-index: 2;
}

.slot .cdt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  font-size: 0.9375rem;
  font-weight: bold;
  color: #fff;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0
    #000, 0 0 5px #000;
}

.slot .key {
  z-index: 4;
}

.slot .rct {
  z-index: 4;
}

.slot.nores {
  outline-color: #173c35;
}

.slot.empty {
  opacity: .4;
}

.slot .g {
  pointer-events: none;
}

.slot .rct {
  position: absolute;
  top: 1px;
  right: 3px;
  font-size: 0.5625rem;
  color: #d8a53f;
  letter-spacing: 0;
}

.slot[data-sk="pot"] .rct {
  color: #d8697c;
}

.slot[data-sk="wsk"] .rct,
.slot[data-sk="ask"] .rct,
.slot[data-sk="trk"] .rct {
  color: #7fd0ff;
}

.slot[data-sk="bd"] .rct {
  color: #46c8b2;
}

.slot:active {
  transform: translateY(1px);
}

#lvlbadge {
  font-size: 0.6875rem;
  letter-spacing: 2px;
  color: var(--bone-dim);
}

/* corner buttons */
#corner {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  gap: 6px;
  pointer-events: auto;
}

.cbtn {
  width: 34px;
  height: 34px;
  background: #14100b;
  border: 1px solid #000;
  outline: 1px solid #453722;
  color: var(--bone-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  cursor: pointer;
  font-family: inherit;
}

.cbtn:hover {
  color: var(--bone);
}

#minimap {
  position: absolute;
  top: 54px;
  right: 12px;
  width: 140px;
  height: 140px;
  border: 1px solid #000;
  outline: 1px solid #3a2f22;
  background: rgba(6, 7, 5, .7);
}

/* toasts */
#toasts {
  position: absolute;
  left: 12px;
  bottom: 120px;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  max-width: 46vw;
}

.toast {
  font-size: 0.8125rem;
  padding: 3px 8px;
  background: rgba(8, 7, 5, .85);
  border-left: 2px solid var(--edge);
  letter-spacing: .5px;
  animation: tfade 3.2s forwards;
}

@keyframes tfade {
  0% {
    opacity: 0;
    transform: translateX(-8px);
  }

  8% {
    opacity: 1;
    transform: none;
  }

  75% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}
