/* The original illustrated shell is 331 × 154. A drawer row occludes its bottom edge. */
.pc-cassette-colors { position: fixed; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.pc-stage .pc-cassette.pc-shell,
.pc-cassette.pc-shell.pc-flight {
  aspect-ratio: 331 / 154;
  container-type: inline-size;
  box-sizing: border-box;
  display: block;
}
.pc-stage .pc-tape {
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr);
  align-items: start;
}
.pc-stage .pc-tape .pc-cassette.pc-shell {
  align-self: start;
  width: 88%;
  height: auto;
  margin: 0 0 0 12%;
}
.pc-stage .pc-tape:hover .pc-cassette.pc-shell,
.pc-stage .pc-tape:focus-visible .pc-cassette.pc-shell {
  transform: translateY(-3%);
}
.pc-stage .pc-well { container-type: size; }
.pc-stage .pc-well:not(.is-empty) {
  display: flex;
  align-items: center;
  justify-content: center;
}
.pc-stage .pc-well .pc-cassette.pc-shell {
  flex: none;
  width: min(100cqw, 214.935cqh);
  height: auto;
  margin: 0;
}
.pc-cassette.pc-shell .pc-case-art {
  filter: var(--pc-shell-filter, none);
  background: var(--t700-image-studio-tape) center / contain no-repeat;
}
/* One strip travels with the cassette from the drawer into either well.
   Both ink lines have their own unshrinking row, even at the smallest size. */
.pc-stage :is(.pc-tape,.pc-well) .pc-cassette.pc-shell .pc-label,
.pc-cassette.pc-flight.pc-shell .pc-label {
  position: absolute;
  left: 9.6%;
  top: 5.2%;
  width: 75.5%;
  height: auto;
  min-height: 36.7%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: max-content;
  align-content: center;
  padding: .4cqw 2.8cqw .55cqw;
  overflow: visible;
  white-space: normal;
  text-align: left;
  color: #262823;
  transform: rotate(var(--pc-strip-angle, -.65deg));
  isolation: isolate;
  pointer-events: none;
}
.pc-shell[data-tape-color="1"] { --pc-strip-angle: .4deg; }
.pc-shell[data-tape-color="2"] { --pc-strip-angle: -.35deg; }
.pc-shell[data-tape-color="3"] { --pc-strip-angle: .55deg; }
.pc-cassette.pc-shell .pc-label::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(110deg, transparent 77%, #74706024 77.6%, #ffffff45 78.2%, transparent 79.2%),
    repeating-linear-gradient(2deg, transparent 0 .9cqw, #655f5020 1cqw, transparent 1.23cqw),
    repeating-linear-gradient(92deg, transparent 0 .85cqw, #fffbea2b .96cqw, transparent 1.2cqw),
    #e4dfc9;
  box-shadow: inset 0 .55cqw 0 #f4ecd4, inset 0 -.48cqw 0 #aca38a;
  clip-path: polygon(1.5% 3%, 18% .6%, 44% 2%, 70% 0, 98.8% 1.7%,
    98.3% 12%, 100% 19%, 99% 29%, 99.8% 45%, 98.9% 53%, 100% 65%,
    98.7% 78%, 99.4% 91%, 98.2% 98.2%, 73% 97.4%, 46% 100%, 20% 97.7%,
    .5% 100%, 1.2% 86%, .2% 76%, 1% 65%, 0 55%, 1.4% 41%, .4% 33%, 1.6% 21%, .4% 14%);
}
.pc-cassette.pc-shell .pc-label-title,
.pc-cassette.pc-shell .pc-label-creator {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pc-cassette.pc-shell .pc-label-title {
  font: 500 8.2cqw/1.1 'Oswald', 'Arial Narrow', sans-serif;
}
.pc-cassette.pc-shell .pc-label-creator {
  font: italic 400 5.8cqw/1.18 'T700 Body', Arial, sans-serif;
  color: #40564f;
  transform: none;
}
.pc-byline {
  transform: rotate(-1.15deg);
  transform-origin: left center;
}
.pc-cassette.pc-shell.pc-flight {
  position: fixed;
  z-index: 300;
  margin: 0;
  padding: 0;
  pointer-events: none;
  transform-origin: top left;
  will-change: transform, clip-path;
}
@media (prefers-reduced-motion: reduce) {
  .pc-stage .pc-tape:hover .pc-cassette.pc-shell,
  .pc-stage .pc-tape:focus-visible .pc-cassette.pc-shell { transform: none; }
}

/* Lift the strip on small drawer tapes to leave the signature above the shelf lip. */
@container (max-width: 185px) {
  .pc-stage .pc-tape .pc-cassette.pc-shell .pc-label,
  .pc-cassette.pc-flight.pc-shell .pc-label {
    top: 4.5%;
  }
  .pc-tape .pc-shell .pc-label-title,
  .pc-flight.pc-shell .pc-label-title { font-size: max(13px, 8.2cqw); }
  .pc-tape .pc-shell .pc-label-creator,
  .pc-flight.pc-shell .pc-label-creator { font-size: max(11px, 5.8cqw); }
}

/* The paired phone wells have room for a broader strip and two distinct lines. */
@container (max-width: 145px) {
  .pc-stage .pc-well .pc-cassette.pc-shell .pc-label {
    left: 7%;
    top: 4.5%;
    width: 88%;
  }
  .pc-well .pc-shell .pc-label-title { font-size: max(10px, 8.2cqw); }
  .pc-well .pc-shell .pc-label-creator { font-size: max(9.5px, 5.8cqw); }
}
