/*
 * THE FIVE · member cards + profile dialog (js/members.js)
 * A fanned hand of 1970s trading cards that double as record sleeves.
 * Click one and it pops open into the back of the card.
 * Every class here starts with "mem-".
 */

.mem-root {
  position: relative;
  --mem-gap: clamp(10px, 1.6vw, 22px);
}
.mem-empty {
  font-family: var(--font-script);
  font-size: var(--fs-xl);
  color: var(--mustard);
  transform: rotate(-2deg);
}

/* ================================================================ HAND */
.mem-hand {
  list-style: none;
  margin: 0;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(0px, 2.2vw, 28px) 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: clamp(2.5rem, 5vw, 3.5rem) var(--mem-gap);
}
.mem-slot {
  --fan-r: 0deg;
  --fan-y: 0px;
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 calc((100% - 4 * var(--mem-gap)) / 5);
  min-width: 0;
  container: mem-card / inline-size;
  transform: translateY(var(--fan-y)) rotate(var(--fan-r));
  transform-origin: 50% 62%;
  transition: transform 0.75s var(--ease-bounce) calc(var(--i, 0) * 70ms);
}
/* desktop: a fanned hand, Josh slightly askew on the end */
.mem-slot:nth-child(1) { --fan-r: -6deg; --fan-y: 34px; }
.mem-slot:nth-child(2) { --fan-r: -3deg; --fan-y: 9px; }
.mem-slot:nth-child(3) { --fan-r: 0.5deg; --fan-y: 0px; }
.mem-slot:nth-child(4) { --fan-r: 3deg; --fan-y: 9px; }
.mem-slot:nth-child(5) { --fan-r: 6deg; --fan-y: 34px; }
.mem-slot.mem-slot--pending { --fan-r: 8deg; --fan-y: 38px; }

/* dealt in: the hand starts squared up (fully readable), then fans out */
.mem-hand.is-stacked .mem-slot {
  transform: translateY(14px) rotate(0deg);
  transition-duration: 0s;
}

.mem-slot:hover,
.mem-slot:focus-within,
.mem-slot.is-singing {
  z-index: 6;
}

/* ================================================================ CARD */
.mem-card {
  --lift: 0px;
  --straight: 0deg;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
  font: inherit;
  border-radius: var(--r-md);
  -webkit-tap-highlight-color: transparent;
  transform: perspective(900px) translateY(var(--lift)) rotate(var(--straight))
    rotateX(var(--mem-rx, 0deg)) rotateY(var(--mem-ry, 0deg));
  transition: transform 0.55s var(--ease-bounce);
}
.mem-card:focus-visible {
  outline-offset: 6px;
  border-radius: var(--r-md);
}
.mem-slot.is-tilting .mem-card {
  transition: transform 0.14s linear;
}
@media (hover: hover) {
  .mem-slot:hover .mem-card {
    --lift: -16px;
    --straight: calc(var(--fan-r) * -0.7);
  }
}
.mem-card:focus-visible,
.mem-slot.is-singing .mem-card {
  --lift: -16px;
  --straight: calc(var(--fan-r) * -0.7);
}
.mem-card:active {
  --lift: -8px;
}

/* ---------- the face ---------- */
.mem-card__face {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 5cqi 5.5cqi 7cqi;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 248, 225, 0.35), transparent 42%),
    var(--c);
  border: 3px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: 6px 6px 0 var(--ink);
  transition: box-shadow 0.35s var(--ease-out);
}
/* trading-card pinstripe */
.mem-card__face::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid rgba(246, 230, 196, 0.7);
  border-radius: 10px;
  pointer-events: none;
}
/* paper grain */
.mem-card__face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}

.mem-card__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4em;
  min-height: 2em;
  margin-bottom: 2cqi;
  padding-right: 1cqi;
  font-family: var(--font-mono);
  font-size: max(9.5px, 4.6cqi);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mem-card__no {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mem-card__interval {
  flex: none;
}
.mem-card__nameline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2cqi;
  min-width: 0;
}
.mem-card__pitch {
  flex: none;
  display: grid;
  place-items: center;
  width: 12.5cqi;
  min-width: 26px;
  aspect-ratio: 1;
  margin-top: 0.5cqi;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: max(9px, 4.4cqi);
  font-weight: 700;
  line-height: 1;
  color: var(--cream);
  background: var(--ink);
  box-shadow: 2px 2px 0 rgba(246, 230, 196, 0.8);
  transform: rotate(-8deg);
}

/* ---------- the portrait window ---------- */
.mem-card__art {
  position: relative;
  z-index: 1;
  display: block;
}
.mem-art {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--c);
}
/* 70s sunburst rising from behind the initial */
.mem-art__rays {
  position: absolute;
  z-index: 0;
  left: -120%;
  top: -60%;
  width: 300%;
  height: 300%;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(255, 246, 220, 0.5) 0deg 7.5deg,
    rgba(255, 246, 220, 0) 7.5deg 15deg
  );
  transition: transform 1.4s var(--ease-out);
}
/* a banded sunset disc behind the initial */
.mem-art::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: -8%;
  bottom: -30%;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-linear-gradient(180deg, transparent 0 58%, var(--c) 58% 64%, transparent 64% 70%, var(--c) 70% 74%, transparent 74% 80%, var(--c) 80% 83%, transparent 83%),
    rgba(255, 246, 220, 0.6);
  background-size: 100% 100%;
}
.mem-art__dots {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: radial-gradient(circle, rgba(30, 20, 36, 0.32) 0 1.3px, transparent 1.7px) 0 0 / 6px 6px;
  -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 55%);
  mask-image: linear-gradient(200deg, #000 0%, transparent 55%);
}
.mem-art__motif {
  position: absolute;
  z-index: 2;
  inset: 0;
  color: var(--ink);
  opacity: 0.82;
}
.mem-art__motif svg {
  display: block;
  width: 100%;
  height: 100%;
}
.mem-svg-text {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.mem-svg-text--big {
  font-size: 15px;
}
.mem-art__initial {
  position: absolute;
  z-index: 3;
  left: 5%;
  bottom: -0.2em;
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 900;
  font-size: 78cqi;
  line-height: 1;
  color: var(--cream);
  -webkit-text-stroke: 0.035em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0.02em 0.02em 0 var(--ink), 0.04em 0.04em 0 var(--ink), 0.06em 0.06em 0 var(--ink);
  pointer-events: none;
  user-select: none;
}
.mem-art__tag {
  position: absolute;
  z-index: 4;
  right: 4%;
  bottom: 5%;
  max-width: 88%;
  padding: 0.35em 0.55em;
  font-family: var(--font-mono);
  font-size: max(11px, 6cqi);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--ink);
  border-radius: 3px;
  transform: rotate(-3deg);
}

