/* ---------- the cassette player and the recently played tape ---------- */
.tapes {
  position: relative; z-index: 1;
  font-size: clamp(15px, 1.45vh, 24px);
  max-width: 73.75em; margin: 0 auto;
  padding: 4vh 5vw 14vh;
  display: grid; grid-template-columns: 22.5em minmax(0, 1fr); gap: 2.75em; align-items: start;
  --brass: #c8a97a; --walnut: linear-gradient(180deg,#2a1f14,#140e08);
}

/* the player: a photo, with a strip of masking tape under it saying what was on */
.player { position: relative; margin: 0; min-width: 0; }
.player .shell { position: relative; transform: rotate(-1.2deg); aspect-ratio: 457 / 308; }
.player .shell > img { height: 100%; object-fit: contain; }
.player img { display: block; width: 100%; height: auto; filter: drop-shadow(0 1.2em 1.2em rgba(20,10,0,.45)) drop-shadow(0 .15em .3em rgba(20,10,0,.35)); }
/* the yellow key is its own layer; pressing slides it down into the body, the body hides the rest */
.player .key { position: absolute; left: 66.96%; top: 0; width: 7.44%; height: 7.47%; overflow: hidden; pointer-events: none; }
.player .key img { display: block; width: 100%; height: 100%; filter: none;
  transition: transform .12s cubic-bezier(.3,.7,.4,1); }
.player.playing .key img { transform: translateY(62%); }
.player:not(.playing) .key img { transition: transform .28s cubic-bezier(.2,1.6,.4,1); }
.player .yellow {
  position: absolute; left: 64.5%; top: -6%; width: 12.5%; height: 18%;
  border: 0; padding: 0; cursor: pointer; background: transparent;
}
.player .yellow:hover ~ .key img, .player .yellow:hover + .key img { filter: brightness(1.08); }
.player .yellow:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: 20%; }
.player figcaption #np-state { color: #6a5a3a; }
.player.playing figcaption #np-state { color: #a8562f; }
.player figcaption {
  position: relative; display: inline-block; margin: 1.1em 0 0 6%;
  padding: .45em .9em .4em; max-width: 92%;
  background: rgba(238,228,200,.94); color: #3a3226;
  font: 400 1.05em/1.15 var(--pen);
  box-shadow: 0 .1em .2em rgba(0,0,0,.3);
  transform: rotate(1.2deg);
}
.player figcaption::before, .player figcaption::after { content: ""; position: absolute; top: 0; bottom: 0; width: .5em; background: rgba(238,228,200,.6); }
.player figcaption::before { left: -.5em; clip-path: polygon(100% 0, 0 20%, 100% 45%, 0 70%, 100% 100%); }
.player figcaption::after { right: -.5em; clip-path: polygon(0 0, 100% 25%, 0 50%, 100% 75%, 0 100%); }
.player figcaption b { font-family: var(--marker); font-weight: 400; font-size: .85em; display: block; margin-bottom: .1em; color: #2a2218; }
.player figcaption a { color: inherit; }

/* the tape's insert, pinned to the board, with the tape itself lying across the top of it */
.insert-wrap { position: relative; padding-top: 1.75em; min-width: 0; }
.inlay { min-width: 0; }
.inlay {
  --paper: linear-gradient(180deg,#faf5e6,#efe7d1); --rule: rgba(64,54,36,.26); --ink: #1d1a15; --dim: #8a7f68; --cue: #a8562f; --src: #7a6f58; --wash: rgba(168,86,47,.09);
  position: relative;
  background: var(--paper); border-radius: 0.1875em; padding: 2.5em 1.375em 0.875em;
  box-shadow: 0 1.125em 1.625em -14px rgba(20,10,0,.7), 0 0.125em 0.1875em rgba(20,10,0,.3), inset 0 0 0 0.0625em rgba(0,0,0,.05);
  transform: rotate(.6deg);
}
.inlay::after {
  content: ""; position: absolute; left: 50%; top: -6px;
  width: 0.875em; height: 0.875em; margin-left: -7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8 0, transparent 45%), #d8322a;
  box-shadow: 0 0.3125em 0.3125em -2px rgba(20,10,0,.55), inset 0 -2px 0.1875em rgba(0,0,0,.35);
}
.inlay-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; padding: 0 0.25em 0.5em; border-bottom: 0.0625em solid var(--rule); margin-bottom: 0.25em; }
.inlay-head b { font: 400 1.375em/1 var(--marker); color: var(--ink); text-transform: uppercase; letter-spacing: .01em; }
.inlay-head span { font: 400 0.625em/1 'Courier Prime', monospace; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.inlay-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 6), auto); column-gap: 1.625em; }
.ilr { display: flex; align-items: flex-end; gap: 0.5em; padding: 0.25em 0.375em 0.25em 0.125em; border-bottom: 0.0625em solid var(--rule); }
.ilr-n { width: 0.9375em; flex: none; text-align: right; color: var(--dim); font: 400 0.75em/1.125em 'Courier Prime', monospace; }
.ilr-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 0.5em; }
.ilr-nm { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font: 700 0.7812em/1.125em 'Courier Prime', monospace; }
.ilr-src { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; font: 400 0.75em/1.125em var(--pen); color: var(--src); }
.ilr-d { flex: none; color: var(--dim); font: 400 0.6875em/1.125em 'Courier Prime', monospace; font-variant-numeric: tabular-nums; }
.ilr.on { background: var(--wash); }
.ilr.on .ilr-nm { color: var(--cue); }
.ilr.on .ilr-nm::before { content: "▶ "; font-size: 0.5625em; }
.inlay-empty { padding: 1.125em 0.375em; color: var(--dim); font: 400 0.75em/1.5 'Courier Prime', monospace; }

