/* Card faces. Colors come from the skin as inline styles. This file is the shape. */

/* Card Characters Narrow Figures, Regular. Local file, not a license to publish.
   Weight 400 is the only cut in the file. A heavier request faux-bolds the suits.
   Uno ⊘ ⇄ ★ are not in the file, so those marks fall back to system-ui. */
@font-face {
  font-family: "Card Characters Narrow";
  src: url("fonts/card-characters-narrow.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

.cd-card {
  box-sizing: border-box;
  container-type: size;
  position: relative;
  border: 2px solid #111111;
  border-radius: 8%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  font-family: "Card Characters Narrow", system-ui, sans-serif;
  font-weight: 400;
  user-select: none;
  overflow: hidden;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.cd-face {
  position: absolute;
  z-index: 0;
  object-fit: cover;
  pointer-events: none;
}

.cd-corner {
  z-index: 1;
  position: absolute;
  top: 2%;
  left: 4%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.12em;
  font-size: 22cqmin;
  line-height: 1;
  white-space: nowrap;
}

.cd-corner-down {
  flex-direction: column;
  gap: 0;
  font-size: 11cqmin;
}

.cd-index-rank { font-size: 22cqmin; }

.cd-index-suit { font-size: 11cqmin; }

.cd-index { display: block; }

.cd-corner-turn {
  top: auto;
  left: auto;
  right: 4%;
  bottom: 2%;
  transform: rotate(180deg);
}

.cd-center {
  position: absolute;
  inset: 9% 4%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-size: 42cqmin;
  line-height: 1.05;
  text-align: center;
}

.cd-center.cd-pips {
  inset: 0;
  display: block;
}

.cd-pip {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
  transform: translate(-50%, -50%);
}

.cd-pip-turn {
  transform: translate(-50%, -50%) rotate(180deg);
}

.cd-card-selected {
  outline: 3px solid var(--cd-selected, #f5c518);
  z-index: 1;
}

.cd-card-up { cursor: grab; }

.cd-pile { position: relative; }
