/* card names and in-board card detail panel */

.card-name {
  justify-self: stretch;
  min-height: 1.35em;
  overflow: hidden;
  color: rgba(34, 24, 15, .74);
  font-size: .48rem;
  font-weight: 950;
  line-height: 1.15;
  letter-spacing: .01em;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hand-card.detail-ready {
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.hand-card.detail-ready[aria-disabled="true"] {
  cursor: pointer;
  filter: saturate(.8) brightness(.95);
}

.card-detail-panel {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 65;
  width: min(420px, calc(100% - 180px));
  max-height: 170px;
  overflow-y: auto;
  padding: 12px 14px 13px;
  border: 1px solid rgba(230, 219, 192, .3);
  border-radius: 13px;
  background: rgba(23, 23, 25, .97);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .4);
  color: var(--text);
  transform: translateX(-50%);
  overscroll-behavior: contain;
}

.card-detail-panel[hidden] {
  display: none;
}

.card-detail-kicker {
  display: block;
  margin: 0 0 3px;
  color: var(--accent);
  font-size: .54rem;
  font-weight: 950;
  letter-spacing: .14em;
}

.card-detail-name {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
}

.card-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.card-detail-stat {
  min-width: 58px;
  padding: 5px 7px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 5px;
  border-radius: 9px;
  color: #fff;
}

.card-detail-stat.cost { background: #356a9d; }
.card-detail-stat.attack { background: #a8453f; }
.card-detail-stat.hp { background: #315ba8; }

.card-detail-stat small {
  font-size: .5rem;
  font-weight: 950;
  letter-spacing: .08em;
}

.card-detail-stat strong {
  font-size: 1rem;
  line-height: 1;
}

.card-detail-description {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .card-name {
    font-size: .42rem;
  }

  .card-detail-panel {
    top: 12px;
    width: min(280px, calc(100% - 126px));
    max-height: 154px;
    padding: 10px 11px 11px;
    border-radius: 11px;
  }

  .card-detail-kicker {
    font-size: .48rem;
  }

  .card-detail-name {
    font-size: .9rem;
  }

  .card-detail-stats {
    gap: 5px;
    margin-top: 6px;
  }

  .card-detail-stat {
    min-width: 52px;
    padding: 4px 6px;
  }

  .card-detail-stat strong {
    font-size: .9rem;
  }

  .card-detail-description {
    margin-top: 7px;
    font-size: .64rem;
    line-height: 1.45;
  }
}

@media (max-width: 430px) {
  .card-detail-panel {
    width: min(250px, calc(100% - 116px));
    max-height: 148px;
  }
}