/* a real headshot: 70s duotone in the member's color */
.mem-art__img {
  position: absolute;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.2) brightness(1.18);
  mix-blend-mode: multiply;
}
.mem-art__tone {
  position: absolute;
  z-index: 6;
  inset: 0;
  background: #2b1838;
  mix-blend-mode: lighten;
  pointer-events: none;
}
.mem-art.has-photo .mem-art__rays,
.mem-art.has-photo::before,
.mem-art.has-photo .mem-art__motif,
.mem-art.has-photo .mem-art__initial,
.mem-art.has-photo .mem-art__tag {
  display: none;
}
.mem-art.has-photo .mem-art__dots {
  z-index: 7;
  opacity: 0.6;
}

/* ---------- name plate ---------- */
.mem-card__plate {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.6cqi;
  padding-top: 5cqi;
  min-width: 0;
}
.mem-card__name {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 900;
  font-size: 17.5cqi;
  line-height: 0.92;
  letter-spacing: -0.015em;
  white-space: nowrap;
  color: var(--ink);
  text-shadow: 0.05em 0.05em 0 rgba(255, 246, 220, 0.75);
}
.mem-card__title {
  font-family: var(--font-script);
  font-weight: 700;
  font-size: max(15px, 10.5cqi);
  line-height: 1;
  text-wrap: balance;
}
.mem-card__role {
  font-family: var(--font-mono);
  font-size: max(11px, 4.8cqi);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
/* each "·" piece of a role wraps as a unit ("Everything else" stays whole) */
.mem-role-bit {
  display: inline-block;
  max-width: 100%;
}

/* ---------- footer stripe ---------- */
.mem-card__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2.5cqi;
  margin-top: auto;
  padding-top: 4cqi;
  font-family: var(--font-mono);
  font-size: max(8px, 3.6cqi);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}
.mem-card__stripes {
  flex: 1 1 auto;
  min-width: 10cqi;
  height: max(9px, 4.6cqi);
  background: linear-gradient(180deg, var(--cream) 0 25%, var(--orange) 25% 50%, var(--rust) 50% 75%, var(--brown) 75%);
  border-radius: 2px;
}
@container mem-card (max-width: 190px) {
  .mem-card__interval {
    display: none;
  }
}
@container mem-card (max-width: 175px) {
  /* too narrow for the role at a readable size; the profile has it */
  .mem-card__role {
    display: none;
  }
  .mem-card .mem-card__badge {
    top: -1.5em; /* bigger type: sit higher, clear of the card's header */
    font-size: 12px;
    letter-spacing: 0.04em;
  }
}
@container mem-card (max-width: 165px) {
  .mem-card__foot-txt,
  .mem-card__no-x {
    display: none;
  }
  .mem-card__no {
    letter-spacing: 0.08em;
  }
}
.mem-slot--pending .mem-card__stripes {
  background: repeating-linear-gradient(-45deg, var(--ink) 0 3px, transparent 3px 7px);
  opacity: 0.45;
}

/* ---------- music badge ---------- */
.mem-card__badge {
  position: absolute;
  z-index: 5;
  right: -5cqi;
  top: -1.1em;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.5em 0.75em 0.5em 0.55em;
  font-family: var(--font-mono);
  font-size: max(11px, 4.9cqi);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--cream);
  background: var(--ink);
  border: 2px solid var(--cream);
  border-radius: 999px;
  box-shadow: 2px 2px 0 rgba(10, 8, 32, 0.55);
  transform: rotate(7deg);
  transition: transform 0.5s var(--ease-bounce);
}
@media (hover: hover) {
  .mem-slot:hover .mem-card__badge {
    transform: rotate(-4deg) scale(1.08);
  }
}
.mem-card__badge::before {
  /* a tiny record */
  content: "";
  flex: none;
  width: 1.15em;
  height: 1.15em;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ink) 0 12%, var(--c) 14% 36%, #2a2232 38% 100%);
  box-shadow: 0 0 0 1.5px var(--cream);
}
.mem-card__badge--tapes::before {
  width: 1.45em;
  height: 1em;
  border-radius: 2px;
  background:
    radial-gradient(circle at 30% 45%, var(--ink) 0 14%, transparent 16%),
    radial-gradient(circle at 70% 45%, var(--ink) 0 14%, transparent 16%),
    var(--c);
}
.mem-card__badge--soon {
  color: var(--ink);
  background: var(--cream);
  border: 2px dashed var(--ink);
}
.mem-card__badge--soon::before {
  background: radial-gradient(circle, var(--cream) 0 12%, var(--ink) 14% 36%, var(--c) 38% 100%);
  box-shadow: 0 0 0 1.5px var(--ink);
}
.mem-card__eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 0.9em;
}
.mem-card__eq i {
  width: 3px;
  height: 100%;
  background: var(--mustard);
  transform-origin: bottom;
  animation: mem-eq 0.6s ease-in-out infinite alternate;
}
.mem-card__eq i:nth-child(2) { animation-delay: -0.2s; }
.mem-card__eq i:nth-child(3) { animation-delay: -0.4s; }
.mem-slot.is-on-air .mem-card__eq { display: inline-flex; }
.mem-slot.is-on-air .mem-card__badge::before { display: none; }
@keyframes mem-eq {
  from { transform: scaleY(0.25); }
  to { transform: scaleY(1); }
}

/* ---------- the record in the sleeve ---------- */
.mem-card__record {
  position: absolute;
  z-index: 1;
  left: 15%;
  top: 4%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 20deg, rgba(255, 246, 220, 0) 0deg, rgba(255, 246, 220, 0.32) 28deg, rgba(255, 246, 220, 0) 60deg, rgba(255, 246, 220, 0) 180deg, rgba(255, 246, 220, 0.22) 208deg, rgba(255, 246, 220, 0) 240deg),
    repeating-radial-gradient(circle, #241b2c 0 2px, #3a2f45 2px 3px),
    #241b2c;
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px rgba(246, 230, 196, 0.75), 0 0 28px 2px rgba(255, 240, 194, 0.25);
  transform: translateY(0) rotate(0deg);
  transition: transform 0.6s var(--ease-bounce);
}
.mem-card__label {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 40%;
  aspect-ratio: 1;
  margin: -20% 0 0 -20%;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: max(9px, 5cqi);
  font-weight: 700;
  color: var(--ink);
  background:
    radial-gradient(circle, var(--ink) 0 6%, transparent 7%),
    radial-gradient(circle, transparent 0 44%, rgba(30, 20, 36, 0.25) 45% 47%, transparent 48%),
    var(--c);
}
@media (hover: hover) {
  .mem-slot:hover .mem-card__record {
    transform: translateY(-64%) rotate(50deg);
  }
  .mem-slot:hover .mem-art__rays {
    transform: rotate(16deg);
  }
}
.mem-card:focus-visible .mem-card__record,
.mem-slot.is-singing .mem-card__record {
  transform: translateY(-64%) rotate(50deg);
}
.mem-slot.is-on-air .mem-card__record {
  transform: translateY(-50%);
}
.mem-slot.is-on-air .mem-card__label {
  animation: mem-spin 1.8s linear infinite;
}
@keyframes mem-spin {
  to { transform: rotate(360deg); }
}

