/* Clan card display only. Keep uploaded images intact; never crop the art. */
.clan-window .clan-hero {
  height: auto;
  display: flex;
  flex-direction: column;
}
.clan-window .clan-hero > img {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: auto;
  max-height: min(52vh, 480px);
  object-fit: contain;
  object-position: center;
  background: #081623;
}
.clan-window .clan-hero > .clan-picture-placeholder {
  position: relative;
  inset: auto;
  width: 100%;
  height: 140px;
  flex: none;
}
/* Text is below the picture instead of obscuring its lower edge. */
.clan-window .clan-hero-overlay {
  position: relative;
  inset: auto;
  justify-content: flex-start;
  background: linear-gradient(135deg, #102b36, #081724 76%);
}
.clan-window .clan-hero-name > div { min-width: 0; }
.clan-window .clan-hero-name h3 { overflow-wrap: anywhere; }
/* Fit the validated 2–5 character tag within all three badge sizes. */
.clan-window .clan-mark { container-type: inline-size; }
.clan-window .clan-mark > span {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.025em;
  font-size: 5px; /* fallback for browsers without container units */
  font-size: clamp(4px, 20cqw, 15px);
}
