.radar-hud {
  position: fixed;
  top: 86px;
  right: 16px;
  z-index: 45;
  width: 322px;
  max-width: calc(100vw - 24px);
}

.radar-shell {
  padding: 16px;
  border: 0.5px solid rgba(102, 217, 255, 0.16);
  border-radius: 14px;
  background: rgba(6, 10, 16, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45), inset 0 0 40px rgba(102, 217, 255, 0.04);
}

.radar-hud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.radar-hud-title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.radar-gloss-title {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted color-mix(in srgb, var(--accent) 50%, transparent);
  cursor: help;
}
.radar-gloss-title:hover { color: var(--accent2); }

.radar-title-q {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  color: var(--muted2);
  opacity: 0.85;
  cursor: help;
}
.radar-gloss-title:hover ~ .radar-title-q,
.radar-hud-title:hover .radar-title-q { color: var(--accent2); }

.radar-dummy-badge {
  flex-shrink: 0;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent2);
  padding: 2px 7px;
  border: 0.5px solid var(--accent2);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent2) 10%, transparent);
  white-space: nowrap;
}

.radar-close,
.radar-mute {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--muted2);
  background: rgba(255, 255, 255, 0.03);
  border: 0.5px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.radar-close {
  display: none;
  width: 26px;
  height: 26px;
}

.radar-close:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.radar-close svg {
  width: 13px;
  height: 13px;
}

.radar-mute {
  width: 30px;
  height: 30px;
}

.radar-mute:hover {
  color: var(--accent2);
  border-color: rgba(102, 217, 255, 0.4);
}

.radar-mute:not(.on) {
  opacity: 0.7;
}

.radar-mute:not(.on):hover {
  opacity: 1;
}

.radar-mute.on {
  color: #39ff14;
  border-color: rgba(57, 255, 20, 0.45);
  background: rgba(57, 255, 20, 0.08);
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.18);
}

.radar-mute svg {
  width: 15px;
  height: 15px;
}

.radar-stage {
  display: flex;
  justify-content: center;
}

.radar-screen {
  position: relative;
  width: 250px;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(8, 22, 12, 0.98), rgba(2, 8, 4, 0.98) 72%);
  border: 1px solid rgba(201, 168, 106, 0.5);
  box-shadow: 0 0 0 3px rgba(10, 10, 15, 0.9), 0 0 0 4px rgba(201, 168, 106, 0.22), inset 0 0 42px rgba(57, 255, 20, 0.14), 0 0 26px rgba(57, 255, 20, 0.14);
}

.radar-dial {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.radar-dial .ring {
  stroke: rgba(57, 255, 20, 0.14);
  stroke-width: 0.35;
  fill: none;
}

.radar-dial .ring-major {
  stroke: rgba(57, 255, 20, 0.3);
}

.radar-dial .cross {
  stroke: rgba(57, 255, 20, 0.1);
  stroke-width: 0.3;
}

.radar-dial .tick {
  stroke: rgba(57, 255, 20, 0.45);
  stroke-width: 0.45;
}

.radar-dial .tick-major {
  stroke: rgba(57, 255, 20, 0.7);
  stroke-width: 0.65;
}

.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(57, 255, 20, 0) 0deg, rgba(57, 255, 20, 0) 250deg, rgba(57, 255, 20, 0.05) 310deg, rgba(57, 255, 20, 0.2) 346deg, rgba(57, 255, 20, 0.55) 358deg, rgba(150, 255, 130, 0.9) 360deg);
  will-change: transform;
}

.radar-blips {
  position: absolute;
  inset: 0;
}

.radar-blip {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: rgba(57, 255, 20, 0.95);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.9), 0 0 18px rgba(57, 255, 20, 0.55);
  animation: radar-blip-pulse 1.6s ease-in-out infinite;
}

.radar-blip.locked {
  background: #fff;
  box-shadow: 0 0 6px #fff, 0 0 16px rgba(57, 255, 20, 0.95), 0 0 26px rgba(57, 255, 20, 0.7);
  animation: radar-blip-lock 1.1s ease-in-out infinite;
}

@keyframes radar-blip-pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes radar-blip-lock {
  0%,
  100% {
    transform: scale(0.95);
  }
  50% {
    transform: scale(1.5);
  }
}

.radar-panel {
  margin-top: 14px;
  max-height: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.22s ease;
}

.radar-panel.open {
  max-height: 680px;
  opacity: 1;
  transform: translateY(0);
}

.radar-an {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent2);
}