/* ---------- gloss ---------- */
.mem-card__sheen {
  position: absolute;
  z-index: 4;
  inset: 0;
  overflow: hidden;
  border-radius: var(--r-md);
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--mem-gx, 30%) var(--mem-gy, 20%), rgba(255, 252, 240, 0.38), rgba(255, 252, 240, 0) 50%);
  transition: opacity 0.35s ease;
}
.mem-card__sheen::after {
  content: "";
  position: absolute;
  inset: -10% -80%;
  background: linear-gradient(
    105deg,
    rgba(255, 250, 235, 0) 42%,
    rgba(255, 250, 235, 0.55) 48%,
    rgba(255, 250, 235, 0.12) 52%,
    rgba(255, 250, 235, 0) 57%
  );
  transform: translateX(-60%);
}
@media (hover: hover) {
  .mem-slot:hover .mem-card__sheen {
    opacity: 1;
  }
  .mem-slot:hover .mem-card__sheen::after {
    animation: mem-sweep 0.95s var(--ease-out) both;
  }
}
.mem-card:focus-visible .mem-card__sheen {
  opacity: 1;
}
.mem-card:focus-visible .mem-card__sheen::after {
  animation: mem-sweep 0.95s var(--ease-out) both;
}
@keyframes mem-sweep {
  from { transform: translateX(-60%); }
  to { transform: translateX(60%); }
}

/* ---------- singing (play the whole band) ---------- */
.mem-slot.is-singing .mem-card__face {
  animation: mem-bounce 0.75s var(--ease-out);
  box-shadow: 6px 6px 0 var(--ink), 0 0 0 4px var(--cream), 0 0 46px 14px var(--c);
}
@keyframes mem-bounce {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-20px) scale(1.06) rotate(-1.5deg); }
  55% { transform: translateY(2px) scale(0.98); }
  78% { transform: translateY(-5px) scale(1.01); }
  100% { transform: translateY(0) scale(1); }
}

/* ============================================ JOSH: the application */
.mem-slot--pending .mem-card__face {
  padding-top: 4.5cqi;
  background:
    repeating-linear-gradient(180deg, rgba(78, 38, 23, 0) 0 22px, rgba(78, 38, 23, 0.06) 22px 23px),
    linear-gradient(160deg, rgba(255, 248, 225, 0.4), rgba(255, 248, 225, 0) 50%),
    var(--c);
  border-radius: 6px 6px 6px 18px;
}
.mem-slot--pending .mem-card__face::before {
  border-style: dashed;
  border-color: rgba(30, 20, 36, 0.35);
  border-radius: 4px;
}
.mem-slot--pending .mem-card__top {
  min-height: 0;
  padding-bottom: 2cqi;
  margin-bottom: 4cqi;
  border-bottom: 2px solid var(--ink);
  font-size: max(8.5px, 4.2cqi);
}
.mem-art--form {
  background:
    linear-gradient(90deg, rgba(63, 184, 168, 0.22) 1px, transparent 1px) 0 0 / 10% 10%,
    linear-gradient(180deg, rgba(63, 184, 168, 0.22) 1px, transparent 1px) 0 0 / 10% 10%,
    var(--cream);
  border: 2px dashed var(--ink);
  border-radius: 4px;
}
.mem-art--form .mem-art__rays,
.mem-art--form::before {
  display: none;
}
.mem-art--form .mem-art__dots {
  display: none;
}
.mem-art--form .mem-art__initial {
  color: var(--cream);
  font-size: 70cqi;
}
.mem-art--form .mem-art__motif {
  color: var(--rust);
  opacity: 0.9;
}
.mem-art--form .mem-art__tag {
  left: 5%;
  right: auto;
  top: 6%;
  bottom: auto;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
/* small application forms: "Photo here" is plenty */
@container (max-width: 150px) {
  .mem-art__tag-x {
    display: none;
  }
}
.mem-card__clip {
  /* paperclip holding the (missing) photo */
  position: absolute;
  z-index: 6;
  top: -14px;
  right: 16%;
  width: 14px;
  height: 46px;
  border: 3px solid #b9ad9c;
  border-radius: 8px;
  transform: rotate(8deg);
  box-shadow: 1px 1px 0 rgba(30, 20, 36, 0.35);
}
.mem-card__clip::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 4px;
  height: 26px;
  border: 3px solid #b9ad9c;
  border-top: 0;
  border-radius: 0 0 6px 6px;
}
.mem-card__form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3.2cqi;
  padding-top: 5cqi;
  min-width: 0;
}
.mem-card__field {
  display: flex;
  align-items: baseline;
  gap: 0.55em;
  min-width: 0;
  padding-bottom: 0.2em;
  border-bottom: 1.5px solid rgba(30, 20, 36, 0.55);
}
.mem-card__key {
  flex: none;
  font-family: var(--font-mono);
  font-size: max(11px, 4.4cqi);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mem-slot--pending .mem-card__name {
  font-family: var(--font-hand);
  font-weight: 400;
  font-variation-settings: normal;
  font-size: 14cqi;
  line-height: 1.05;
  text-shadow: none;
  color: var(--ink);
}
.mem-card__val {
  min-width: 0;
  font-family: var(--font-script);
  font-weight: 700;
  font-size: max(15px, 10cqi);
  line-height: 1;
}
.mem-card__field--boxes {
  flex-wrap: wrap;
  border-bottom: 0;
}
.mem-card__boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em 0.7em;
  font-family: var(--font-mono);
  font-size: max(11px, 4.4cqi);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mem-card__box {
  white-space: nowrap;
}
.mem-card__box::before {
  content: "";
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.3em;
  vertical-align: -0.2em;
  border: 1.5px solid var(--ink);
  background: var(--paper);
}
.mem-card__box.is-checked::before {
  background:
    linear-gradient(45deg, transparent 40%, var(--rust) 40% 60%, transparent 60%),
    linear-gradient(-45deg, transparent 40%, var(--rust) 40% 60%, transparent 60%),
    var(--paper);
}
.mem-card__stamp {
  position: absolute;
  z-index: 5;
  right: -7%;
  bottom: 20%;
  font-size: max(14px, 11cqi);
  background: rgba(255, 240, 200, 0.18);
  pointer-events: none;
}
.mem-card__carbon {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 6px;
  border: 2px solid var(--ink);
  background:
    repeating-linear-gradient(180deg, transparent 0 14px, rgba(30, 20, 36, 0.18) 14px 15px),
    #f3c9b0;
  transform: translate(3px, 3px) rotate(0deg);
  transition: transform 0.6s var(--ease-bounce);
}
/* How far the carbon slides out. Wherever Josh's card ends up near the right edge of
   the screen, it peeks out more upward so it never pokes past the edge (phones would
   widen the whole page for it, e.g. while the band plays its chord). */
.mem-slot--pending .mem-card {
  --carbon-out: translate(16%, -9%) rotate(9deg);
}
@media (max-width: 1365px), (orientation: landscape) and (max-height: 500px) {
  .mem-slot--pending .mem-card {
    --carbon-out: translate(4%, -11%) rotate(3deg);
  }
}
@container mem-card (min-width: 260px) {
  .mem-slot--pending .mem-card {
    --carbon-out: translate(1.5%, -10%) rotate(2deg);
  }
}
@media (hover: hover) {
  .mem-slot--pending:hover .mem-card__carbon {
    transform: var(--carbon-out);
  }
}
.mem-slot--pending .mem-card:focus-visible .mem-card__carbon,
.mem-slot--pending.is-singing .mem-card__carbon {
  transform: var(--carbon-out);
}

/* Josh as a wide "application pending" card (phone layout) */
@container mem-card (min-width: 260px) {
  .mem-slot--pending .mem-card__foot {
    grid-column: 1 / -1;
  }
  .mem-slot--pending .mem-card__face {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 5cqi;
    padding: 4cqi 4.5cqi 5cqi;
  }
  .mem-slot--pending .mem-card__top {
    grid-column: 1 / -1;
    font-size: 3.2cqi;
    margin-bottom: 3cqi;
  }
  .mem-slot--pending .mem-card__art {
    grid-row: 2;
    align-self: start;
  }
  .mem-slot--pending .mem-card__form {
    grid-row: 2;
    align-content: start;
    padding-top: 0;
    gap: 2.6cqi;
  }
  .mem-slot--pending .mem-card__name {
    font-size: 9cqi;
  }
  .mem-slot--pending .mem-card__val {
    font-size: 6.4cqi;
  }
  .mem-slot--pending .mem-card__key,
  .mem-slot--pending .mem-card__boxes {
    font-size: max(12px, 3.2cqi);
  }
  .mem-slot--pending .mem-card__stamp {
    right: -12%;
    bottom: 18%;
    font-size: 6cqi;
  }
  .mem-slot--pending .mem-art__tag {
    font-size: max(12px, 7cqi);
  }
}

/* ================================================ PLAY THE WHOLE BAND */
.mem-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem clamp(1.25rem, 3vw, 2.5rem);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}
.mem-band__deck {
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
  min-width: 0;
  padding: 0.8rem 1.4rem 0.8rem 0.8rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 40%),
    var(--night-1);
  border: 2px solid rgba(246, 230, 196, 0.35);
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(10, 8, 32, 0.6), 6px 6px 0 6px var(--rust);
}
.mem-band__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.4rem;
  padding: 0.6rem 1.4rem 0.6rem 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--mustard);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--orange);
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s var(--ease-out), background-color 0.2s;
}
@media (hover: hover) {
  .mem-band__btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--orange);
    background: #ffc552;
  }
}
.mem-band__btn:active,
.mem-band__btn[aria-disabled="true"] {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--orange);
}
.mem-band__pipe {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 2rem;
  padding: 0.3rem 0.45rem;
  background: var(--ink);
  border-radius: 999px;
}
.mem-band__pipe i {
  width: 5px;
  border-radius: 3px;
  background: var(--c, var(--cream));
  transform-origin: bottom;
}
.mem-band__pipe i:nth-child(1) { height: 40%; }
.mem-band__pipe i:nth-child(2) { height: 65%; }
.mem-band__pipe i:nth-child(3) { height: 85%; }
.mem-band__pipe i:nth-child(4) { height: 100%; }
.mem-band__pipe i:nth-child(5) { height: 55%; }
.mem-band.is-playing .mem-band__pipe i {
  animation: mem-eq 0.42s ease-in-out infinite alternate;
}
.mem-band.is-playing .mem-band__pipe i:nth-child(2n) { animation-delay: -0.2s; }
.mem-band.is-playing .mem-band__pipe i:nth-child(3n) { animation-delay: -0.3s; }

