/* v2.78 battle UI polish: stable deputy selection, commander profiles, full card text. */

/* The old combo preview sat near the top of the modal. The selected deputy now owns this feedback. */
.battle-prep-modal > .combo-preview {
  display: none !important;
}

.deputy-choice-wrap-v278 {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.deputy-choice-wrap-v278 > .deputy-choice {
  width: 100%;
  margin: 0;
}

.deputy-synergy-v278 {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(221, 177, 89, .62);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(67, 49, 26, .92), rgba(30, 25, 20, .96));
  box-shadow: inset 3px 0 rgba(230, 188, 98, .72);
  text-align: left;
}

.deputy-synergy-v278 small {
  color: #d6b36d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
}

.deputy-synergy-v278 b {
  color: #f3dfad;
  font-size: 12px;
}

.deputy-synergy-v278 span {
  color: rgba(255, 255, 255, .7);
  font-size: 10px;
  line-height: 1.4;
}

/* Commander identity is shown below the revealed card, not as a round medallion on the card art. */
.card-owner-medallion {
  display: none !important;
}

.battle-commander-v278 {
  width: min(218px, 100%);
  min-height: 60px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin: 7px auto 6px;
  padding: 8px 10px;
  border: 1px solid rgba(213, 171, 91, .5);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(45, 37, 27, .94), rgba(18, 18, 19, .96));
  box-shadow: 0 5px 14px rgba(0, 0, 0, .24);
  text-align: left;
}

.battle-commander-v278 > img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  object-position: 50% 16%;
  border: 1px solid rgba(228, 191, 108, .68);
  border-radius: 8px;
  background: #15120f;
}

.battle-commander-v278 > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.battle-commander-v278 small {
  color: #e7c982;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
}

.battle-commander-v278 b {
  overflow: hidden;
  color: #f5ead0;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-commander-v278 em {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, .66);
  font-size: 9px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Show the complete revealed-card effect. Older mobile rules clamped this to two lines. */
.battle-screen-v271 .battle-card-reveal > .revealed-card {
  height: auto;
  min-height: 204px;
  grid-template-rows: 92px auto;
}

.battle-screen-v271 .battle-card-reveal .revealed-card-copy {
  align-content: start;
  min-height: 0;
}

.battle-screen-v271 .battle-card-reveal .revealed-card-copy p {
  display: block !important;
  overflow: visible !important;
  max-height: none !important;
  margin: 4px 0 0;
  color: rgba(255, 255, 255, .72);
  font-size: 10px;
  line-height: 1.42;
  white-space: normal;
  text-overflow: clip;
  -webkit-box-orient: initial !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
}

/* Always use normal browser interpolation for the canonical Dong Zhuo battle portrait. */
.battle-screen-v271 img[src*="general_dong_zhuo.webp"] {
  image-rendering: auto !important;
  object-fit: cover !important;
  object-position: 50% 16% !important;
  filter: none !important;
}

@media (max-width: 760px) {
  .battle-commander-v278 {
    width: min(210px, 100%);
    min-height: 58px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    padding: 7px 8px;
  }

  .battle-commander-v278 > img {
    width: 36px;
    height: 36px;
  }

  .battle-commander-v278 em {
    font-size: 8px;
    white-space: normal;
  }

  .battle-screen-v271 .battle-card-reveal > .revealed-card {
    min-height: 202px;
  }

  .battle-screen-v271 .battle-card-reveal .revealed-card-copy p {
    font-size: 9px;
    line-height: 1.38;
  }
}

@media (max-width: 520px) {
  .deputy-choice-wrap-v278 {
    width: 100%;
  }

  .deputy-synergy-v278 {
    padding: 9px;
  }
}
