.fo-card {
  container-type: inline-size;
  width: 100%;
  min-width: 0;
  margin-inline: auto;
}

.fo-card__face {
  position: relative;
  isolation: isolate;
  width: 100%;
  margin: 0;
}

.fo-card__art,
.fo-card__caption,
.fo-card__graphic,
.fo-card__paper { position: absolute; }
.fo-card__graphic { inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fo-card__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: var(--fo-anchor);
}

.fo-card__caption {
  z-index: 3;
  display: grid;
  width: max-content;
  gap: 1.6cqi;
}

.fo-card__name {
  font-size: 6.5cqi;
  font-weight: 810;
  line-height: 1;
  letter-spacing: -.04em;
}

.fo-card__price {
  font-size: var(--fo-price-size, 21cqi);
  font-weight: 960;
  line-height: .86;
  letter-spacing: -.076em;
  white-space: nowrap;
}

.fo-card__currency {
  margin-inline-start: .22em;
  font-size: .48em;
  font-weight: 820;
  letter-spacing: -.03em;
}

/* The number is printed in the wide, rising part of the winding strip. */
.fo-card--friends-ribbon-track { max-width: 276px; --fo-price-size: 24cqi; }
.fo-card--friends-ribbon-track .fo-card__face { aspect-ratio: 260 / 226; }
.fo-card--friends-ribbon-track .fo-card__face::before {
  position: absolute;
  inset: 4% 13% 20%;
  transform: rotate(8deg);
  border-radius: 32% 48% 30% 42% / 37% 40% 44% 38%;
  background: #f0c26a;
  content: '';
}