.mem-band__readout {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  min-width: 0;
}
.mem-band__chord {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mem-band__chip {
  display: grid;
  justify-items: center;
  min-width: 3.3rem;
  padding: 0.35rem 0.5rem 0.4rem;
  font-family: var(--font-mono);
  line-height: 1.1;
  color: var(--cream);
  background: rgba(246, 230, 196, 0.06);
  border: 2px solid var(--c);
  border-radius: 8px;
  transition: transform 0.4s var(--ease-bounce), background-color 0.25s, color 0.25s, box-shadow 0.3s;
}
.mem-band__chip.is-sus {
  border-style: dashed;
}
.mem-band__pitch {
  font-size: var(--fs-sm);
  font-weight: 700;
  white-space: nowrap;
}
.mem-band__res {
  font-weight: 400;
  opacity: 0.75;
}
.mem-band__who {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.mem-band__chip.is-on {
  color: var(--ink);
  background: var(--c);
  transform: translateY(-5px);
  box-shadow: 0 0 22px 2px var(--c);
}
.mem-band__chip.is-on .mem-band__who {
  color: var(--ink);
}
.mem-band__chip.is-resolved .mem-band__res {
  opacity: 1;
  font-weight: 700;
}
.mem-band__name {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 900;
  font-size: var(--fs-xl);
  line-height: 1;
  color: var(--cream);
  text-shadow: var(--stripes-sm);
  white-space: nowrap;
  padding-bottom: 0.15em;
}
.mem-band__name span {
  color: var(--fg-dim);
  text-shadow: none;
  font-weight: 400;
}
.mem-band__caption {
  position: relative;
  flex: 0 1 16rem;
  min-width: 0;
  padding-left: 2.6rem;
  font-family: var(--font-script);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  line-height: 1.1;
  color: var(--mustard);
  transform: rotate(-3deg);
}
.mem-band__caption::before {
  /* hand-drawn arrow back at the button */
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 2.1rem;
  height: 1.4rem;
  background: var(--mustard);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 28'%3E%3Cpath d='M40 24 C 28 26 14 20 6 6 M6 6 L 4 16 M6 6 L 15 9' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 28'%3E%3Cpath d='M40 24 C 28 26 14 20 6 6 M6 6 L 4 16 M6 6 L 15 9' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ================================================== responsive hand */
@media (max-width: 1279px) {
  .mem-slot:nth-child(1) { --fan-r: -4deg; --fan-y: 26px; }
  .mem-slot:nth-child(2) { --fan-r: -2deg; --fan-y: 7px; }
  .mem-slot:nth-child(4) { --fan-r: 2deg; --fan-y: 7px; }
  .mem-slot:nth-child(5) { --fan-r: 4deg; --fan-y: 26px; }
  .mem-slot.mem-slot--pending { --fan-r: 5.5deg; --fan-y: 30px; }
}
@media (max-width: 1023px) {
  .mem-hand {
    padding-inline: clamp(8px, 4vw, 40px);
  }
  .mem-slot {
    flex-basis: calc((100% - 2 * var(--mem-gap)) / 3);
    max-width: 240px;
  }
  .mem-band__deck {
    border-radius: 24px;
    padding: 0.9rem;
    justify-content: center;
  }
  .mem-band__readout {
    justify-content: center;
  }
  .mem-slot:nth-child(1) { --fan-r: -4deg; --fan-y: 14px; }
  .mem-slot:nth-child(2) { --fan-r: 0deg; --fan-y: 0px; }
  .mem-slot:nth-child(3) { --fan-r: 4deg; --fan-y: 14px; }
  .mem-slot:nth-child(4) { --fan-r: -2.5deg; --fan-y: 0px; }
  .mem-slot:nth-child(5),
  .mem-slot.mem-slot--pending { --fan-r: 5deg; --fan-y: 6px; }
}
@media (max-width: 639px) {
  .mem-hand {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.2rem 0.9rem;
    padding-top: 1.5rem;
  }
  .mem-slot {
    max-width: none;
  }
  .mem-slot:nth-child(odd) { --fan-r: -2deg; --fan-y: 0px; }
  .mem-slot:nth-child(even) { --fan-r: 2deg; --fan-y: 10px; }
  .mem-slot.mem-slot--pending {
    grid-column: 1 / -1;
    --fan-r: -1.5deg;
    --fan-y: 6px;
    width: min(100%, 420px);
    justify-self: center;
  }
  .mem-band__chord {
    gap: 0.3rem;
    justify-content: center;
  }
  .mem-band__chip {
    min-width: 0;
    padding: 0.3rem 0.4rem 0.35rem;
  }
  .mem-band__pitch {
    font-size: 0.8rem;
  }
  .mem-band__who {
    font-size: 0.75rem;
    letter-spacing: 0.02em;
  }
  .mem-band__btn {
    letter-spacing: 0.04em;
  }
  .mem-band__caption {
    flex-basis: 100%;
    max-width: 20rem;
    padding-left: 0;
    text-align: center;
  }
  .mem-band__caption::before {
    display: none;
  }
}

/* ============================================================== DIALOG */
.mem-dialog {
  --c: var(--mustard);
  --focus: var(--ink); /* paper dialog: ink ring */
  width: min(94vw, 980px);
  max-width: 94vw;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 var(--c), 18px 18px 0 var(--cream);
}
.mem-dialog.mem-dialog--custom {
  animation: none;
}
.mem-dialog.mem-dialog--gone,
.mem-dialog.mem-dialog--gone.is-closing {
  opacity: 0;
  animation: none;
}
.mem-dialog.mem-dialog--gone::backdrop {
  opacity: 0;
  animation: none;
}
.mem-dialog .vvv-dialog__close {
  float: none;
  margin: 0.75rem 0.75rem -3.5rem auto;
}
/* the close button floats over every color in the dialog (the hero in each
   member's color, then paper): an ink ring with a cream halo reads on all of them */
.mem-dialog .vvv-dialog__close:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 3px 3px 0 var(--ink), 0 0 0 9px var(--cream);
}
.mem-dialog .vvv-dialog__body {
  padding: 0;
}

/* morph: the card grows into the dialog (View Transitions) */
::view-transition-group(mem-pop) {
  animation-duration: 0.62s;
  animation-timing-function: cubic-bezier(0.3, 1.32, 0.5, 1);
}
::view-transition-old(mem-pop),
::view-transition-new(mem-pop) {
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}
::view-transition-old(mem-pop) {
  animation: mem-vt-out 0.26s ease-in both;
}
::view-transition-new(mem-pop) {
  animation: mem-vt-in 0.34s ease-out 0.06s both;
}
@keyframes mem-vt-out {
  to { opacity: 0; }
}
@keyframes mem-vt-in {
  from { opacity: 0; }
}

.mem-pro.is-from-next {
  animation: mem-in-next 0.42s var(--ease-out) both;
}
.mem-pro.is-from-prev {
  animation: mem-in-prev 0.42s var(--ease-out) both;
}
@keyframes mem-in-next {
  from { transform: translateX(40px); opacity: 0.3; }
}
@keyframes mem-in-prev {
  from { transform: translateX(-40px); opacity: 0.3; }
}

/* ---------- hero band: front of the card ---------- */
.mem-pro__hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  align-items: end;
  gap: clamp(1.25rem, 3.5vw, 2.75rem);
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.75rem) clamp(1.75rem, 4vw, 2.75rem);
  overflow: hidden;
  isolation: isolate;
  background: var(--c);
  border-bottom: 3px solid var(--ink);
}
.mem-pro__hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -50%;
  top: -100%;
  width: 200%;
  height: 300%;
  background: repeating-conic-gradient(
    from 0deg at 30% 62%,
    rgba(255, 246, 220, 0.32) 0deg 6deg,
    rgba(255, 246, 220, 0) 6deg 12deg
  );
}
.mem-pro__hero::after {
  /* 70s stripe band under the front */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: linear-gradient(180deg, var(--mustard) 0 25%, var(--orange) 25% 50%, var(--rust) 50% 75%, var(--brown) 75%);
  border-top: 3px solid var(--ink);
}
.mem-pro__portrait {
  position: relative;
  min-width: 0;
  transform: rotate(-2.5deg);
}
.mem-pro__portrait .mem-art {
  border-radius: var(--r-md);
  box-shadow: 7px 7px 0 var(--ink);
}
.mem-pro__portrait .mem-art__tag {
  font-size: max(12px, 4.4cqi);
}
.mem-pro__stamp {
  position: absolute;
  z-index: 5;
  right: -16%;
  bottom: -7%;
  font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  background: rgba(255, 240, 200, 0.3);
}
.mem-pro__stamp.is-thump {
  animation: mem-thump 0.45s var(--ease-bounce);
}
@keyframes mem-thump {
  0% { transform: rotate(var(--tilt)) scale(1.7); opacity: 0; }
  60% { transform: rotate(var(--tilt)) scale(0.94); opacity: 1; }
  100% { transform: rotate(var(--tilt)) scale(1); }
}
.mem-pro__intro {
  position: relative;
  z-index: 6; /* keep the text above Josh's PENDING stamp */
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  padding-bottom: 0.8rem;
}
.mem-pro__kicker {
  display: inline-flex;
  justify-self: start;
  padding: 0.35rem 0.65rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--ink);
  border-radius: 4px;
  transform: rotate(-1.5deg);
}
.mem-pro__name {
  font-size: clamp(3.4rem, 10vw, 7rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0.035em 0.035em 0 var(--cream), 0.07em 0.07em 0 var(--ink);
  padding-bottom: 0.1em;
  overflow-wrap: anywhere;
}
.mem-pro__title {
  font-family: var(--font-script);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1;
}
.mem-pro__role {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}
.mem-pro__plays {
  font-size: var(--fs-md);
  font-style: italic;
  line-height: 1.35;
}
.mem-pro__plays span {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border: 2px solid var(--ink);
  border-radius: 4px;
  margin-right: 0.2rem;
}

/* ---------- the back of the card ---------- */
.mem-pro__back {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.75rem);
}
.mem-pro__col {
  display: grid;
  align-content: start;
  gap: clamp(1.5rem, 3vw, 2rem);
  min-width: 0;
}
.mem-pro__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rust-ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.4rem;
  margin-bottom: 0.9rem;
}
.mem-pro__bio {
  font-size: var(--fs-md);
  line-height: 1.65;
}
.mem-pro__bio::first-letter {
  float: left;
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 900;
  font-size: 4.1rem;
  line-height: 0.8;
  padding: 0.4rem 0.55rem 0 0;
  color: var(--ink);
  text-shadow: 3px 3px 0 var(--c);
}