.radar-dots {
  display: inline-flex;
  gap: 4px;
}

.radar-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent2);
  animation: radar-dot 1.1s infinite;
}

.radar-dots span:nth-child(2) {
  animation-delay: 0.18s;
}

.radar-dots span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes radar-dot {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.radar-card {
  padding: 16px 16px 4px;
  border: 0.5px solid rgba(102, 217, 255, 0.2);
  border-radius: 12px;
  background: rgba(102, 217, 255, 0.04);
}

.radar-card-head {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text);
  line-height: 1.35;
}

.radar-detect {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 12px;
  font-size: 11.5px;
  color: var(--text);
}

.radar-detect svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--accent2);
}

.radar-detect em {
  font-style: normal;
  color: var(--muted2);
}

.radar-detect b {
  font-weight: 600;
  color: var(--accent2);
}

.radar-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.radar-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  border-radius: 999px;
}

.radar-flag.green {
  color: #8fe98f;
  background: rgba(34, 197, 94, 0.08);
  border: 0.5px solid rgba(34, 197, 94, 0.3);
}

.radar-flag.red {
  color: #ff9d9d;
  background: rgba(239, 68, 68, 0.08);
  border: 0.5px solid rgba(239, 68, 68, 0.3);
}

.radar-flag-mark {
  font-size: 10px;
  line-height: 1;
}

.radar-verdict {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.radar-stamp {
  display: inline-block;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  border-radius: 999px;
  border: 0.5px solid;
}

.radar-stamp.match {
  color: #39ff14;
  border-color: rgba(57, 255, 20, 0.55);
  background: rgba(57, 255, 20, 0.08);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.22);
}

.radar-stamp.pass {
  color: var(--muted2);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.02);
  filter: saturate(0.4);
}

.radar-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  border-top: 0.5px solid var(--border);
  padding: 9px 0 10px;
}

.radar-foot svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.radar-gem-link {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.radar-gem-link:hover {
  color: var(--accent2);
}

.radar-mini {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border-radius: 50%;
  background: rgb(6, 10, 16);
  border: 1px solid rgba(102, 217, 255, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(10, 10, 15, 0.9), 0 0 14px rgba(102, 217, 255, 0.25);
  cursor: pointer;
}

.radar-mini-screen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(8, 22, 12, 0.98), rgba(2, 8, 4, 0.98) 72%);
}

.radar-mini-sweep {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, rgba(57, 255, 20, 0) 0deg, rgba(57, 255, 20, 0) 250deg, rgba(57, 255, 20, 0.05) 310deg, rgba(57, 255, 20, 0.2) 346deg, rgba(57, 255, 20, 0.55) 358deg, rgba(150, 255, 130, 0.9) 360deg);
  will-change: transform;
}

.radar-mini-blips {
  position: absolute;
  inset: 0;
}

.radar-mini-blip {
  position: absolute;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: rgba(57, 255, 20, 0.95);
  box-shadow: 0 0 6px rgba(57, 255, 20, 0.9);
  transition: opacity 0.16s linear;
}

.radar-mini-blip.locked {
  background: #fff;
  box-shadow: 0 0 5px #fff, 0 0 10px rgba(57, 255, 20, 0.8);
}

.radar-manual {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.radar-manual-note {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.03em;
}

@media (prefers-reduced-motion: reduce) {
  .radar-shell {
    display: block !important;
  }
  .radar-mini {
    display: none !important;
  }
  .radar-screen {
    display: none;
  }
  .radar-manual {
    display: flex;
  }
  .radar-sweep,
  .radar-mini-sweep {
    display: none;
  }
  .radar-dots span {
    animation: none;
    opacity: 0.6;
  }
}

@media (max-width: 900px) {
  .radar-shell {
    display: none;
  }
  .radar-hud {
    top: 62px;
    right: 12px;
    width: 42px;
  }
  .radar-hud.expanded {
    width: 286px;
    max-width: calc(100vw - 24px);
  }
  .radar-hud.expanded .radar-shell {
    display: block;
  }
  .radar-hud.expanded .radar-mini {
    display: none;
  }
  .radar-mini {
    display: block;
  }
  .radar-close {
    display: inline-flex;
  }
}

@media (max-width: 560px) {
  .radar-shell {
    padding: 12px;
  }
  .radar-hud-head {
    margin-bottom: 9px;
  }
  .radar-hud.expanded {
    width: calc(100vw - 24px);
    max-width: 286px;
  }
  .radar-screen {
    width: 186px;
  }
  .radar-card-head {
    font-size: 13px;
  }
}