.fo-card--friends-ribbon-track .fo-card__graphic { z-index: 2; }
.fo-card__ribbon-tail { fill: #671745; }
.fo-card__ribbon-body { fill: #9f1c50; }
.fo-card__ribbon-rule {
  fill: none;
  stroke: #ffd8a6;
  stroke-width: 1.1;
  stroke-dasharray: 2 4;
  opacity: .75;
}

.fo-card--friends-ribbon-track .fo-card__art { z-index: 1; inset: 1% 12% 34%; }
.fo-card--friends-ribbon-track[data-framing='cutout'] .fo-card__image { filter: drop-shadow(0 2cqi 1.5cqi #45233147); }
.fo-card--friends-ribbon-track[data-framing='photo'] .fo-card__art { inset: 7% 20% 38%; }
.fo-card--friends-ribbon-track[data-framing='photo'] .fo-card__image {
  object-fit: cover;
  border-radius: 13% 24% 15% 21%;
}

.fo-card--friends-ribbon-track .fo-card__caption {
  inset: auto auto 10% 15%;
  color: #fff1cf;
  transform: rotate(-8deg);
  transform-origin: left bottom;
}

.fo-card--friends-ribbon-track .fo-card__name {
  justify-self: start;
  padding: .9cqi 1.9cqi;
  border-radius: 6cqi;
  background: #671745;
}

/* A taut line holds separate prints and their price tag. */
.fo-card--friends-on-string { max-width: 302px; --fo-price-size: 20cqi; }
.fo-card--friends-on-string .fo-card__face { aspect-ratio: 260 / 186; }
.fo-card--friends-on-string .fo-card__graphic { z-index: 0; }
.fo-card__wire {
  fill: none;
  stroke: #70504b;
  stroke-width: 1.65;
  stroke-linecap: round;
}

.fo-card--friends-on-string .fo-card__art {
  z-index: 1;
  width: 39%;
  height: 50%;
  padding: 2.6cqi 2.6cqi 3.9cqi;
  border: 1px solid #683d3d2e;
  background: #fff4de;
  box-shadow: 1.1cqi 1.3cqi 1.1cqi #48263532;
}

.fo-card--friends-on-string .fo-card__image { background: #e9a69e; }
.fo-card--friends-on-string .fo-card__art::before {
  position: absolute;
  z-index: 1;
  inset: -3.5cqi auto auto 44%;
  width: 4.6cqi;
  height: 10cqi;
  border-radius: .8cqi;
  background: #8b4937;
  box-shadow: inset 0 1px 0 #fff5d4a8;
  content: '';
}

.fo-card--friends-on-string .fo-card__art--main {
  inset: 23% auto auto 8%;
  transform: rotate(-13deg);
  transform-origin: center top;
}

.fo-card--friends-on-string[data-secondary='false'] .fo-card__art--main {
  inset-inline-start: 5%;
  width: 52%;
  height: 59%;
}

.fo-card--friends-on-string .fo-card__art--secondary {
  inset: 21% 7% auto auto;
  transform: rotate(10deg);
  transform-origin: center top;
}

.fo-card--friends-on-string .fo-card__art--secondary .fo-card__image { background: #c5d0ac; }
.fo-card--friends-on-string .fo-card__caption {
  inset: auto 7% 3% auto;
  padding: 4.8cqi 5cqi 4.2cqi 8cqi;
  border-radius: 33% 12% 13% 32% / 50% 16% 22% 51%;
  background: #384e38;
  color: #fff4d4;
  transform: rotate(6deg);
  box-shadow: 1cqi 1cqi 0 #b5c497;
}

.fo-card--friends-on-string[data-secondary='true'] .fo-card__caption {
  inset-inline-end: 17%;
  transform: rotate(-5deg);
}

.fo-card--friends-on-string .fo-card__caption::before {
  position: absolute;
  inset: 49% auto auto 3.1cqi;
  width: 2.4cqi;
  height: 2.4cqi;
  border-radius: 50%;
  background: #c9d5a9;
  content: '';
}

/* A hand-cut color sheet and clipped photo each have independent edges. */
.fo-card--friends-diecut-print { max-width: 294px; --fo-price-size: 24.8cqi; }
.fo-card--friends-diecut-print .fo-card__face { aspect-ratio: 1.28; }
.fo-card--friends-diecut-print .fo-card__face::before {
  position: absolute;
  inset: 8% 13% 14% 7%;
  transform: rotate(-9deg);
  clip-path: polygon(8% 0, 88% 4%, 84% 14%, 100% 23%, 94% 85%, 71% 91%, 64% 100%, 4% 88%, 8% 76%, 0 76%);
  background: #d14f38;
  content: '';
}

.fo-card--friends-diecut-print .fo-card__paper {
  inset: 11% 10% 18% 6%;
  transform: rotate(-4deg);
  clip-path: polygon(3% 14%, 26% 0, 97% 9%, 93% 32%, 100% 38%, 90% 48%, 98% 76%, 73% 77%, 68% 96%, 47% 100%, 13% 85%, 18% 76%, 0% 68%);
  background-color: #f4a582;
  background-image: radial-gradient(circle, #a84f604f 15%, transparent 22%);
  background-size: 2.3cqi 2.3cqi;
}

.fo-card--friends-diecut-print .fo-card__art { inset: 22% 3% 3% 43%; z-index: 1; transform: rotate(9deg); }
.fo-card--friends-diecut-print[data-framing='photo'] .fo-card__art { inset-block: 32% 9%; }
.fo-card--friends-diecut-print[data-framing='photo'] .fo-card__image {
  object-fit: cover;
  clip-path: polygon(7% 0, 100% 7%, 95% 85%, 72% 100%, 0 92%, 5% 61%, 0 53%);
}

.fo-card--friends-diecut-print[data-framing='cutout'] .fo-card__image { filter: drop-shadow(0 1.4cqi 1.5cqi #4f193146); }
.fo-card--friends-diecut-print .fo-card__caption {
  inset: 26% auto auto 13%;
  color: #46162b;
  transform: rotate(-5deg);
  text-shadow: 1px 1px #ffd4ad, -1px -1px #ffd4ad;
}

/* The thick outline breaks at two places around the raised subject. */
.fo-card--friends-cutout-frame { max-width: 290px; --fo-price-size: 21.6cqi; }
.fo-card--friends-cutout-frame .fo-card__face { aspect-ratio: 260 / 190; }
.fo-card--friends-cutout-frame .fo-card__face::before {
  position: absolute;
  inset: 14% 17% 13% 21%;
  transform: rotate(-6deg);
  border-radius: 40% 43% 35% 31%;
  background: #d6bce9;
  content: '';
}

.fo-card__frame-ink,
.fo-card__frame-accent { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fo-card__frame-ink { stroke: #4e3266; stroke-width: 8; }
.fo-card__frame-accent { stroke: #c36677; stroke-width: 5; }
.fo-card--friends-cutout-frame .fo-card__art { inset: 4% 8% 31% 33%; z-index: 1; }
.fo-card--friends-cutout-frame[data-framing='cutout'] .fo-card__image { filter: drop-shadow(-1.4cqi 1.8cqi 1.5cqi #2c173940); }
.fo-card--friends-cutout-frame[data-framing='photo'] .fo-card__art { inset: 12% 10% 26% 39%; }
.fo-card--friends-cutout-frame[data-framing='photo'] .fo-card__image {
  object-fit: cover;
  border-radius: 12% 32% 14% 34%;
  outline: 1cqi solid var(--fo-paper);
  box-shadow: 1cqi 1.1cqi 0 #4e3266;
}

.fo-card--friends-cutout-frame .fo-card__caption {
  inset: auto auto 9% 12%;
  grid-template-columns: max-content;
  row-gap: 1.1cqi;
  padding: 3.4cqi 6.4cqi 4.2cqi;
  border-radius: 22% 8% 21% 9% / 39% 19% 53% 34%;
  background: #eef286;
  color: #302045;
  box-shadow: -1.05cqi 1.5cqi #57356d;
  transform: rotate(-5deg);
}
