#farewell {
  margin-block: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1rem, 3vw, 2.5rem);
  color: #fff0eb;
  background: radial-gradient(ellipse at 50% 100%, #562540, transparent 70%), #1d1626;
  border: 1px solid #f9a6aa47;
  border-radius: 1rem;
}
.farewell[hidden], .farewell-controls button[hidden] { display: none; }
.farewell-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: .7rem 1rem;
}
.farewell-kicker { color: #ffb5b1; font-size: .72rem; font-weight: 750; letter-spacing: .18em; }
.farewell-heading h2 { margin: .25rem 0 0; font-size: clamp(1.15rem, 3vw, 1.8rem); line-height: 1.25; }
.farewell-controls { display: flex; gap: .35rem; flex-wrap: wrap; }
.farewell-controls button {
  color: inherit;
  background: #2f2033;
  border: 1px solid #ffb5b16b;
  border-radius: .45rem;
  padding: .45rem .65rem;
  min-height: 36px;
  cursor: pointer;
  font: inherit;
  font-size: .8rem;
}
.farewell-controls button:hover, .farewell-controls button:focus-visible { background: #623450; }

.farewell-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  container-type: inline-size;
  margin-top: .85rem;
  overflow: hidden;
  border: 1px solid #f9a6aa35;
  border-radius: .7rem;
  background: #181422;
}
.farewell-stage::before {
  content: "";
  position: absolute;
  inset: -12px;
  background: url("./assets/farewell-los-santos-sunset.webp") center / cover no-repeat;
  opacity: .48;
  filter: blur(5px);
  pointer-events: none;
}

#farewell:is(:fullscreen, .farewell-expanded) {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: .85rem;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
}
#farewell.farewell-expanded {
  position: fixed;
  inset: 0;
  z-index: 10000;
  height: 100dvh;
}
html:has(#farewell.farewell-expanded) { overflow: hidden; }
#farewell:is(:fullscreen, .farewell-expanded) .farewell-screen {
  display: grid;
  place-items: center;
  container-type: size;
}
#farewell:is(:fullscreen, .farewell-expanded) .farewell-stage {
  box-sizing: border-box;
  width: min(100cqw, calc(100cqh * 16 / 9));
  margin: 0;
  --farewell-font-size: clamp(1.1rem, 2.65cqw, 3rem);
}

.farewell-cloud {
  position: absolute;
  inset: 0;
}
.farewell-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: .42em;
  width: max-content;
  max-width: min(54%, 45rem);
  margin: 0;
  color: #fff5ed;
  font-size: calc(var(--farewell-font-size, clamp(.9rem, 1.9cqw, 1.65rem)) * var(--farewell-size, 1));
  font-weight: 750;
  line-height: 1.3;
  text-align: start;
  text-shadow: 0 1px 4px #150b1c, 0 0 12px #170a1c;
  overflow-wrap: anywhere;
}
.farewell-avatar {
  flex: none;
  width: 1.55em;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #3c2542 url("./assets/farewell-portraits-48.webp") no-repeat;
  background-size: 800% 600%;
  box-shadow: 0 0 0 1px #fff0eaa6, 0 2px 5px #160b1c;
}
.farewell-text { min-width: 0; }
.farewell-player {
  margin-inline-start: .45em;
  color: #ead6e5;
  font-size: .7em;
  font-weight: 650;
}
.farewell-player::before { content: "— "; }
@supports (background-clip: text) {
  .farewell-quote {
    background: linear-gradient(108deg, var(--farewell-color-start), #fff7ee 48%, var(--farewell-color-end));
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 1px 2px #170a1c) drop-shadow(0 0 5px #170a1c);
  }
}
@container (max-width: 600px) {
  .farewell-message { max-width: 72%; }
}