/* facts: handwritten liner notes */
.mem-facts__list {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0.4rem 1rem 0.6rem 2.6rem;
  list-style: none;
  position: relative;
  background:
    linear-gradient(90deg, transparent 1.9rem, rgba(204, 74, 43, 0.45) 1.9rem 2rem, transparent 2rem),
    repeating-linear-gradient(180deg, transparent 0 calc(2.1rem - 1px), rgba(63, 184, 168, 0.4) calc(2.1rem - 1px) 2.1rem),
    var(--cream);
  border-radius: 4px;
  box-shadow: 3px 3px 0 rgba(30, 20, 36, 0.18);
  transform: rotate(-0.6deg);
}
.mem-facts__list li {
  position: relative;
  font-family: var(--font-script);
  font-weight: 700;
  font-size: 1.42rem;
  line-height: 2.1rem;
}
.mem-facts__list li::before {
  content: "✶"; /* fallback for browsers without alt text */
  content: "✶" / ""; /* decorative: not read aloud */
  position: absolute;
  left: -2.1rem;
  top: 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--rust);
}

/* stats: scouting report */
.mem-stats__list {
  display: grid;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mem-stat__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.2rem 0.8rem;
  margin-bottom: 0.4rem;
  padding-right: 24%;
}
.mem-stat__label {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.mem-stat__val {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  line-height: 1.1;
  color: var(--rust-ink);
}
.mem-stat__bar {
  position: relative;
  display: block;
  height: 22px;
  margin-right: 24%;
  margin-bottom: 1.1rem;
}
.mem-stat__track {
  position: absolute;
  inset: 0;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(10% - 1.5px), rgba(30, 20, 36, 0.22) calc(10% - 1.5px) 10%),
    var(--cream);
}
.mem-stat__fill {
  position: absolute;
  left: -2px;
  top: -2px;
  bottom: -2px;
  width: calc(var(--v) * 10% + 4px);
  min-width: 0;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0 28%, rgba(255, 255, 255, 0) 28%),
    var(--c);
  transform-origin: 0 50%;
  animation: mem-fill 0.95s var(--ease-bounce) calc(0.3s + var(--k, 0) * 0.13s) both;
}
@keyframes mem-fill {
  from { transform: scaleX(0); }
}
.mem-stat__ticks {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 3px);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.mem-stat__ticks b {
  position: absolute;
  transform: translateX(-50%);
  font-weight: 700;
}
.mem-stat__ticks b:nth-child(1) { left: 6px; }
.mem-stat__ticks b:nth-child(2) { left: 50%; }
.mem-stat__ticks b:nth-child(3) { left: calc(100% - 8px); }

