.streamer-profile-enabled .streamer-card { cursor: pointer; }

html.streamer-profile-open {
  overflow: hidden;
}

.streamer-profile-layer[hidden] {
  display: none;
}

.streamer-profile-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.streamer-profile-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(15, 17, 22, .46);
  cursor: default;
}

.streamer-profile-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(580px, 94vw);
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  color: var(--text, #17191f);
  box-shadow: -18px 0 50px rgba(0, 0, 0, .18);
  outline: none;
}

.streamer-profile-topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 68px;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #e7e8eb;
  backdrop-filter: blur(12px);
}

.streamer-profile-topbar p {
  margin: 0 0 3px;
  color: #777b84;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.streamer-profile-topbar h2 {
  margin: 0;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

.streamer-profile-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f0f1f3;
  color: #1f2229;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.streamer-profile-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 1;
  min-height: 120px;
  overflow: hidden;
  background: var(--profile-banner-fallback, #e5e7eb);
}

.streamer-profile-banner img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.streamer-profile-identity {
  position: relative;
  margin: -30px 22px 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.streamer-profile-avatar {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #f2f3f5;
  font-size: 28px;
  font-weight: 800;
}

.streamer-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.streamer-profile-name {
  min-width: 0;
  padding: 36px 0 2px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.streamer-profile-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
}

.streamer-profile-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #777b84;
  font-size: 12px;
}

.streamer-profile-providers {
  margin-bottom: 4px;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.streamer-profile-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: #b51c39;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

.streamer-profile-provider--twitch {
  background: #6441a5;
}

.streamer-profile-provider:hover {
  filter: brightness(1.15);
}

.streamer-profile-provider.is-active {
  box-shadow: 0 0 0 2px #2a2f38, 0 1px 4px rgba(0, 0, 0, .3);
}

.streamer-profile-provider:not(.is-active) {
  opacity: .65;
}

.streamer-profile-provider:not(.is-active):hover {
  opacity: 1;
}

.streamer-profile-section {
  margin: 28px 22px 0;
}

.streamer-profile-section-head {
  margin-bottom: 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.streamer-profile-section-head h3 {
  margin: 0;
  font-size: 17px;
}

.streamer-profile-section-head p {
  margin: 3px 0 0;
  color: #7b7f88;
  font-size: 11px;
}

.streamer-profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.streamer-profile-stats > div {
  padding: 15px 16px;
  display: flex;
  align-items: baseline;
  gap: 7px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
}

.streamer-profile-stats strong {
  font-size: 24px;
  line-height: 1;
}

.streamer-profile-stats span {
  color: #777b84;
  font-size: 12px;
}

.streamer-profile-heatmap {
  display: grid;
  grid-template-columns: 58px repeat(7, minmax(24px, 1fr));
  gap: 5px;
  align-items: center;
}

.streamer-profile-weekday,
.streamer-profile-slot-label {
  color: #6f737c;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.streamer-profile-slot-label {
  text-align: right;
  padding-right: 4px;
}

.streamer-profile-heat-cell {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  min-height: 26px;
  border: 1px solid rgba(0,0,0,.035);
  border-radius: 5px;
  background: #f1f2f4;
}

.streamer-profile-heat-cell.level-1,
.streamer-profile-heat-legend .level-1 { background: #fff6cc; }
.streamer-profile-heat-cell.level-2,
.streamer-profile-heat-legend .level-2 { background: #ffe680; }
.streamer-profile-heat-cell.level-3,
.streamer-profile-heat-legend .level-3 { background: #ffc233; }
.streamer-profile-heat-cell.level-4,
.streamer-profile-heat-legend .level-4 { background: #ff9f0a; }

.streamer-profile-heat-legend {
  margin: 10px 0 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  color: #858991;
  font-size: 10px;
}

.streamer-profile-heat-legend i {
  width: 13px;
  height: 13px;
  border-radius: 3px;
}

.streamer-profile-summary {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f7f8;
  color: #50545d;
  font-size: 12px;
}

.streamer-profile-summary b {
  color: #22262e;
}

.streamer-profile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.streamer-profile-category-tag {
  padding: 7px 11px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2b3440;
  font-size: 12px;
  font-weight: 700;
}

.streamer-profile-characters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.streamer-profile-characters span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f2f4;
  font-size: 12px;
  font-weight: 700;
}

.streamer-profile-empty,
.streamer-profile-note,
.streamer-profile-channel-id {
  color: #7b7f88;
  font-size: 11px;
}

.streamer-profile-note {
  margin: 28px 22px 36px;
  line-height: 1.7;
}

.streamer-profile-loading,
.streamer-profile-error {
  margin: 34px 22px;
  padding: 18px;
  border-radius: 12px;
  background: #f6f7f8;
  color: #656a74;
  font-size: 13px;
}

.streamer-profile-error strong {
  color: #252932;
}

.streamer-profile-error p {
  margin: 5px 0 0;
}

.streamer-profile-channel-id {
  margin: 0 22px;
  word-break: break-all;
}

@media (max-width: 720px) {
  .streamer-profile-backdrop {
    display: none;
  }

  .streamer-profile-drawer {
    width: 100vw;
    max-width: none;
    box-shadow: none;
  }

  .streamer-profile-banner {
    min-height: 98px;
  }

  .streamer-profile-identity {
    margin-left: 16px;
    margin-right: 16px;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
  }

  .streamer-profile-providers {
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin: 0 0 4px;
  }

  .streamer-profile-avatar {
    width: 68px;
    height: 68px;
  }

  .streamer-profile-name {
    padding-top: 32px;
  }

  .streamer-profile-name strong {
    font-size: 17px;
  }

  .streamer-profile-section {
    margin-left: 16px;
    margin-right: 16px;
  }

  .streamer-profile-heatmap {
    grid-template-columns: 46px repeat(7, minmax(21px, 1fr));
    gap: 4px;
  }

  .streamer-profile-heat-cell {
    min-height: 24px;
    border-radius: 4px;
  }

  .streamer-profile-note {
    margin-left: 16px;
    margin-right: 16px;
  }
}
