.country-strip {
  display: grid;
  grid-template-columns: auto minmax(34px, auto) 52px;
  align-items: center;
  gap: 5px;
  min-width: 112px;
  min-height: 38px;
  padding: 5px 7px;
  border: 1px solid rgba(196, 146, 61, .55);
  border-radius: 8px;
  background: rgba(19, 26, 22, .9);
  box-shadow: inset 0 0 0 1px rgba(255, 222, 128, .08);
}

.country-label {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(216, 166, 75, .18);
  color: #f4d990;
  font-size: 10px;
  font-weight: 900;
}

.country-own {
  min-width: 0;
  overflow: hidden;
  color: #f6efd7;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-own.red { color: #ff9087; }
.country-own.blue { color: #83e99a; }

.realm-node .realm-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  max-width: 104px;
  box-sizing: border-box;
}

.realm-node .realm-title b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
}

.world-map .world-lines {
  z-index: 12;
  pointer-events: none;
}

.world-map .march-line {
  pointer-events: auto;
}

.world-map .troop-flow,
.world-map .absorb-mark,
.world-map .world-combat-layer,
.world-map .move-marker,
.world-map .drag-line,
.world-map .mini-map {
  pointer-events: none;
}

.world-map .world-fog {
  z-index: 25;
  pointer-events: none;
}

.world-map .drag-line {
  z-index: 56;
}

.world-map {
  isolation: isolate;
  touch-action: none;
}

.world-map .world-art {
  z-index: 1;
}

.world-map .world-territories,
.world-map .world-fog {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.world-map .world-lines {
  z-index: 3;
  pointer-events: none;
}

.world-map #worldNodes {
  z-index: 4;
}

.world-map .troop-flow {
  z-index: 5;
}

.world-map .world-combat-layer {
  z-index: 6;
}

.world-map .drag-line {
  z-index: 7;
}

.world-map .realm-action-button,
.world-map .mini-map {
  z-index: 8;
}

.world-map #worldNodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.realm-node {
  z-index: 20;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

.realm-node.own {
  z-index: 32;
  cursor: grab;
}

.realm-hit-area {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  display: block;
  width: 148px;
  height: 152px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
}

.realm-node .realm-art,
.realm-node .temple-art,
.realm-node strong,
.realm-node span,
.realm-node small {
  z-index: 1;
  pointer-events: none;
}

.realm-action-button {
  position: absolute;
  left: 50%;
  top: 38px;
  z-index: 70;
  min-width: 86px;
  height: 58px;
  transform: translateX(-50%);
  border: 2px solid rgba(69, 43, 17, .78);
  border-radius: 999px;
  background: #f4d06a;
  color: #2b1a0c;
  box-shadow: 0 3px 0 rgba(42, 24, 8, .55), 0 0 10px rgba(255, 220, 103, .45);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  pointer-events: auto;
  touch-action: manipulation;
}

.realm-node.selected {
  z-index: 50;
}

.realm-action-button:disabled {
  filter: grayscale(.55);
  opacity: .62;
}

.country-mark {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(255, 246, 216, .54);
  border-radius: 3px 3px 3px 1px;
  color: #fff6d6;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .65);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

.country-mark::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 1px;
  width: 2px;
  height: 14px;
  border-radius: 2px;
  background: #f6df9b;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .55);
}

.country-mark.red {
  background: #c94d43;
}

.country-mark.blue {
  background: #32776d;
}

.country-choice.compact {
  display: grid;
  grid-template-columns: repeat(2, 20px);
  gap: 4px;
}

.country-choice.compact button {
  display: grid;
  place-items: center;
  width: 20px;
  min-height: 20px;
  height: 20px;
  padding: 0;
  border-radius: 6px;
  color: #fff6d6;
  font-size: 10px;
  line-height: 1;
  box-shadow: none;
}

.country-choice.compact button.red {
  background: #8e2f2b;
}

.country-choice.compact button.blue {
  background: #247a45;
}

