.friends-type {
  container-type: inline-size;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 340px;
  margin-inline: auto;
  font-family: 'Roboto Flex', Arial, sans-serif;
  --ft-ink: #22213a;
  --ft-paper: #fff5dc;
  --ft-price-size: 25cqi;
}

.friends-type__face {
  position: relative;
  isolation: isolate;
  margin: 0;
  aspect-ratio: var(--ft-ratio, 1.1);
}

.friends-type__field,
.friends-type__photo,
.friends-type__accent-art,
.friends-type__caption { position: absolute; }

.friends-type__photo,
.friends-type__accent-art { display: grid; }

.friends-type__image {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  min-block-size: 0;
  object-fit: cover;
  object-position: var(--ft-focus);
}

.friends-type[data-framing='cutout'] .friends-type__photo .friends-type__image,
.friends-type__accent-art .friends-type__image { object-fit: contain; }

.friends-type__caption {
  z-index: 3;
  inset: 0;
  color: var(--ft-ink);
}

.friends-type__name,
.friends-type__amount { position: absolute; }

.friends-type__name {
  font-size: max(12px, 7.1cqi);
  font-weight: 850;
  letter-spacing: -.04em;
  line-height: 1;
}

.friends-type__amount {
  display: inline-flex;
  align-items: baseline;
  gap: .08em;
  white-space: nowrap;
  font-size: var(--ft-price-size);
  font-weight: 940;
  font-variation-settings: 'wdth' 92, 'opsz' 113;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -.045em;
  line-height: .91;
}

.friends-type__currency {
  font-size: .49em;
  font-weight: 840;
  letter-spacing: -.015em;
}

