:root {
  --bounty-gold: #e6ab38;
  --bounty-red: #e95454;
  --bounty-green: #42dc82;
  --bounty-ink: #0b1118;
}

.bounty-map-panel {
  overflow: hidden;
  border: 1px solid rgba(230,171,56,.3);
  border-radius: 12px;
  background: #080d12;
  box-shadow: 0 25px 70px rgba(0,0,0,.42);
}

.bounty-map-app {
  position: relative;
  display: grid;
  grid-template-columns: 342px minmax(0,1fr);
  height: clamp(610px, calc(100dvh - 158px), 860px);
  min-height: 610px;
  overflow: hidden;
}

.bounty-map-app.is-full-window {
  position: fixed;
  z-index: 10050;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  border-radius: 0;
}

body.is-bounty-map-full-window { overflow: hidden; }

.bounty-map-sidebar {
  z-index: 30;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,.12);
  background:
    linear-gradient(180deg, rgba(75,36,21,.2), transparent 160px),
    linear-gradient(180deg, #16202a, #0d151d);
  box-shadow: 12px 0 36px rgba(0,0,0,.3);
}

.bounty-map-sidebar-head {
  padding: 17px 17px 14px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.bounty-map-kicker {
  color: var(--bounty-gold);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .15em;
}

.bounty-map-sidebar-head h2 {
  margin: 4px 0 3px;
  color: #fff;
  font-size: 23px;
  line-height: 1.08;
}

.bounty-map-sidebar-head p {
  margin: 0;
  color: rgba(232,239,246,.62);
  font-size: 11px;
  line-height: 1.4;
}

.bounty-map-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 12px 8px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  background: rgba(0,0,0,.2);
}

.bounty-map-search span { color: rgba(255,255,255,.45); font-size: 17px; }
.bounty-map-search input { min-width: 0; flex: 1; border: 0; outline: 0; padding: 10px 0; color: #fff; background: transparent; font: inherit; font-size: 12px; }
.bounty-map-search input::placeholder { color: rgba(255,255,255,.38); }

.bounty-map-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 12px 10px;
  scrollbar-width: thin;
}

