/* World-space illustrations use one logical tile. Their labels stay compact
   until a player inspects a site. */
.world-console .world-tile {
  --standard: #495244;
  --trim: #d4c393;
  --plaque: #354438;
}
.world-console .world-tile.home {
  --standard: #204c3e;
  --trim: #f0ce7e;
  --plaque: #193d32;
}
.world-console .world-tile.ally {
  --standard: #365b68;
  --trim: #dfd6b3;
  --plaque: #2b444a;
}
.world-console .world-tile.enemy {
  --standard: #823d32;
  --trim: #e9bc86;
  --plaque: #5a322d;
}
.world-console .world-tile.monster { --plaque: #4c3b36; }
.world-console .world-tile.rally-boss { --standard: #754035; --trim: #edc586; }
.world-console .world-tile.explore { --standard: #3b5762; --plaque: #33474a; }

.world-console .stronghold::before,
.world-console .world-tile:is([aria-selected=true],:focus-visible,.threatened)::after {
  content: "";
  box-sizing: border-box;
  position: absolute;
  pointer-events: none;
  left: 7%;
  right: 7%;
  height: 35%;
  bottom: 16%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #342f1e48, #342f1e12 61%, transparent 73%);
}
.world-console .stronghold.home::before {
  border: 1px solid #edd18a;
  box-shadow: 0 0 0 2px #3d503a83;
}
.world-console .world-tile:is([aria-selected=true],:focus-visible) {
  background: transparent;
  outline: 0;
  box-shadow: none;
  z-index: 3;
}
.world-console .world-tile:is([aria-selected=true],:focus-visible,.threatened)::after {
  left: 1%;
  right: 1%;
  height: 38%;
  bottom: 15%;
  border: 2px solid #fff3be;
  box-shadow: 0 0 0 2px #a47636, inset 0 0 0 1px #9d7538;
  background: #dfbc6a32;
}
.world-console .world-tile.plain:is([aria-selected=true],:focus-visible)::after {
  bottom: 27%;
  height: 46%;
  background: #ead69a4f;
}
.world-console .world-tile.threatened::before { display: none; }
.world-console .world-tile.threatened::after { border-color: #ffd2b3; box-shadow: 0 0 0 2px #993e31; }
.world-console .world-tile:focus-visible { outline: 2px dashed #2a483a; outline-offset: -4px; }

.world-console .world-tile > :is(.frontier-art,.location-mark,.exp-art,.event-mark) {
  position: relative;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 3px 2px #393b2980);
}
.world-console .world-tile.stronghold > .frontier-art { width: 91%; transform: translateY(-4%); }
.world-console .world-tile:is(.home,.capital,.central-keep) > .frontier-art { width: 100%; }
.world-console .world-tile.resource .location-mark { width: 69%; height: 69%; transform: translateY(-4%); }
.world-console .world-tile.camp > .frontier-art { width: 73%; }
.world-console .world-tile.monster > .frontier-art { left: auto; top: auto; width: 80%; height: 80%; }
.world-console .world-tile.rally-boss > .frontier-art { width: 90%; height: 90%; }

.world-tile .site-standard {
  position: absolute;
  z-index: 2;
  top: 8%;
  left: 9%;
  display: grid;
  place-items: start center;
  width: 19px;
  height: 24px;
  padding-top: 2px;
  box-sizing: border-box;
  background: var(--trim);
  color: #fff7d9;
  clip-path: polygon(0 0, 100% 0, 100% 76%, 50% 100%, 0 76%);
  pointer-events: none;
}
.world-tile .site-standard::before {
  content: "";
  position: absolute;
  inset: 1px 1px 2px;
  background: var(--standard);
  clip-path: inherit;
}
.world-tile .site-standard .icon { position: relative; width: 13px; height: 14px; stroke-width: 2; }
.world-tile.home .site-standard { top: 2%; width: 22px; height: 28px; padding-top: 3px; }
.world-tile.home .site-standard .icon { width: 15px; height: 15px; }
.world-tile.working .site-standard { --standard: #6c4e24; --trim: #f2d599; }

.world-console .world-tile .land-name,
.world-tile .field-badge {
  position: absolute;
  z-index: 2;
  top: 79%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transform: translateX(-50%);
  transform-origin: center top;
  pointer-events: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.world-console .world-tile .land-name {
  width: max-content;
  max-width: 87px;
  padding: 2px 6px;
  border: 1px solid var(--trim);
  border-radius: 3px;
  background: var(--plaque);
  color: #fff7e0;
  font: 700 13px/1.25 var(--sans);
  box-shadow: 0 2px 4px #26322658;
  letter-spacing: normal;
}
.world-console .world-tile.home .land-name { outline: none; border-bottom: 2px solid var(--trim); }
.world-tile .land-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.world-tile .land-name small { flex: none; color: #f5daa4; font-size: 10px; }
.world-tile .land-name b { color: #ffe1a3; font-size: 11px; }
.world-tile .field-badge {
  min-height: 15px;
  padding: 0 4px;
  gap: 3px;
  border: 1px solid #e7d7ac;
  border-radius: 5px;
  background: #354137;
  color: #fff4d6;
  font: 700 10px/1 var(--sans);
  box-shadow: 0 1px 3px #31352363;
}
.world-tile .field-badge .icon { width: 12px; height: 12px; stroke-width: 2; }
.world-tile .field-badge b { color: #ffe2a8; }
.world-tile.monster .field-badge { background: #584036; }
.world-tile.explore .field-badge { background: #36525a; }
.world-console .world-tile.field-site .land-name { display: none; }
.world-console .world-tile:is(.threatened,[aria-selected=true],:focus-visible) .field-badge { display: none; }
.world-console .world-tile:is(.threatened,[aria-selected=true],:focus-visible) .land-name {
  display: inline-flex;
  visibility: visible;
  max-width: 14rem;
  white-space: nowrap;
}
@media (hover: hover) {
  .world-console .world-tile:not(.plain):hover { z-index: 3; }
  .world-console .world-tile:hover .field-badge { display: none; }
  .world-console .world-tile:hover .land-name { display: inline-flex; visibility: visible; max-width: 14rem; }
}
.world-console[data-detail-zoom=low] .world-tile:not(.home,.working,.recruiting,.threatened,[aria-selected=true],:focus-visible) :is(.field-badge,.land-name) {
  display: none;
}
.world-console[data-detail-zoom=low] .world-tile:is(.home,.working,.recruiting,.threatened,[aria-selected=true],:focus-visible) .land-name {
  visibility: visible;
  transform: translateX(-50%) scale(clamp(1,var(--atlas-label-scale,1),1.5));
}
.world-console[data-detail-zoom=low] .world-tile:is(.working,.recruiting) .field-badge {
  transform: translateX(-50%) scale(clamp(1,var(--atlas-label-scale,1),1.3));
}

.world-console :is(.march-traces g,.company-pin).own { --company: #27573e; }
.world-console :is(.march-traces g,.company-pin).friend { --company: #345f78; }
.world-console :is(.march-traces g,.company-pin).foe { --company: #8d4134; }
.world-console .march-traces .march-halo { stroke: #f5e3b5db; stroke-width: 5.5; }
.world-console .march-traces .march-line { stroke-width: 2.8; }
.world-console .march-traces .friend .march-line { stroke-dasharray: 10 5; }
.world-console .march-traces .foe .march-line { stroke-dasharray: 2 5; }
.world-console .march-traces .direction-arrow { stroke-width: 3.3; }
.world-console .march-traces .march-destination { display: none; fill: #fff0bb; stroke: var(--company); stroke-width: 3; }
.world-console .march-traces .selected .march-destination { display: block; }
.world-console .march-traces .selected .march-halo { stroke: #ffdd86; stroke-width: 8; }
.world-console .company-pin .company-flag {
  max-width: 9rem;
  padding: 2px 6px;
  border: 1px solid #e9d8a3;
  border-radius: 2px 5px 5px 2px;
  background: var(--company);
  color: #fff9e5;
  box-shadow: 0 2px 3px #26322669;
}
.world-console .company-pin .company-flag > span { overflow: hidden; text-overflow: ellipsis; }
.world-console .company-pin.foe .company-flag { border-left: 3px double #ffc2a8; }
.world-console .company-pin.friend .company-flag { border-left: 3px solid #abd8e0; }
.world-console .company-pin.own .company-flag { border-left: 3px solid #e8c875; }
.world-console .company-pin.encamped { margin: -26px 0 0 28px; }
.world-console .company-pin.encamped .company-flag { border-radius: 8px; }
.world-console .company-pin.own.rally-waiting .company-flag {
  padding:3px 7px;border:1px solid #fff1c5;border-radius:4px;
  background:#f1d38d;color:#29342a;font-weight:750;box-shadow:0 1px 4px #243429b3;
}
.world-console .company-pin:is(.selected,:focus-visible) {
  outline: 2px solid #e8c875;
  background: #f7e8b53b;
  box-shadow: 0 0 0 1px #45513b;
}
.world-console .company-pin.selected,
.world-console[data-detail-zoom=low] .company-pin.selected { z-index: 7; }
.world-console[data-detail-zoom=low] .company-pin:not(.selected,:focus-visible) .company-flag > span { display: none; }
.world-console[data-overview=true] .company-pin:not(.selected,:focus-visible) { width: 28px; height: 28px; min-width: 0; }
.world-console[data-overview=true] .company-pin:not(.selected,:focus-visible) .march-figures { display: none; }
.world-console[data-overview=true] .march-traces g:not(.selected) .direction-arrow { display: none; }