.friends-type__spoken {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The whole price is printed on the stage floor in front of the photograph. */
.friends-type--friends-floor-type {
  max-inline-size: 340px;
  --ft-ratio: 1.24;
  --ft-price-size: 29cqi;
}

.friends-type--friends-floor-type .friends-type__face::before {
  position: absolute;
  inset: 4% 14% 26%;
  border-radius: 19% 11% 0 0 / 25% 17% 0 0;
  background: #222648;
  content: '';
}

.friends-type--friends-floor-type .friends-type__photo {
  inset: 18% 20% 36%;
  overflow: hidden;
  border-radius: 13% 10% 0 0 / 24% 23% 0 0;
  background: #6666a4;
}

.friends-type--friends-floor-type .friends-type__image {
  filter: saturate(.87) contrast(1.07);
}

.friends-type--friends-floor-type .friends-type__field {
  z-index: 1;
  inset: 62% 1% 2%;
  overflow: hidden;
  clip-path: polygon(13% 0, 87% 0, 100% 86%, 91% 100%, 9% 100%, 0 86%);
  background: linear-gradient(175deg, #ebad93 0 36%, #f1c597 69%, #ffdb98 100%);
}

.friends-type--friends-floor-type .friends-type__field::before {
  position: absolute;
  inset: 0;
  transform: perspective(19cqi) rotateX(46deg) scale(1.7);
  background: repeating-linear-gradient(90deg, transparent 0 15%, #8f4d6327 15.4% 16%, transparent 16.4% 19%);
  content: '';
}

.friends-type--friends-floor-type .friends-type__name {
  inset: 3% 16% auto;
  text-align: center;
  font-size: max(10px, 5.5cqi);
  color: #ffde9e;
}

.friends-type--friends-floor-type .friends-type__amount {
  inset: auto auto 7% 50%;
  transform: translateX(-50%) perspective(37cqi) rotateX(31deg);
  transform-origin: center bottom;
}

/* Three leaf edges open up around the photograph above a fixed typeset base. */
.friends-type--friends-nested-fan {
  max-inline-size: 286px;
  --ft-ratio: .97;
  --ft-price-size: 24cqi;
}

.friends-type--friends-nested-fan .friends-type__face {
  overflow: clip;
  overflow-clip-margin: 12px;
}

.friends-type--friends-nested-fan .friends-type__field {
  inset: 7% 15% 23% 17%;
  transform: rotate(-22deg);
  border-radius: 30% 7% 26% 9% / 31% 5% 22% 5%;
  background: #eb7665;
}

.friends-type--friends-nested-fan .friends-type__field::after {
  position: absolute;
  inset: 7% -6% -5% 7%;
  transform: rotate(22deg);
  border-radius: 37% 12% 28% 5% / 31% 13% 27% 6%;
  background: #ffe8a9;
  content: '';
}

.friends-type--friends-nested-fan .friends-type__photo {
  z-index: 1;
  inset: 8% 13% 30% 32%;
  overflow: hidden;
  border-radius: 39% 8% 30% 5% / 30% 8% 30% 8%;
  border: .95cqi solid #d7eebc;
  transform: rotate(18deg);
  background: #d7eebc;
}

.friends-type--friends-nested-fan .friends-type__accent-art {
  z-index: 2;
  inset: 37% 1% 24% 57%;
  transform: rotate(13deg);
  filter: drop-shadow(.5cqi 1cqi .8cqi #37202136);
}

.friends-type--friends-nested-fan .friends-type__name {
  inset: auto auto 34% 10%;
  padding: 1.7cqi 3.2cqi 2cqi;
  border-radius: 7cqi 7cqi 1cqi 7cqi;
  background: #d7eebc;
}

.friends-type--friends-nested-fan .friends-type__amount {
  inset: auto auto 5% 7%;
  padding: 2.5cqi 4.4cqi 3.2cqi;
  border-radius: 8cqi 14cqi 4cqi 2cqi;
  background: #292747;
  color: #fff5dc;
}

/* The negative space is an actual cut in the SVG surface, with the photo behind it. */
.friends-type--friends-subtractive-window {
  max-inline-size: 310px;
  --ft-ratio: 1.15;
  --ft-price-size: 27cqi;
}

.friends-type--friends-subtractive-window .friends-type__face {
  overflow: hidden;
  clip-path: polygon(6% 12%, 75% 0%, 91% 6%, 99% 26%, 93% 68%, 98% 91%, 78% 99%, 11% 100%, 0% 78%, 1% 33%);
  background: #30284c;
}

.friends-type--friends-subtractive-window .friends-type__photo {
  inset: 6% 3% 45%;
  background: #383153;
}

.friends-type__aperture {
  position: absolute;
  inset: 0;
  z-index: 1;
  inline-size: 100%;
  block-size: 100%;
  fill: #c8d99f;
}

.friends-type--friends-subtractive-window .friends-type__name {
  inset: auto auto 38.5% 12%;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
}

.friends-type--friends-subtractive-window .friends-type__amount {
  inset: auto auto 8% 11%;
  font-variation-settings: 'wdth' 82, 'opsz' 128;
}

/* A narrow photographic cut travels through two large contrasting graphic planes. */
.friends-type--friends-strip-cut {
  max-inline-size: 350px;
  --ft-ratio: 1.52;
  --ft-price-size: 26cqi;
}

.friends-type--friends-strip-cut .friends-type__face {
  overflow: hidden;
  border-radius: 4cqi 13cqi 8cqi 17cqi;
  background: #343175;
}

.friends-type--friends-strip-cut .friends-type__field {
  inset: 0;
  clip-path: polygon(0 0, 87% 0, 39% 49%, 100% 21%, 100% 90%, 0 100%);
  background: #dae8f7;
}

.friends-type--friends-strip-cut .friends-type__photo {
  z-index: 1;
  inset: 12% -5% 38% 41%;
  overflow: hidden;
  clip-path: polygon(0 54%, 100% 0, 100% 42%, 5% 100%);
  background: #ee8b78;
}

.friends-type--friends-strip-cut .friends-type__photo .friends-type__image {
  filter: grayscale(1) contrast(1.15);
  mix-blend-mode: multiply;
}

.friends-type--friends-strip-cut .friends-type__accent-art {
  z-index: 2;
  inset: 0 2% 48% 61%;
  transform: rotate(11deg);
  filter: drop-shadow(0 .8cqi .8cqi #20152e4b);
}

.friends-type--friends-strip-cut .friends-type__name {
  inset: 12% auto auto 8%;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
}

.friends-type--friends-strip-cut .friends-type__amount {
  inset: auto auto 11% 8%;
  transform: skewX(-9deg);
  transform-origin: left bottom;
  font-variation-settings: 'wdth' 110, 'opsz' 133;
}
