.unit-title {
  margin: 0;
  padding: 4px 6px;
  border-bottom: 1px solid rgba(215, 155, 66, 0.52);
  color: var(--gf-gold-strong);
  font-size: 16px;
  line-height: 1.2;
  text-shadow: none;
}

#cards > [class*="col-"] {
  padding: 4px 5px;
}

#cards .box {
  background: rgba(96, 65, 44, 0.94);
  border: 1px solid rgba(215, 155, 66, 0.52);
  border-radius: 8px;
  color: #f7ead5;
  margin-bottom: 2px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 3px 8px rgba(0, 0, 0, 0.28);
  transition: none;
}

#cards .box-content {
  background: transparent;
  border-radius: 0;
  color: #f7ead5;
}

.unit-grid {
  align-items: stretch;
  min-height: 132px;
  max-height: 132px;
  overflow: hidden;
}

.unit-detail-trigger {
  cursor: pointer;
}

.unit-image-col {
  position: relative;
  padding: 4px;
  border-right: 1px solid rgba(215, 155, 66, 0.34);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  max-height: 132px;
  overflow: hidden;
}

.unit-image-col > .unit-dev-id {
  position: absolute;
  left: 5px;
  bottom: 4px;
  z-index: 2;
  display: block;
  width: auto;
  padding: 1px 3px;
  border-radius: 3px;
  border: 0;
  background: rgba(35, 25, 18, .58);
  color: #f3c24a;
  font-family: inherit;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: .02em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .45);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.unit-image-col > .unit-dev-id.is-copied {
  color: #fff;
}

.unit-label {
  color: rgba(247, 234, 213, 0.74);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
}

.unit-value {
  color: #fff3dc;
  font-weight: 800;
}

.unit-row {
  padding: 7px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 1px solid rgba(215, 155, 66, 0.34);
  border-bottom: 1px solid rgba(215, 155, 66, 0.34);
}

.unit-row:nth-child(2n + 1) {
  border-left: none;
}

.unit-row:nth-last-child(-n + 2) {
  border-bottom: none;
}

.stat-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  flex: 0 0 18px;
  min-width: 18px;
  min-height: 18px;
}

.unit-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 33px;
  gap: 0;
  padding: 0;
  align-content: start;
  min-height: 132px;
  max-height: 132px;
  overflow: hidden;
}

.unit-stats-grid--tool {
  grid-auto-rows: 66px;
}

@media (max-width: 900px) {
  .unit-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .unit-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.level-selector {
  display: flex;
  position: relative;
  justify-content: space-between;
  align-items: stretch;
  min-height: 34px;
  background: #4f3625;
  border-radius: 0;
  border-bottom: 1px solid rgba(215, 155, 66, 0.34);
  color: #f3c24a;
  font-weight: bold;
  user-select: none;
  font-size: 1rem;
  box-shadow: none;
}

.level-selector button {
  display: inline-flex;
  min-width: 42px;
  min-height: 100%;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  background: #4f3625;
  color: #f3c24a;
  border: 0;
  font-weight: bold;
  padding: 4px 10px;
  cursor: pointer;
  transition: background-color .3s ease;
  user-select: none;
}

.level-selector button:first-child {
  border-radius: 0;
  border-right: 1px solid rgba(215, 155, 66, 0.34);
  border-left: none;
}

.level-selector button:last-child {
  border-radius: 0;
  border-left: 1px solid rgba(215, 155, 66, 0.34);
  border-right: none;
}

.level-selector button:disabled {
  background: #4f3625;
  color: rgba(247, 234, 213, 0.38);
  cursor: default;
  box-shadow: none;
}

.level-selector button:hover:not(:disabled) {
  background-color: rgba(215, 155, 66, 0.24);
  color: #f3c24a;
}

.level-selector button i {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 0.6px currentColor;
}

.level-selector button:not(:disabled) i {
  font-size: 20px;
  -webkit-text-stroke-width: 0.9px;
}

.level-selector .level-text {
  flex-grow: 1;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.2;
  padding: 0 6px;
  white-space: normal;
}

.no-image-text {
  font-style: italic;
  color: #e2b33d;
  text-align: center;
  padding: 2rem;
  font-weight: bold;
}

.unit-image-col .card-image {
  max-height: 96px;
  width: auto;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.32));
}

.unit-row .unit-value {
  margin-left: 0;
}

.level-arrow-spacer {
  min-width: 40px;
  height: 100%;
  display: inline-block;
}

.unit-row-empty {
  min-height: 32px;
}

.unit-image-col .image-wrapper {
  display: flex;
  height: 100%;
  width: 100%;
  padding: 0;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