/* past 10: it breaks the scale */
.mem-stat.is-broke .mem-stat__track {
  border-right-style: dashed;
}
.mem-stat.is-broke .mem-stat__fill {
  border-radius: 999px 4px 4px 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0 28%, rgba(255, 255, 255, 0) 28%),
    repeating-linear-gradient(-45deg, var(--c) 0 8px, var(--rust) 8px 12px);
  clip-path: polygon(0 0, 96% 0, 100% 22%, 95% 40%, 100% 60%, 94% 78%, 100% 100%, 0 100%);
}
.mem-stat.is-broke .mem-stat__bar::after {
  /* the crack where the track used to end */
  content: "";
  position: absolute;
  left: calc(100% - 7px);
  top: -9px;
  width: 14px;
  height: 40px;
  background: var(--ink);
  clip-path: polygon(40% 0, 70% 0, 52% 30%, 80% 45%, 45% 70%, 62% 100%, 30% 100%, 44% 72%, 15% 50%, 46% 32%);
  animation: mem-pop-in 0.3s var(--ease-bounce) calc(0.85s + var(--k, 0) * 0.13s) both;
}
.mem-stat__burst {
  position: absolute;
  z-index: 2;
  top: 35%;
  left: calc(var(--v) * 10%);
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  margin: -2.2rem 0 0 -1.6rem;
  color: var(--ink);
  background: var(--mustard);
  clip-path: polygon(50% 0, 59% 15%, 75% 7%, 75% 25%, 93% 25%, 85% 41%, 100% 50%, 85% 59%, 93% 75%, 75% 75%, 75% 93%, 59% 85%, 50% 100%, 41% 85%, 25% 93%, 25% 75%, 7% 75%, 15% 59%, 0 50%, 15% 41%, 7% 25%, 25% 25%, 25% 7%, 41% 15%);
  transform: rotate(-12deg);
  animation: mem-burst 0.6s var(--ease-bounce) calc(1s + var(--k, 0) * 0.13s) both;
}
.mem-stat__burst span {
  max-width: 3.2rem;
  font-family: var(--font-hand);
  font-size: 0.68rem;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}
@keyframes mem-burst {
  0% { transform: rotate(-60deg) scale(0); }
  70% { transform: rotate(-4deg) scale(1.15); }
  100% { transform: rotate(-12deg) scale(1); }
}
@keyframes mem-pop-in {
  from { transform: scale(0); }
}

/* the member's note */
.mem-note {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 1.1rem;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: 4px 4px 0 var(--ink);
}
.mem-note__fork {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 900;
  font-size: 1.45rem;
  color: var(--ink);
  background: var(--c);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px rgba(255, 246, 220, 0.45);
}
.mem-note__text {
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.mem-note__text strong {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mem-note__btn {
  justify-self: start;
  min-height: 2.75rem;
}
.mem-note__wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 0.9rem;
}
.mem-note__wave i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--c);
}
.mem-note__wave i:nth-child(1),
.mem-note__wave i:nth-child(3) {
  height: 55%;
}
.mem-note.is-singing .mem-note__fork {
  animation: mem-wobble 0.18s ease-in-out 10 alternate;
}
.mem-note.is-singing .mem-note__wave i {
  animation: mem-eq 0.3s ease-in-out infinite alternate;
}
.mem-note.is-singing .mem-note__wave i:nth-child(2) {
  animation-delay: -0.15s;
}
@keyframes mem-wobble {
  from { transform: rotate(-5deg) scale(1.04); }
  to { transform: rotate(5deg) scale(1.04); }
}