.country-bars {
  position: relative;
  display: flex;
  gap: 2px;
  width: 52px;
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(246, 239, 215, .2);
  border-radius: 999px;
  background: rgba(0, 0, 0, .36);
}

.country-bars i {
  display: block;
  min-width: 2px;
  height: 100%;
}

.country-bars .red {
  background: #c84a42;
}

.country-bars .green {
  background: #47b967;
}

.world-territories {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.territory-zone {
  position: absolute;
  width: 118px;
  height: 118px;
  margin-left: -59px;
  margin-top: -59px;
  border: 2px solid rgba(172, 172, 172, .55);
  border-radius: 50%;
  background: rgba(150, 150, 150, .13);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, .08);
}

.territory-zone.red {
  border-color: rgba(224, 71, 71, .75);
  background: rgba(224, 71, 71, .22);
}

.territory-zone.blue {
  border-color: rgba(63, 124, 255, .75);
  background: rgba(63, 124, 255, .22);
}

.realm-node.temple-ruin {
  z-index: 20;
  width: 90px;
  height: 104px;
  margin-left: -45px;
  margin-top: -45px;
}

.realm-node.temple-ruin.selected {
  z-index: 50;
}

.temple-art {
  display: grid;
  place-items: center;
  position: absolute;
  left: 50%;
  top: 18px;
  width: 54px;
  height: 54px;
  transform: translateX(-50%);
  border: 3px solid #3a3329;
  border-radius: 8px 8px 16px 16px;
  background: #6f6a61;
  color: #f4ead1;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .32), inset 0 0 0 2px rgba(255, 255, 255, .12);
}

.realm-node.temple-ruin span {
  top: 0;
  min-width: 70px;
  max-width: 84px;
  padding: 2px 6px;
  color: #ffe28a;
  font-size: 10px;
}

.realm-node.temple-ruin strong {
  bottom: auto;
  top: 71px;
  max-width: 96px;
  padding: 2px 6px;
  color: #fff1b8;
  font-size: 11px;
}

.realm-node.temple-ruin small {
  top: 91px;
  max-width: 92px;
  padding: 1px 5px;
  color: #d7cfb2;
  font-size: 9px;
}

.realm-node.temple-ruin.country-red .temple-art {
  border-color: #9d2929;
  background: #a73a3a;
}

.realm-node.temple-ruin.country-blue .temple-art {
  border-color: #244fba;
  background: #3f67cf;
}

.mini-map {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 8;
  width: 138px;
  height: 96px;
  border: 2px solid rgba(246, 239, 215, .55);
  border-radius: 8px;
  background: rgba(7, 12, 14, .82);
  overflow: hidden;
  pointer-events: none;
}

.mini-map::before {
  content: attr(data-counts);
  position: absolute;
  left: 6px;
  top: 5px;
  z-index: 2;
  color: #f6efd7;
  font-size: 10px;
  font-weight: 900;
  text-shadow: 0 1px 2px #000;
}

.mini-dot,
.mini-zone,
.mini-viewport {
  position: absolute;
}

.mini-dot,
.mini-zone {
  transform: translate(-50%, -50%);
}

.mini-zone {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(150, 150, 150, .2);
}

.mini-zone.red { background: rgba(224, 71, 71, .34); }
.mini-zone.blue { background: rgba(63, 124, 255, .34); }

.mini-dot {
  z-index: 3;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e74a4a;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .65);
}

.mini-dot.own {
  width: 8px;
  height: 8px;
  background: #54e678;
}

.mini-dot.temple {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #aaa;
}

.mini-dot.red { background: #e04747; }
.mini-dot.blue { background: #3f7cff; }

.mini-viewport {
  z-index: 4;
  display: block;
  border: 1px solid rgba(255, 239, 161, .95);
  border-radius: 3px;
  background: rgba(255, 239, 161, .08);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .62), 0 0 8px rgba(255, 225, 119, .45);
}
