/* The print scales as one vector drawing, including indices and illustrations.
   Card dimensions, placement and game interactions stay with the table layout. */
.card.card-illustrated:not(.back) {
  padding: 0;
  border: 1px solid #c8c0ae;
  border-radius: 7px;
  background: #fffdf7;
  box-shadow: 0 3px 7px #173b3026;
}

.card.card-illustrated::before,
.card.card-illustrated::after {
  display: none;
}

.card-face-art {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  user-select: none;
}

.card.card-illustrated.card-bout {
  border-color: #b69753;
  outline: none;
}

.hand > .card.card-illustrated.playable {
  border-color: #357353;
  box-shadow: 0 0 0 2px #94bca0, 0 4px 9px #163d3033;
}

.hand > .card.card-illustrated.unplayable,
.hand > .card.card-illustrated.discard-forbidden {
  opacity: .72;
  filter: saturate(.6);
}

.hand > .card.card-illustrated.selected {
  border-color: #8a6725;
  outline: 3px solid #b78e42;
  outline-offset: 1px;
  box-shadow: 0 7px 15px #46351140;
}

.hand > .card.card-illustrated.selected::after {
  display: grid;
  position: absolute;
  top: 4px;
  right: 4px;
  bottom: auto;
  left: auto;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid #fff8de;
  border-radius: 50%;
  background: #806322;
  color: #fff;
  content: '\2713';
  font: 700 11px/1 'DM Sans', sans-serif;
  opacity: 1;
}

.hand > .card.card-illustrated[role='button']:hover,
.hand > .card.card-illustrated[role='button']:focus-visible {
  outline: 2px solid #1d563d;
  outline-offset: 2px;
  filter: none;
}

.played-card.is-winning > .card.card-illustrated {
  outline: 2px solid #e4c877;
  outline-offset: 2px;
}

.card-reading-key {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 18px;
  margin: 2px 0 4px;
  color: #586653;
  font: 400 11px/1.6 'DM Sans', sans-serif;
}

.card-reading-key b {
  color: #334c3c;
  font-weight: 700;
}

@media (max-width: 760px) {
  .card-reading-key { font-size: 10px; gap: 3px 12px; }
  .hand > .card.card-illustrated.selected::after { width: 14px; height: 14px; font-size: 9px; }
}

@media (forced-colors: active) {
  .card-face-art { color: CanvasText; }
  .card-face-art .card-paper { fill: Canvas; }
  .card-face-art text { fill: CanvasText; }
  .card-face-art .card-print-frame { stroke: CanvasText; }
  .card.card-illustrated:not(.back) { border-color: CanvasText; }
  .hand > .card.card-illustrated.playable { border-color: Highlight; }
  .hand > .card.card-illustrated.selected,
  .hand > .card.card-illustrated[role='button']:focus-visible { outline-color: Highlight; }
}