/* the spine: the rack's plastic shell, 'typed' label */
.spine {
  position: absolute; left: 6%; right: 8%; top: 0; height: 2.875em; z-index: 3;
  transform: rotate(-1.4deg);
  filter: drop-shadow(0 0.625em 0.5em rgba(20,10,0,.45));
}
.spine .case { position: absolute; inset: 0; border-radius: 0.125em;
  background: linear-gradient(180deg,#dedad3 0%,#b6b1a9 5%,#8e8a83 48%,#5d5952 53%,#7e7a73 78%,#494540 100%);
  box-shadow: 0 0.25em 0.5625em -3px rgba(0,0,0,.8), inset 0 0.0625em 0 rgba(255,255,255,.7); }
.spine .hinge { position: absolute; top: 0.125em; bottom: 0.125em; width: 0.5625em;
  background: repeating-linear-gradient(180deg,rgba(255,255,255,.34) 0 0.0625em,rgba(0,0,0,.24) 0.0625em 0.1875em); }
.spine .hinge.l { left: 0; border-radius: 0.125em 0 0 0.125em; }
.spine .hinge.r { right: 0; border-radius: 0 0.125em 0.125em 0; }
.spine .insert { position: absolute; left: 0.625em; right: 0.625em; top: 0.1875em; bottom: 0.1875em; overflow: hidden;
  background: linear-gradient(180deg,#faf6ea,#ece5d2);
  box-shadow: 0 0 0 1px rgba(0,0,0,.3), inset 0 1px 2px rgba(255,255,255,.35); }
.spine .tpl { position: absolute; inset: 0; display: flex; align-items: stretch; }
.spine .sp-cover { flex: none; width: 2.125em; background: linear-gradient(135deg, #2190d8, #0b3e68) center / cover no-repeat; box-shadow: inset -1px 0 0 rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.14); }
/* A. bold */
.spine .b-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: .625em; padding: 0 .5em 0 .5625em; }
.spine .b-title { font: 400 1.5em/1 'Bebas Neue', sans-serif; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spine .b-artist { font: 600 .5625em/1.2 'Archivo', sans-serif; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .72; }
.spine .b-right { margin-left: auto; flex: none; display: flex; align-items: center; gap: .375em; }
.spine .b-cat { font: 400 .47em/1 'Courier Prime', monospace; letter-spacing: .1em; opacity: .7; }
.spine .b-side { width: .875em; height: .875em; display: grid; place-items: center; font: 700 .6em/1 'Archivo Narrow', sans-serif; }
/* B. strip */
.spine .s-bar { width: .3125em; flex: none; }
.spine .s-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 .5em; gap: .0625em; }
.spine .s-artist { font: 700 .5625em/1.2 'Archivo Narrow', sans-serif; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spine .s-strip { align-self: stretch; background: #fbfaf6; padding: .125em .375em; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.spine .s-strip .s-title { font: 700 .8125em/1.2 'Archivo Narrow', sans-serif; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #16130f; }
.spine .s-rail { flex: none; width: 2.75em; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; padding: .25em .4375em .25em 0; font: 400 .44em/1 'Courier Prime', monospace; letter-spacing: .08em; opacity: .75; }
/* C. typed */
.spine .ty-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5625em; padding: 0 .5em; }
.spine .ty-mid { min-width: 0; display: flex; flex-direction: column; gap: .0625em; }
.spine .ty-title { font: 700 .75em/1.2 'Courier Prime', monospace; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spine .ty-sub { font: 400 .5em/1.2 'Courier Prime', monospace; letter-spacing: .1em; text-transform: uppercase; opacity: .62; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spine .ty-right { margin-left: auto; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: .125em; }
.spine .ty-rule { width: 1.625em; height: .1875em; }
.spine .ty-side { font: 400 .44em/1 'Courier Prime', monospace; letter-spacing: .14em; opacity: .6; }
/* D. art */
.spine .ar-crop { flex: none; width: 2.375em; background-size: cover; background-position: center; box-shadow: inset -1px 0 0 rgba(0,0,0,.2); }
.spine .ar-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 .5625em; gap: .0625em; }
.spine .ar-title { font: 700 .875em/1 'Playfair Display', serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spine .ar-artist { font: 400 .5em/1.2 'Archivo', sans-serif; letter-spacing: .22em; text-transform: uppercase; opacity: .66; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spine .ar-bar { flex: none; width: .3125em; }
/* E. band */
.spine .bd-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.spine .bd-band { flex: none; height: .9375em; display: flex; align-items: center; justify-content: space-between; padding: 0 .5em; }
.spine .bd-artist { font: 700 .5em/1 'Archivo', sans-serif; letter-spacing: .24em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spine .bd-cat { font: 400 .44em/1 'Courier Prime', monospace; letter-spacing: .1em; opacity: .85; flex: none; }
.spine .bd-low { flex: 1; display: flex; align-items: center; gap: .5em; padding: 0 .5em; }
.spine .bd-title { font: 700 .875em/1.2 'Archivo Narrow', sans-serif; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spine .bd-len { margin-left: auto; flex: none; font: 700 .625em/1 'Archivo Narrow', sans-serif; letter-spacing: .1em; opacity: .6; }
.spine .shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,0) 26%,rgba(0,0,0,.06) 70%,rgba(0,0,0,.22)); }
.spine .gloss { position: absolute; inset: 0; border-radius: 0.125em; pointer-events: none;
  background: linear-gradient(102deg,rgba(255,255,255,.2) 0 12%,rgba(255,255,255,0) 24%,rgba(255,255,255,0) 76%,rgba(255,255,255,.12) 90%); }

@media (max-width: 56.25em) {
  .tapes { grid-template-columns: minmax(0, 1fr); gap: 2.125em; }
  .inlay-grid { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; grid-template-rows: none; }
}

@media (max-width: 640px) {
  .tapes { padding: 0 4vw 12vh; }
  .spine { left: 2%; right: 2%; }
}
