/* v2.35: incoming army readability and fully painted city presentation */

.defense-threat-strip {
  position: relative;
  overflow: visible;
}

.defense-threat-strip > .defense-threat-side {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 13px;
  background: rgba(255, 255, 255, .035);
}

.defense-threat-strip > .defense-threat-side.attacker {
  border-color: rgba(232, 91, 65, .38);
  background: linear-gradient(135deg, rgba(116, 35, 25, .34), rgba(34, 18, 18, .34));
}

.defense-threat-strip > .defense-threat-side.defender {
  border-color: rgba(101, 151, 190, .32);
  background: linear-gradient(135deg, rgba(33, 65, 91, .3), rgba(18, 27, 35, .34));
}

.defense-threat-strip .defense-threat-image {
  grid-row: auto;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .42);
}

.defense-threat-strip .defense-threat-image.city {
  filter: saturate(.92) contrast(1.06);
}

.defense-threat-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.defense-threat-copy .defense-side-label {
  color: rgba(255, 255, 255, .48);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
}

.defense-threat-copy b {
  overflow: hidden;
  color: #fff8eb;
  font-size: 16px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.defense-troop-count {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(137, 181, 214, .42);
  border-radius: 8px;
  color: #d9efff;
  background: rgba(40, 79, 108, .38);
  font-size: 15px;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.defense-troop-count.danger {
  border-color: rgba(244, 113, 83, .58);
  color: #ffe5da;
  background: rgba(141, 42, 31, .54);
  box-shadow: 0 0 14px rgba(223, 72, 45, .18);
}

/* Every city image now uses the same painted/realistic visual language. */
.city-node-icon[src*="/painted/"],
.city-card-icon-wrap img[src*="/painted/"],
.city-detail-icon[src*="/painted/"],
.defense-city-emblem img[src*="/painted/"],
.defense-threat-image[src*="/painted/"] {
  object-fit: cover;
  object-position: center;
  filter: saturate(.9) contrast(1.06) brightness(.96);
}

.city-card-icon-wrap img[src*="/painted/"] {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(239, 207, 151, .38), 0 4px 10px rgba(0, 0, 0, .36);
}

.city-detail-icon[src*="/painted/"] {
  width: 92px;
  height: 68px;
  border: 1px solid rgba(231, 199, 139, .46);
  border-radius: 13px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .38);
}

/* Keep troop totals readable throughout the battle even during hit callouts. */
.battle-screen .fighter .troop-number {
  position: relative;
  z-index: 12;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  min-width: 112px;
  margin: 6px auto 0;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 9px;
  color: rgba(255, 255, 255, .76);
  background: rgba(8, 12, 16, .78);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .32);
  font-variant-numeric: tabular-nums;
}

.battle-screen .fighter .troop-number::before {
  content: '병력';
  margin-right: 2px;
  color: rgba(255, 255, 255, .48);
  font-size: 9px;
  font-weight: 900;
}

.battle-screen .fighter .troop-number > span {
  color: #fff1c9;
  font-size: 17px;
  font-weight: 1000;
}

@media (max-width: 760px) {
  .defense-threat-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .defense-threat-strip > i {
    display: none;
  }

  .defense-threat-strip > .defense-threat-side {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 8px;
  }

  .defense-threat-strip .defense-threat-image {
    width: 58px;
    height: 58px;
  }

  .defense-troop-count {
    font-size: 14px;
  }

  .city-detail-icon[src*="/painted/"] {
    width: 76px;
    height: 58px;
  }

  .battle-screen .fighter .troop-number {
    min-width: 96px;
    padding: 4px 7px;
  }

  .battle-screen .fighter .troop-number > span {
    font-size: 15px;
  }
}