.bounty-map-filters button {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 6px 9px;
  color: rgba(255,255,255,.66);
  background: rgba(255,255,255,.035);
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.bounty-map-filters button.is-active { border-color: rgba(230,171,56,.52); color: #fff; background: rgba(230,171,56,.13); }

.bounty-map-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 0 9px 12px;
  scrollbar-color: rgba(255,255,255,.18) transparent;
  scrollbar-width: thin;
}

.bounty-map-list-state { padding: 30px 14px; color: rgba(232,239,246,.58); text-align: center; font-size: 12px; line-height: 1.5; }

.bounty-map-card {
  display: grid;
  width: 100%;
  grid-template-columns: 32px minmax(0,1fr) auto;
  gap: 9px;
  align-items: center;
  margin-bottom: 6px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 9px;
  padding: 10px 9px;
  color: inherit;
  text-align: left;
  background: linear-gradient(90deg, rgba(255,255,255,.055), rgba(255,255,255,.022));
  cursor: pointer;
}

.bounty-map-card:hover,
.bounty-map-card.is-active { border-color: rgba(230,171,56,.42); background: rgba(230,171,56,.08); }
.bounty-map-card.is-offline { opacity: .72; }
.bounty-map-card.is-unlocated { opacity: .58; }

.bounty-map-card-icon {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #181007;
  background: var(--bounty-gold);
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
  font-size: 14px;
}

.bounty-map-card-icon::after {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 8px;
  height: 8px;
  border: 2px solid #111923;
  border-radius: 50%;
  background: var(--bounty-red);
  content: "";
}

.bounty-map-card.is-online .bounty-map-card-icon::after { background: var(--bounty-green); box-shadow: 0 0 7px var(--bounty-green); }
.bounty-map-card-copy { min-width: 0; }
.bounty-map-card-copy strong,
.bounty-map-card-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bounty-map-card-copy strong { color: #fff; font-size: 12px; }
.bounty-map-card-copy small { margin-top: 3px; color: rgba(232,239,246,.58); font-size: 9px; }
.bounty-map-card-reward { color: #ffd36a; font-size: 10px; font-weight: 950; white-space: nowrap; }

.bounty-map-sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-top: 1px solid rgba(255,255,255,.1);
  color: rgba(232,239,246,.58);
  font-size: 9px;
}

.bounty-map-sidebar-foot button { border: 0; color: rgba(255,255,255,.78); background: transparent; font: inherit; font-weight: 900; cursor: pointer; }

.bounty-map-viewport {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #a9c8e3;
  cursor: grab;
  touch-action: none;
  user-select: none;
  overscroll-behavior: contain;
}

.bounty-map-viewport.is-dragging { cursor: grabbing; }
.bounty-map-overview,
.bounty-map-tiles,
.bounty-map-markers,
.bounty-map-viewer-markers { position: absolute; top: 0; left: 0; pointer-events: none; }
.bounty-map-overview { max-width: none; user-select: none; }
.bounty-map-tiles,
.bounty-map-markers,
.bounty-map-viewer-markers { inset: 0; }
.bounty-map-tile { position: absolute; max-width: none; pointer-events: none; user-select: none; }

.bounty-map-marker {
  position: absolute;
  z-index: 4;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 8px;
  color: #1b1005;
  background: var(--bounty-gold);
  box-shadow: 0 3px 10px rgba(0,0,0,.65), 0 0 16px rgba(230,171,56,.5);
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%,-100%) rotate(-45deg);
  transform-origin: 50% 100%;
}

.bounty-map-marker span { font-size: 11px; line-height: 1; transform: rotate(45deg); }
.bounty-map-marker::after { position: absolute; right: -5px; bottom: -5px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: var(--bounty-red); content: ""; }
.bounty-map-marker.is-online::after { background: var(--bounty-green); box-shadow: 0 0 9px var(--bounty-green); }
.bounty-map-marker.is-offline { filter: saturate(.7); opacity: .82; }
.bounty-map-marker:hover,
.bounty-map-marker.is-active { z-index: 8; opacity: 1; filter: none; box-shadow: 0 4px 14px rgba(0,0,0,.72), 0 0 0 4px rgba(230,171,56,.3); }

.bounty-map-viewer-markers { z-index: 10; }
.bounty-map-viewer-marker { position: absolute; z-index: 10; display: grid; width: 22px; height: 22px; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #2388ee; box-shadow: 0 3px 10px rgba(0,0,0,.72), 0 0 0 3px rgba(35,136,238,.28), 0 0 14px rgba(35,136,238,.65); transform: translate(-50%,-50%); transform-origin: center; }
.bounty-map-viewer-marker::before { position: absolute; inset: -6px; border: 1px solid rgba(123,196,255,.72); border-radius: 50%; content: ""; }
.bounty-map-viewer-marker > span { font-size: 13px; line-height: 1; transform: translateY(-1px); }

.bounty-map-topbar {
  position: absolute;
  z-index: 15;
  top: 12px;
  right: 58px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  pointer-events: none;
}

.bounty-map-coordinate,
.bounty-map-load,
.bounty-map-mobile-toggle {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  color: #f3f6f8;
  background: rgba(10,16,21,.87);
  box-shadow: 0 5px 18px rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
}

.bounty-map-coordinate { padding: 7px 10px; font: 850 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.bounty-map-load { display: flex; align-items: center; gap: 6px; padding: 7px 10px; color: rgba(255,255,255,.72); font-size: 9px; }
.bounty-map-load i { width: 7px; height: 7px; border-radius: 50%; background: var(--bounty-green); box-shadow: 0 0 8px rgba(66,220,130,.7); }
.bounty-map-load.is-loading i { background: var(--bounty-gold); animation: bounty-map-pulse .9s ease-in-out infinite alternate; }
@keyframes bounty-map-pulse { to { opacity: .3; } }

.bounty-map-mobile-toggle { display: none; padding: 7px 10px; pointer-events: auto; font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }

.bounty-map-controls {
  position: absolute;
  z-index: 15;
  top: 12px;
  right: 12px;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 9px;
  box-shadow: 0 5px 18px rgba(0,0,0,.28);
}

.bounty-map-controls button { display: grid; width: 37px; height: 37px; place-items: center; border: 0; border-bottom: 1px solid rgba(255,255,255,.12); color: #fff; background: rgba(10,16,21,.88); font: 750 19px ui-sans-serif,sans-serif; cursor: pointer; }
.bounty-map-controls button:last-child { border-bottom: 0; }
.bounty-map-controls button:hover { background: rgba(37,48,58,.96); }

.bounty-map-scale { position: absolute; z-index: 12; right: 14px; bottom: 13px; min-width: 58px; border-bottom: 2px solid rgba(0,0,0,.72); color: rgba(0,0,0,.74); font-size: 9px; font-weight: 900; text-align: center; text-shadow: 0 1px rgba(255,255,255,.45); pointer-events: none; }

.bounty-map-selection {
  position: absolute;
  z-index: 20;
  right: 62px;
  bottom: 22px;
  width: min(390px, calc(100% - 86px));
  border: 1px solid rgba(230,171,56,.38);
  border-radius: 12px;
  padding: 15px;
  color: #eef4f8;
  background: rgba(12,18,24,.96);
  box-shadow: 0 20px 55px rgba(0,0,0,.55);
  backdrop-filter: blur(12px);
}

.bounty-map-selection[hidden] { display: none; }
.bounty-map-selection-close { position: absolute; top: 8px; right: 9px; border: 0; color: rgba(255,255,255,.66); background: transparent; font-size: 20px; cursor: pointer; }
.bounty-map-selection-type { color: var(--bounty-gold); font-size: 9px; font-weight: 950; letter-spacing: .12em; }
.bounty-map-selection h3 { margin: 5px 28px 4px 0; color: #fff; font-size: 22px; }
.bounty-map-selection-status { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 10px; border-radius: 999px; padding: 4px 7px; color: #ff8e8e; background: rgba(233,84,84,.1); font-size: 9px; font-weight: 950; text-transform: uppercase; }
.bounty-map-selection-status.is-online { color: #66ed9e; background: rgba(66,220,130,.11); }
.bounty-map-selection-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 8px 0; }
.bounty-map-selection-grid span { display: block; color: rgba(255,255,255,.48); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.bounty-map-selection-grid strong { display: block; margin-top: 3px; color: #fff; font-size: 12px; }
.bounty-map-selection-meta { margin: 8px 0 11px; color: rgba(232,239,246,.62); font-size: 10px; line-height: 1.45; }
.bounty-map-selection-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.bounty-map-selection-actions a,
.bounty-map-selection-actions button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.14); border-radius: 7px; padding: 0 10px; color: #fff; background: rgba(255,255,255,.055); font: inherit; font-size: 9px; font-weight: 900; text-decoration: none; cursor: pointer; }
.bounty-map-selection-actions .is-primary { border-color: rgba(230,171,56,.48); color: #1b1206; background: var(--bounty-gold); }

@media (max-width: 800px) {
  .bounty-map-app { display: block; height: min(720px, calc(100dvh - 112px)); min-height: 570px; }
  .bounty-map-viewport { position: absolute; inset: 0; }
  .bounty-map-sidebar { position: absolute; z-index: 35; right: 8px; bottom: 8px; left: 8px; max-height: 48%; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; box-shadow: 0 18px 55px rgba(0,0,0,.55); transform: translateY(calc(100% + 14px)); transition: transform .2s ease; }
  .bounty-map-app.is-mobile-list-open .bounty-map-sidebar { transform: translateY(0); }
  .bounty-map-sidebar-head { padding: 11px 13px 9px; }
  .bounty-map-sidebar-head h2 { font-size: 17px; }
  .bounty-map-sidebar-head p { display: none; }
  .bounty-map-search { margin-top: 8px; }
  .bounty-map-mobile-toggle { display: inline-flex; }
  .bounty-map-load { display: none; }
  .bounty-map-selection { right: 10px; bottom: 12px; left: 10px; width: auto; padding: 13px; }
  .bounty-map-app.is-mobile-list-open .bounty-map-selection { display: none; }
  .bounty-map-selection h3 { font-size: 19px; }
  .bounty-map-selection-grid { gap: 5px; }
}

@media (max-width: 480px) {
  .bounty-map-panel { border-radius: 9px; }
  .bounty-map-app { height: 620px; min-height: 620px; }
  .bounty-map-topbar { top: 9px; right: 52px; left: 9px; }
  .bounty-map-controls { top: 9px; right: 9px; }
  .bounty-map-controls button { width: 35px; height: 35px; }
  .bounty-map-coordinate { padding: 7px 8px; font-size: 10px; }
  .bounty-map-selection-grid { grid-template-columns: 1fr 1fr; }
  .bounty-map-selection-grid > div:last-child { grid-column: 1 / -1; }
}
