.streamer-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  padding: 3px 10px 3px 5px;
  color: var(--card-text);
  border: 1px solid #735499;
  border-radius: 9px;
  background: #21182d;
  text-align: start;
}

.streamer-profile-trigger:hover,
.streamer-profile-trigger[aria-expanded="true"] {
  border-color: #b68bf2;
  background: #2a1d3a;
}

.streamer-profile-trigger .post-avatar {
  border: 1px solid #ac85df;
}

.streamer-profile-chevron {
  flex: 0 0 6px;
  height: 6px;
  margin: -3px 2px 0 3px;
  border: solid #ddc7f5;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.streamer-profile {
  position: fixed;
  inset: var(--profile-top, 12px) auto auto var(--profile-left, 12px);
  width: min(442px, calc(100% - 24px));
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: #f9f7fb;
}

.streamer-profile::backdrop {
  background: #09060e30;
}

.streamer-profile::before {
  position: absolute;
  top: -6px;
  left: var(--profile-arrow, 50%);
  width: 12px;
  height: 12px;
  border: solid #8c73a3;
  border-width: 1px 0 0 1px;
  background: #31213f;
  transform: translateX(-50%) rotate(45deg);
  content: "";
}

.streamer-profile.above-trigger::before {
  top: auto;
  bottom: -6px;
  background: #1b1622;
  transform: translateX(-50%) rotate(225deg);
}

.streamer-profile-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  border: 1px solid #8c73a3;
  border-radius: 18px;
  background: radial-gradient(ellipse at 85% 0%, #39254c 0, transparent 65%), linear-gradient(145deg, #201929, #19161f);
  box-shadow: 0 22px 65px #07040cda;
}

.streamer-profile-heading {
  display: grid;
  flex: none;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 0;
}

.streamer-profile-heading > span {
  color: var(--card-yellow, #f6d906);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: .13em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.streamer-profile-heading button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #785f8b;
  border-radius: 50%;
  color: #f9edf9;
  background: #ffffff0a;
  font-size: 24px;
  line-height: 1;
}

.streamer-profile-heading button:hover {
  background: #ffffff16;
}

.streamer-profile-body {
  min-height: 0;
  padding: 14px 20px 20px;
  overflow: auto;
  overscroll-behavior: contain;
}

.streamer-profile-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.streamer-profile-identity > div {
  min-width: 0;
}

.streamer-profile-identity .post-avatar {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border: 2px solid #bc97f3;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #a66aff29;
}

.streamer-profile-identity .post-avatar.author-initials {
  font-size: 22px;
}

.streamer-profile-identity h2 {
  margin: 0;
  font-size: 36px;
  font-weight: 810;
  letter-spacing: -.047em;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.streamer-profile-identity p,
.streamer-profile-bio {
  margin: 5px 0 0;
  color: #c5b5d5;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.streamer-profile-bio {
  margin: 17px 0 0;
  color: #e6dce9;
  font-size: 15px;
  line-height: 1.45;
}

.streamer-profile-channels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid #5b476d;
}

.streamer-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid #5c4c6c;
  border-radius: 10px;
  color: #f7f3fb;
  background: #2a2235;
  font-size: 14px;
  text-decoration: none;
}

.streamer-channel:hover {
  border-color: #ba91fa;
  background: #312640;
}

.streamer-channel strong {
  font-weight: 690;
  overflow-wrap: anywhere;
}

.streamer-channel-icon {
  position: relative;
  display: grid;
  flex: 0 0 27px;
  place-items: center;
  height: 27px;
  border-radius: 7px;
  color: #fff;
}

.twitch .streamer-channel-icon {
  padding-bottom: 5px;
  background: #6532b4;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 70% 74%, 54% 95%, 47% 95%, 47% 74%, 0 74%);
}

.twitch .streamer-channel-icon::before {
  width: 2px;
  height: 8px;
  background: currentColor;
  box-shadow: 5px 0;
  transform: translateX(-2.5px);
  content: "";
}

.instagram .streamer-channel-icon {
  background: #67374f;
  color: #ffe2ee;
}

.instagram .streamer-channel-icon::before {
  width: 15px;
  height: 15px;
  border: 1.5px solid;
  border-radius: 4px;
  content: "";
}

.instagram .streamer-channel-icon::after {
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1.5px solid;
  border-radius: 50%;
  box-shadow: 4px -4px 0 -2px;
  content: "";
}

.youtube .streamer-channel-icon {
  background: #873544;
}

.youtube .streamer-channel-icon::before {
  border-block: 5px solid transparent;
  border-left: 8px solid;
  transform: translateX(1px);
  content: "";
}

.tiktok .streamer-channel-icon {
  background: #263941;
}

.tiktok .streamer-channel-icon::before {
  font: 750 19px/1 system-ui, sans-serif;
  text-shadow: -1px 0 #4fdbd6, 1px 1px #ec528a;
  content: "♪";
}

.streamer-channel-external {
  position: relative;
  flex: 0 0 12px;
  height: 12px;
  margin-left: auto;
  color: #c7b3da;
}

.streamer-channel-external::before {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 7px;
  height: 7px;
  border: solid;
  border-width: 1.5px 1.5px 0 0;
  content: "";
}

.streamer-channel-external::after {
  position: absolute;
  top: 5px;
  width: 12px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(-45deg);
  content: "";
}

@media (max-width: 699px) {
  .collectible-rank-heading .streamer-profile-author { flex-basis: 100%; }
  .streamer-profile-trigger {
    appearance: none;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 12px;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    padding: 5px 10px 5px 7px;
    border-color: #4b474f;
    background: #29282d;
  }
  .streamer-profile-trigger:hover,
  .streamer-profile-trigger[aria-expanded="true"] {
    border-color: #a388bf;
    background: #353139;
  }
  .streamer-profile-trigger strong {
    min-width: 0;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .streamer-profile-chevron {
    justify-self: center;
    width: 7px;
    height: 7px;
    margin-inline: 0;
  }

  body:has(.streamer-profile[open]) { overflow: hidden; }
  .streamer-profile {
    --profile-top-gap: max(10px, env(safe-area-inset-top, 0px));
    --profile-bottom-gap: max(10px, env(safe-area-inset-bottom, 0px));
    inset: auto max(10px, env(safe-area-inset-right, 0px)) var(--profile-bottom-gap) max(10px, env(safe-area-inset-left, 0px));
    width: auto;
  }
  .streamer-profile::before { display: none; }
  .streamer-profile::backdrop { background: #09060e62; }
  .streamer-profile-content {
    max-height: calc(100vh - var(--profile-top-gap) - var(--profile-bottom-gap));
    max-height: calc(100dvh - var(--profile-top-gap) - var(--profile-bottom-gap));
  }
  .streamer-profile-heading {
    padding: 10px 13px 8px;
    border-bottom: 1px solid #5b476d;
  }
  .streamer-profile-body { padding: 14px 13px; }
  .streamer-profile-identity .post-avatar { width: 60px; height: 60px; }
  .streamer-profile-identity h2 { font-size: 31px; }
  .streamer-profile-bio { font-size: 14px; }
  .streamer-profile-channels { gap: 7px; }
  .streamer-channel { gap: 6px; padding: 6px 7px; font-size: 13px; }
  .streamer-channel-icon { flex-basis: 25px; height: 25px; }
}

@media (max-width: 699px) and (prefers-reduced-motion: no-preference) {
  .streamer-profile[open] { animation: streamer-profile-slide 220ms ease-out; }
  @keyframes streamer-profile-slide {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
