@font-face {
  font-family: 'Spotlight Bangers';
  src: url('/assets/site/spotlight-house/Bangers.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Sour Crunch';
  src: url('/assets/site/spotlight-house/sour-crunch.otf') format('opentype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Browood';
  src: url('/assets/site/spotlight-house/browood-regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
/* Two fixed, centered rows keep each housemate in the same place all season. */
.cast-grid {
  --wall-gap: clamp(3px, 1.2vw, 12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 770px;
  margin-inline: auto;
  padding-top: 6px;
}
.cast-row {
  display: flex;
  justify-content: center;
  gap: var(--wall-gap);
  width: 100%;
}
.cast-row .cast-card {
  --poster-color: #fbd631;
  position: relative;
  flex: 0 0 calc((100% - 6 * var(--wall-gap)) / 7);
  width: calc((100% - 6 * var(--wall-gap)) / 7);
  max-width: 98px;
  min-width: 0;
  text-align: center;
  transition: transform 160ms ease, filter 160ms ease;
}
.cast-row a.cast-card { display: block; color: inherit; text-decoration: none; }
.cast-row .cast-card:hover { z-index: 3; transform: translateY(-4px) rotate(-1deg); filter: drop-shadow(2px 4px 2px #0004); }
.cast-row .cast-card.is-empty { --poster-color: #ded4b0; }
.cast-row .cast-card.is-empty:hover { z-index: auto; transform: none; filter: none; }
.cast-row .is-empty .empty-seat-mark { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; color: #8c805f; font: 400 clamp(22px, 4vw, 44px)/1 'Spotlight Bangers', Impact, sans-serif; }
.cast-row .is-empty .cast-name { background: #e8dfc3; color: #756b50; }
@media (prefers-reduced-motion: reduce) {
  .cast-row .cast-card { transition: none; }
  .cast-row .cast-card:hover { transform: none; }
}
.cast-row .cast-card::before,
.cast-row-top .cast-card:nth-child(2)::after,
.cast-row-bottom .cast-card:nth-child(4)::after {
  content: '';
  position: absolute;
  z-index: 2;
  top: 4%;
  left: 50%;
  width: 31%;
  aspect-ratio: 4.8 / 1;
  pointer-events: none;
  transform: translateX(-50%);
  background: repeating-linear-gradient(90deg, #ffffff15 0 1px, transparent 1px 4px), linear-gradient(165deg, #f3e6c9, #d7c094);
  clip-path: polygon(3% 0, 99% 3%, 96% 21%, 100% 43%, 96% 62%, 99% 83%, 96% 100%, 1% 96%, 4% 78%, 0 57%, 4% 37%, 1% 17%);
  filter: drop-shadow(0 2px 1px #0006);
}
.cast-row-top .cast-card:nth-child(2)::before,
.cast-row-top .cast-card:nth-child(5)::before,
.cast-row-bottom .cast-card:nth-child(1)::before,
.cast-row-bottom .cast-card:nth-child(4)::before,
.cast-row-bottom .cast-card:nth-child(6)::before {
  left: auto;
  right: 6%;
  transform: rotate(13deg);
}
.cast-row-top .cast-card:nth-child(3)::before,
.cast-row-bottom .cast-card:nth-child(2)::before,
.cast-row-bottom .cast-card:nth-child(7)::before {
  left: 6%;
  right: auto;
  transform: rotate(-13deg);
}
.cast-row-top .cast-card:nth-child(2)::after,
.cast-row-bottom .cast-card:nth-child(4)::after {
  left: 6%;
  right: auto;
  transform: rotate(-13deg);
}
.cast-row .poster-frame { position: relative; width: 100%; }
.cast-row :is(.hoh-badge, .nom-badge, .win-badge) {
  position: absolute;
  z-index: 3;
  width: 55%;
  height: auto;
  pointer-events: none;
}
.cast-row :is(.hoh-badge, .nom-badge).corner-top-left { top: -7%; left: -12%; }
.cast-row .win-badge.top-center { top: -7%; left: 50%; transform: translateX(-50%); }
.cast-row .placement-badge {
  position: absolute;
  z-index: 3;
  top: -7%;
  right: -12%;
  width: 55%;
  pointer-events: none;
}
.cast-row .placement-badge img { display: block; width: 100%; height: auto; }
.cast-row .placement-text {
  position: absolute;
  /* Center on the filled speech bubble, not on the surrounding dots/tail. */
  top: 44%;
  left: 55%;
  display: inline-flex;
  align-items: flex-start;
  gap: .04em;
  transform: translate(-50%, -50%);
  color: #153448;
  font: 400 clamp(5px, 1.2vw, 13px)/1 'Browood', 'Spotlight Bangers', Impact, sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
  -webkit-text-stroke: .35px #153448;
  paint-order: stroke fill;
  text-shadow: .7px .8px 0 #b1eee0;
}
.cast-row .placement-suffix {
  position: relative;
  top: .02em;
  font: 400 .48em/1 'Browood', 'Spotlight Bangers', Impact, sans-serif;
  text-transform: none;
  vertical-align: baseline;
}
.cast-row .portrait {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 2px solid #171717;
  border-radius: 1px;
  background: transparent;
  box-shadow: 3px 3px 0 #171717;
}
.cast-row .portrait::before {
  content: '';
  position: absolute;
  inset: 7%;
  z-index: 0;
  pointer-events: none;
  border: 2px solid #171717;
  background-color: var(--poster-color);
  background-image: radial-gradient(circle, #0003 37%, transparent 40%);
  background-size: 9px 9px;
}
.cast-row .portrait::after {
  content: '';
  position: absolute;
  inset: calc(7% + 2px);
  z-index: 0;
  pointer-events: none;
  background-color: var(--poster-color);
  background-image: radial-gradient(circle, #0003 28%, transparent 32%);
  background-size: 5px 5px;
  clip-path: polygon(0 8%, 100% 43%, 100% 92%, 0 57%);
}
.cast-row .portrait img {
  position: absolute;
  inset: calc(7% + 2px);
  z-index: 1;
  display: block;
  width: calc(86% - 4px);
  height: calc(86% - 4px);
  object-fit: contain;
  object-position: center bottom;
  opacity: 1;
}
.cast-row .cast-name {
  width: 100%;
  min-width: 0;
  margin-top: 6px;
  padding: 3px 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1.5px solid #171717;
  border-radius: 2px;
  background: #ffed35;
  box-shadow: 2px 2px 0 #171717;
  color: #151515;
  font-family: 'Browood', 'Spotlight Bangers', Impact, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .35px;
  line-height: 1.1;
  text-transform: uppercase;
}
.cast-row .cast-role {
  min-height: 1.4em;
  margin-top: 4px;
  color: #1d1d1d;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}
.cast-row .cast-card.is-leader { --poster-color: #2b9eb3; }
.cast-row .cast-card.is-nominee,
.cast-row .cast-card.is-audience { --poster-color: #f8333c; }
.cast-row .cast-card.is-out { --poster-color: #999; }
.cast-row .cast-card.is-leader .portrait,
.cast-row .cast-card.is-nominee .portrait,
.cast-row .cast-card.is-audience .portrait,
.cast-row .cast-card.is-out .portrait { border-color: #171717; box-shadow: 3px 3px 0 #171717; filter: none; opacity: 1; }
.cast-row .cast-card.is-out .portrait img { filter: grayscale(1); }
.cast-row .cast-card.is-leader .cast-name { background: #2b9eb3; }
.cast-row .cast-card.is-nominee .cast-name,
.cast-row .cast-card.is-audience .cast-name { background: #f8333c; }
.cast-row .cast-card.is-leader .cast-name,
.cast-row .cast-card.is-nominee .cast-name,
.cast-row .cast-card.is-audience .cast-name { color: #fff3cf; -webkit-text-stroke: .7px #171717; paint-order: stroke fill; text-shadow: none; }
.cast-row .cast-card.is-out .cast-name { background: #d4d4d4; }
@media (max-width: 600px) {
  .cast-grid { gap: 9px; }
  .cast-row .cast-name { font-size: clamp(7px, 2.1vw, 11px); padding-inline: 1px; }
  .cast-row .cast-role { font-size: clamp(6px, 1.7vw, 9px); overflow-wrap: anywhere; }
}