/* ---------- Josh: committee minutes ---------- */
.mem-committee {
  margin: 0 clamp(1.25rem, 4vw, 2.75rem) clamp(1.75rem, 4vw, 2.75rem);
  padding: clamp(1rem, 3vw, 1.5rem);
  background:
    repeating-linear-gradient(180deg, transparent 0 25px, rgba(78, 38, 23, 0.08) 25px 26px),
    #e8d3a6;
  border: 2px dashed var(--ink);
  border-radius: var(--r-md);
}
.mem-committee__grid {
  display: grid;
  grid-template-columns: minmax(0, 270px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}
.mem-meter {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}
.mem-meter__face {
  padding: 0.7rem 0.7rem 0.2rem;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(244, 179, 60, 0.35), transparent 70%),
    var(--cream);
  border: 3px solid var(--ink);
  border-radius: 18px 18px 8px 8px;
  box-shadow: 4px 4px 0 var(--ink);
}
.mem-meter__svg {
  display: block;
  width: 100%;
  height: auto;
}
.mem-meter__zone {
  fill: none;
  stroke-width: 11;
}
.mem-meter__zone--a { stroke: var(--rust); }
.mem-meter__zone--b { stroke: var(--mustard); }
.mem-meter__zone--c { stroke: var(--teal); }
.mem-meter__ticks line {
  stroke: var(--ink);
  stroke-width: 2;
}
.mem-meter__end {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  fill: var(--ink);
}
.mem-meter__needle {
  transform-box: view-box;
  transform-origin: 100px 100px;
  transform: rotate(var(--a));
  animation: mem-needle 1.5s var(--ease-out) 0.35s both;
}
.mem-meter__needle path {
  stroke: var(--rust);
  stroke-width: 3.5;
  stroke-linecap: round;
}
.mem-meter__needle circle {
  fill: var(--ink);
}
@keyframes mem-needle {
  0% { transform: rotate(-90deg); }
  40% { transform: rotate(calc(var(--a) + 34deg)); }
  62% { transform: rotate(calc(var(--a) - 10deg)); }
  80% { transform: rotate(calc(var(--a) + 4deg)); }
  100% { transform: rotate(var(--a)); }
}
.mem-meter__read {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mem-meter__read strong {
  font-family: var(--font-hand);
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--rust-ink);
}
.mem-vote {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}
.mem-vote__motion {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 800;
  font-size: var(--fs-lg);
  line-height: 1.2;
}
.mem-vote__motion span {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust-ink);
}
.mem-vote__arena {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 0.75rem;
  min-height: 9.5rem;
  padding: 0.9rem;
  background:
    radial-gradient(circle, rgba(30, 20, 36, 0.12) 0 1px, transparent 1.5px) 0 0 / 10px 10px,
    var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
}
.mem-vote__btn {
  --btn-fg: var(--ink);
  --btn-bd: var(--ink);
  min-height: 2.9rem;
}
.mem-vote__btn--yes {
  --btn-bg: var(--teal);
  position: relative;
  z-index: 1;
  transition: transform 0.38s var(--ease-bounce), box-shadow 0.18s var(--ease-out);
}
.mem-vote__btn--yes.is-tired {
  --btn-bg: var(--paper-2);
}
.mem-vote__btn--no {
  --btn-fg: var(--cream);
}
.mem-vote__taunt {
  position: absolute;
  right: 0.9rem;
  bottom: 0.55rem;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--rust-ink);
  transform: rotate(-4deg);
  pointer-events: none;
}
.mem-vote__taunt.is-on {
  animation: mem-pop-in 0.35s var(--ease-bounce);
}
.mem-vote__result {
  min-height: 2.2rem;
  font-family: var(--font-hand);
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--ink);
}
.mem-vote__result.is-on {
  animation: mem-pop-in 0.4s var(--ease-bounce);
  transform-origin: 0 50%;
}

/* ---------- LISTEN ---------- */
.mem-listen {
  display: grid;
  gap: 1.1rem;
  padding: 0 clamp(1.25rem, 4vw, 2.75rem) clamp(1.75rem, 4vw, 2.75rem);
}
.mem-listen > .mem-pro__label {
  margin-bottom: 0;
}
.mem-deck {
  padding: 0.9rem 1.1rem 0.4rem;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: 4px 4px 0 var(--ink);
}
.mem-deck__title {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust-ink);
}
.mem-songs {
  display: grid;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}
.mem-song {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  padding: 0.75rem 0;
  border-top: 1.5px dashed rgba(30, 20, 36, 0.35);
}
.mem-song__tape {
  flex: none;
  color: var(--ink);
  transform: rotate(-4deg);
}
.mem-ico-tape {
  display: block;
  width: 46px;
  height: auto;
}
.mem-song__text {
  flex: 1 1 12rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* never wider than its slot, whatever the badge says */
  gap: 0.1rem;
  min-width: 0;
}
.mem-song__text strong {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.2;
}
.mem-song__rec {
  display: inline-block;
  margin-left: 0.55rem;
  padding: 0.12rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 0.2em;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  white-space: nowrap;
}
.mem-song__text span {
  font-size: var(--fs-sm);
  line-height: 1.4;
  color: var(--ink-soft);
}
.mem-song__play {
  --btn-bg: var(--c);
  --btn-fg: var(--ink);
  --btn-bd: var(--ink);
  flex: none;
  min-height: 2.75rem;
  box-shadow: 3px 3px 0 var(--ink);
}
@media (hover: hover) {
  .mem-song__play:hover {
    box-shadow: 5px 5px 0 var(--ink);
  }
}
.mem-song__tri {
  width: 0;
  height: 0;
  border-left: 9px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.mem-song__soon {
  flex: none;
  padding: 0.3rem 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 2px dashed var(--ink-soft);
  border-radius: 4px;
  transform: rotate(-3deg);
}
.mem-song.is-soon .mem-song__tape {
  opacity: 0.45;
}

/* the link-out: a record-shop divider card, with the record half out of the bin */
.mem-out {
  --focus: var(--cream); /* ink card: cream ring, clear of the mustard button */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  padding: 0.9rem 1.1rem;
  color: var(--cream);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 45%),
    var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: 4px 4px 0 var(--c);
}
.mem-out__disc {
  position: relative;
  flex: none;
  width: 3.4rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 20deg, rgba(255, 246, 220, 0) 0deg, rgba(255, 246, 220, 0.3) 28deg, rgba(255, 246, 220, 0) 60deg, rgba(255, 246, 220, 0) 180deg, rgba(255, 246, 220, 0.2) 208deg, rgba(255, 246, 220, 0) 240deg),
    repeating-radial-gradient(circle, #241b2c 0 2px, #3a2f45 2px 3px);
  box-shadow: 0 0 0 2px rgba(246, 230, 196, 0.75);
}
.mem-out__disc i {
  position: absolute;
  inset: 31%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ink) 0 13%, var(--c) 15%);
}
.mem-out__text {
  flex: 1 1 11rem;
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}
.mem-out__kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mustard);
}
.mem-out__text strong {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.2;
}
.mem-out__link {
  flex: none;
  min-height: 2.75rem;
  box-shadow: 4px 4px 0 var(--rust);
}
.mem-out__arrow {
  font-size: 1.05rem;
  line-height: 1;
}

