/* Compact map survivor card. Scoped: does not affect the Players directory. */
.tree-player-map-popup .leaflet-popup-content-wrapper{border-radius:12px!important;border:1px solid #755531!important;background:#0d1518!important;box-shadow:0 8px 25px #0009!important;overflow:hidden!important;padding:0!important}
.tree-player-map-popup .leaflet-popup-content{width:min(306px,calc(100vw - 44px))!important;margin:0!important}
.tree-player-map-popup .leaflet-popup-close-button{top:5px!important;right:6px!important;z-index:10!important;font-size:23px!important;color:#f0e8db!important;text-shadow:none!important}
.tree-player-map-popup .tree-map-player-card{padding:10px!important;background:#0c1518!important;color:#f3eee7!important;border:0!important}
.tree-player-map-popup .tree-map-player-card.has-profile-bg{background-image:linear-gradient(100deg,rgba(8,16,19,.91),rgba(8,16,19,.82)),var(--map-profile-bg)!important;background-size:cover!important}
.tree-player-map-popup .tree-map-player-card:after{display:none!important}
.tree-player-map-popup .tree-map-player-card *{text-shadow:none!important;filter:none!important;-webkit-font-smoothing:antialiased}
.tree-player-map-popup .tree-map-player-top{grid-template-columns:59px minmax(0,1fr)!important;gap:9px!important;align-items:center!important;overflow:visible!important;padding-right:17px!important}
.tree-player-map-popup .tree-map-player-top>.tree-profile-avatar-shell{width:58px!important;height:58px!important;flex-basis:58px!important;min-width:58px!important;overflow:hidden!important}
.tree-player-map-popup .tree-map-player-top .tree-profile-avatar-image{width:44px!important;height:44px!important}
.tree-player-map-popup .tree-map-player-name{min-width:0!important}
.tree-player-map-popup .tree-map-player-name>span{padding:2px 6px!important;font-size:9px!important;letter-spacing:.02em!important;color:#a6f5c1!important;background:#173a2c!important}
.tree-player-map-popup .tree-map-player-name strong{margin-top:2px!important;font-family:Arial,Helvetica,sans-serif!important;font-size:15px!important;font-weight:800!important;line-height:1.25!important;color:#fff!important;letter-spacing:0!important}
.tree-player-map-popup .tree-map-player-name small{font-size:10px!important;line-height:1.35!important;color:#d4dddf!important}
.tree-player-map-popup .tree-map-player-summary-row{margin-top:3px!important;gap:4px!important}
.tree-player-map-popup .tree-map-player-summary{padding:2px 5px!important;font-family:Arial,Helvetica,sans-serif!important;font-size:10px!important;font-weight:700!important;color:#e9e1d3!important;background:#182329!important}
.tree-player-map-popup .tree-map-player-stats{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;margin:8px 0!important}
.tree-player-map-popup .tree-map-player-stat{min-width:0!important;padding:6px 2px!important;border-radius:6px!important;background:#172125!important;border:1px solid #394343!important}
.tree-player-map-popup .tree-map-player-stat b{font-family:Arial,Helvetica,sans-serif!important;color:#ffd17c!important;font-size:14px!important;line-height:1.25!important;font-weight:800!important}
.tree-player-map-popup .tree-map-player-stat span{font-family:Arial,Helvetica,sans-serif!important;color:#d2dbde!important;font-size:9px!important;font-weight:700!important;letter-spacing:.01em!important}
.tree-player-map-popup .tree-map-player-pos{display:flex!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:4px 8px!important;font-family:Arial,Helvetica,sans-serif!important;font-size:10px!important;line-height:1.3!important;color:#e3e6e5!important}
.tree-player-map-popup .tree-map-player-achievements{display:flex!important;flex-wrap:nowrap!important;gap:4px!important;overflow:hidden!important;margin-top:7px!important}
.tree-player-map-popup .tree-map-player-achievement{display:flex!important;min-width:0!important;flex:1 1 0!important;gap:3px!important;padding:5px 4px!important;border-radius:6px!important;background:#211e18!important;border:1px solid #574527!important;color:#f6d79e!important}
.tree-player-map-popup .tree-map-player-achievement img{height:16px!important;width:16px!important;flex:none!important}
.tree-player-map-popup .tree-map-player-achievement b{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-family:Arial,Helvetica,sans-serif!important;font-size:9px!important;font-weight:700!important}
.tree-player-map-popup .tree-map-player-actions{gap:6px!important;margin-top:8px!important}
.tree-player-map-popup .tree-map-player-actions button,.tree-player-map-popup .tree-admin-online-actions button{min-width:0!important;min-height:33px!important;padding:7px 5px!important;border-radius:7px!important;font-family:Arial,Helvetica,sans-serif!important;font-size:11px!important;font-weight:800!important;letter-spacing:0!important;text-shadow:none!important}
.tree-player-map-popup .tree-map-player-actions button{background:#242b2b!important;color:#f5f2eb!important;border:1px solid #70552c!important}
.tree-player-map-popup .tree-map-player-actions .tree-map-profile-button{background:#a35d24!important;border-color:#d39449!important;color:white!important}
.tree-player-map-popup .tree-admin-online-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:7px 10px 9px!important;margin:0!important;background:#0b1214!important;border-top:1px solid #4e3824!important}
.tree-player-map-popup .tree-admin-online-action{margin:0!important;background:#202628!important;color:#f4eadd!important;border:1px solid #654d31!important}
.tree-player-map-popup .tree-admin-online-ban{border-color:#8e4440!important}
@media(max-width:420px){.tree-player-map-popup .leaflet-popup-content{width:min(296px,calc(100vw - 42px))!important}.tree-player-map-popup .tree-map-player-card{padding:9px!important}}


/* Popup appears below marker if there is insufficient space above it. */
.leaflet-popup.tree-player-map-popup.tg-popup-below .leaflet-popup-tip-container {
  display: none;
}
.leaflet-popup.tree-player-map-popup.tg-popup-below {
  margin-bottom: 0;
}

/* Keep the full player card visible at the map edges without panning. */
.leaflet-popup.tree-player-map-popup.tg-popup-edge-adjusted .leaflet-popup-tip-container {
  display: none !important;
}
.tree-player-map-popup .leaflet-popup-content {
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* Stable edge correction uses margin-top rather than Leaflet's bottom positioning. */
.tree-player-map-popup.tg-popup-edge-adjusted .leaflet-popup-tip-container {
  display:none!important;
}
.tree-player-map-popup .leaflet-popup-content { overflow-y:auto; }

/* Keep the card inside the map, not the underlying Leaflet anchor element. */
.tree-player-map-popup .leaflet-popup-content-wrapper {
  will-change: transform;
}
.tree-player-map-popup.tg-popup-edge-adjusted .leaflet-popup-tip-container {
  display: none !important;
}
.tree-player-map-popup .leaflet-popup-content {
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* Keep Leaflet's close X attached to the repositioned player card.
   The card itself is repositioned by the existing working viewport logic. */
.leaflet-popup.tree-player-map-popup > .leaflet-popup-close-button {
  transform: translate3d(0, var(--tree-player-popup-shift, 0px), 0) !important;
  z-index: 100 !important;
  display: flex !important;
  justify-content: center;
  align-items: center;
  width: 29px !important;
  height: 29px !important;
  line-height: 1 !important;
  opacity: 1 !important;
}


/* Trader teleport cards: match the dark TrEE Live Map HUD without affecting other markers. */
.tree-trader-map-popup .leaflet-popup-content-wrapper{padding:0!important;overflow:hidden;border-radius:13px!important;background:#0d171b!important;border:1px solid #655534!important;box-shadow:0 12px 36px rgba(0,0,0,.78)!important}
.tree-trader-map-popup .leaflet-popup-content{margin:0!important;width:272px!important;max-width:calc(100vw - 52px)!important;color:#f3eee3!important;font-family:Arial,Helvetica,sans-serif!important}
.tree-trader-map-popup .leaflet-popup-tip{background:#0d171b!important;box-shadow:none!important}
.tree-trader-map-popup .leaflet-popup-close-button{color:#d3d6d1!important;top:7px!important;right:8px!important;font-size:21px!important;z-index:5!important;line-height:22px!important}
.tree-trader-map-popup .tree-trader-card{font-family:Arial,Helvetica,sans-serif;font-size:12px;color:#eaece7;line-height:1.4}
.tree-trader-map-popup .tree-trader-heading{padding:13px 38px 12px 15px;background:linear-gradient(125deg,#283129,#101d22 80%);border-bottom:1px solid #4c513b}
.tree-trader-map-popup .tree-trader-kicker{font-size:9px;font-weight:800;letter-spacing:1.65px;color:#c4a76a;margin:0 0 4px}
.tree-trader-map-popup .tree-trader-title{font-size:19px;font-weight:500;color:#f2f0e9;line-height:1.3}
.tree-trader-map-popup .tree-trader-title strong{font-weight:800;color:#e9cc90}
.tree-trader-map-popup .tree-trader-body{padding:12px 15px 14px}
.tree-trader-map-popup .tree-trader-command-label{font-size:10px;letter-spacing:.75px;color:#bfc9bc;font-weight:700;margin-bottom:7px}
.tree-trader-map-popup .tree-trader-command-row{display:flex;align-items:stretch;gap:7px}
.tree-trader-map-popup .tree-trader-command{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;padding:7px 9px;border:1px solid #667751;background:#1d2c26;border-radius:7px;color:#9af2ae;font-size:18px;font-weight:800;letter-spacing:.1px;font-family:Consolas,'Courier New',monospace}
.tree-trader-map-popup .tree-trader-copy{border:1px solid #977a45;border-radius:7px;background:#4a3b22;color:#f7e8c7;font-size:11px;font-weight:800;min-width:57px;padding:0 8px;cursor:pointer;transition:background .15s}
.tree-trader-map-popup .tree-trader-copy:hover,.tree-trader-map-popup .tree-trader-copy:focus-visible{background:#65502b;color:white;outline:1px solid #d3ae66}
.tree-trader-map-popup .tree-trader-copy.is-copied{background:#20593a;border-color:#4aa469;color:#c6f6d2}
.tree-trader-map-popup .tree-trader-default{margin-top:9px;color:#d2c6a8;font-size:11px}
.tree-trader-map-popup .tree-trader-default b{color:#ead49c;font-family:Consolas,'Courier New',monospace}
.tree-trader-map-popup .tree-trader-help{font-size:10px;color:#afbbb8;margin-top:9px}
.tree-trader-map-popup .tree-trader-unavailable{border:1px dashed #626b5a;border-radius:7px;background:#1a2526;padding:10px;color:#c6caca;font-size:11px}
.tree-trader-map-popup .tree-trader-coordinates{border-top:1px solid #39433d;margin-top:12px;padding-top:10px;display:flex;justify-content:space-between;align-items:baseline;gap:5px}
.tree-trader-map-popup .tree-trader-coordinates span{font-size:9px;font-weight:800;letter-spacing:.65px;color:#98aba8}
.tree-trader-map-popup .tree-trader-coordinates b{font-size:11px;color:#f2eee3;white-space:nowrap;font-family:Consolas,'Courier New',monospace}
.tree-trader-map-popup .tree-trader-coordinates i{font-style:normal;color:#8e9a90}