/* ---------- prev / next ---------- */
.mem-nav {
  --focus: var(--mustard); /* dark bar: mustard ring */
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem clamp(0.75rem, 3vw, 1.5rem);
  color: var(--cream);
  background: var(--ink);
}
.mem-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.9rem;
  min-width: 0;
  padding: 0.35rem 0.95rem;
  color: var(--cream);
  background: none;
  border: 2px solid rgba(246, 230, 196, 0.3);
  border-radius: 999px;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.25s var(--ease-bounce);
}
@media (hover: hover) {
  .mem-nav__btn:hover {
    color: var(--ink);
    background: var(--c);
    border-color: var(--c);
  }
  .mem-nav__btn--prev:hover { transform: translateX(-3px); }
  .mem-nav__btn--next:hover { transform: translateX(3px); }
}
.mem-nav__arrow {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
}
.mem-nav__txt {
  display: grid;
  line-height: 1.05;
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 800;
  font-size: 1.05rem;
  text-align: left;
}
.mem-nav__btn--next .mem-nav__txt {
  text-align: right;
}
.mem-nav__txt small {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}
.mem-nav__dots {
  display: inline-flex;
  gap: 0.45rem;
}
.mem-nav__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  opacity: 0.4;
  transition: transform 0.3s var(--ease-bounce), opacity 0.2s;
}
.mem-nav__dots i.is-on {
  opacity: 1;
  transform: scale(1.5);
}

/* ---------- dialog: smaller screens ---------- */
@media (max-width: 760px) {
  .mem-pro__hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
  }
  .mem-pro__portrait {
    width: min(64%, 260px);
  }
  .mem-pro__back {
    grid-template-columns: minmax(0, 1fr);
  }
  .mem-committee__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .mem-meter {
    max-width: 280px;
  }
}
@media (max-width: 480px) {
  /* phones: the Play button drops under the song, so the text gets the full width */
  .mem-song {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.55rem 0.75rem;
  }
  .mem-song__tape {
    margin-top: 0.3rem;
  }
  .mem-song__play,
  .mem-song__soon {
    grid-column: 2;
    justify-self: start;
  }
  .mem-ico-tape {
    width: 34px;
  }
  .mem-song__more {
    display: none;
  }
  .mem-song__play {
    padding-inline: 1rem;
  }
  .mem-song__rec {
    margin-left: 0;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    white-space: normal;
  }
  .mem-song__text strong {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.4rem;
  }
  .mem-out {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem 0.9rem;
  }
  .mem-out__disc {
    width: 2.6rem;
  }
  .mem-out__link {
    grid-column: 2;
    justify-self: start;
  }
}
@media (max-width: 360px) {
  /* the narrowest phones: the button takes the whole width, so it stays on one line */
  .mem-out__link {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .mem-nav__dots {
    display: none;
  }
  .mem-nav__btn {
    padding-inline: 0.75rem;
  }
  .mem-nav__txt small {
    font-size: 0.75rem;
  }
  .mem-stat__head {
    padding-right: 28%;
  }
  .mem-stat__bar {
    margin-right: 28%;
  }
}

/* ---------- landscape phones: short screens ---------- */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 640px) {
  /* the whole hand in one row, like the desktop fan */
  .mem-hand {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start; /* each card keeps its own height */
    gap: 1rem var(--mem-gap);
    padding: 1.75rem clamp(0px, 2vw, 16px) 1rem;
  }
  .mem-slot {
    flex: 1 1 0;
    max-width: 190px;
  }
  .mem-slot:nth-child(1) { --fan-r: -4deg; --fan-y: 18px; }
  .mem-slot:nth-child(2) { --fan-r: -2deg; --fan-y: 5px; }
  .mem-slot:nth-child(3) { --fan-r: 0.5deg; --fan-y: 0px; }
  .mem-slot:nth-child(4) { --fan-r: 2deg; --fan-y: 5px; }
  .mem-slot:nth-child(5),
  .mem-slot.mem-slot--pending { --fan-r: 4.5deg; --fan-y: 20px; }
  .mem-band {
    margin-top: 1.75rem;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  /* the profile: a small portrait beside the name, so the first view has words in it */
  .mem-dialog {
    max-height: 94vh;
    max-height: 94dvh;
  }
  .mem-pro__hero {
    grid-template-columns: min(26vw, 42vh) minmax(0, 1fr);
    align-items: center;
    gap: 1.25rem;
    padding: 0.9rem 4.25rem 1.6rem 1.25rem;
  }
  .mem-pro__portrait {
    width: auto;
  }
  .mem-pro__portrait .mem-art {
    box-shadow: 5px 5px 0 var(--ink);
  }
  .mem-pro__stamp {
    font-size: 1.15rem;
  }
  .mem-pro__intro {
    gap: 0.3rem;
    padding-bottom: 0.3rem;
  }
  .mem-pro__name {
    font-size: clamp(2.3rem, 14vh, 4rem);
  }
  .mem-pro__title {
    font-size: clamp(1.3rem, 7.5vh, 1.8rem);
  }
  .mem-pro__plays {
    font-size: var(--fs-sm);
  }
  .mem-nav {
    padding-block: 0.3rem;
  }
  .mem-nav__btn {
    min-height: 2.6rem;
    padding-block: 0.15rem;
  }
  .mem-nav__txt small {
    display: none;
  }
}

/* ---------- looping bits rest when nobody can see them ---------- */
.mem-root--off *,
html.has-dialog .mem-root * {
  animation-play-state: paused !important;
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .mem-slot,
  .mem-card,
  .mem-card__record,
  .mem-card__carbon,
  .mem-art__rays {
    transition: none;
  }
  .mem-hand.is-stacked .mem-slot {
    transform: translateY(var(--fan-y)) rotate(var(--fan-r));
  }
  .mem-card__sheen::after,
  .mem-card__eq i,
  .mem-slot.is-on-air .mem-card__label,
  .mem-band.is-playing .mem-band__pipe i,
  .mem-slot.is-singing .mem-card__face,
  .mem-note.is-singing .mem-note__fork,
  .mem-note.is-singing .mem-note__wave i {
    animation: none;
    transition: none;
  }
  .mem-slot.is-singing .mem-card {
    --lift: 0px;
  }
}
