/* Owner streamer mark + profile platform row (live / ladder).
   Mark: live-dot + mic glyph (roster) / mic+waveform (profile) +「主播」.
   Accent: site amber/orange — not purple glow, not sticker pile, not Wi-Fi arcs. */

.streamer-mark {
  --sm-accent: #ffaa3c;
  --sm-accent-soft: rgba(255, 170, 60, 0.16);
  --sm-accent-line: rgba(255, 170, 60, 0.38);
  --sm-ink: rgba(255, 214, 160, 0.95);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  max-width: 100%;
  padding: 0 3px 0 2px;
  border-radius: 3px;
  border: 1px solid var(--sm-accent-line);
  background:
    linear-gradient(135deg, rgba(255, 106, 0, 0.14), transparent 62%),
    var(--sm-accent-soft);
  color: var(--sm-ink);
  font-family: Sora, system-ui, sans-serif;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.streamer-mark-live {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ff6a00;
  box-shadow: 0 0 0 0 rgba(255, 106, 0, 0.45);
  animation: streamer-live-pulse 2.4s ease-out infinite;
}

.streamer-mark-glyph {
  display: block;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  opacity: 0.94;
}

.streamer-mark-wave {
  transform-origin: center bottom;
}

.streamer-mark-lbl {
  transform: translateY(0.5px);
  margin-left: 0;
}

.streamer-mark.is-md {
  font-size: 9.5px;
  padding: 1px 4px 1px 3px;
  gap: 2px;
  letter-spacing: 0.05em;
}
.streamer-mark.is-md .streamer-mark-glyph {
  width: 11px;
  height: 11px;
}
.streamer-mark.is-md .streamer-mark-live {
  width: 4px;
  height: 4px;
}

.streamer-mark.is-lg {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  padding: 2px 5px 2px 4px;
  gap: 3px;
  border-radius: 4px;
}
.streamer-mark.is-lg .streamer-mark-glyph {
  width: 12px;
  height: 12px;
}
.streamer-mark.is-lg .streamer-mark-live {
  width: 4px;
  height: 4px;
}

@keyframes streamer-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 106, 0, 0.42); }
  70% { box-shadow: 0 0 0 5px rgba(255, 106, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 106, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .streamer-mark-live { animation: none; }
}

/* Name cells: keep fade/ellipsis on .who-text; mark stays crisp + tight after name. */
.ladder-who:has(.streamer-mark),
.lead-who:has(.streamer-mark) {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
}

.ladder-who .who-text,
.lead-who .who-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.35em), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 1.35em), transparent 100%);
}

.nick:has(.streamer-mark) {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: min(58vw, 260px);
  overflow: visible;
  text-overflow: unset;
}

.nick .who-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-row .rn:has(.streamer-mark),
.roster-row .rn.with-streamer {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.roster-row .who-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Profile drawer title — mark sits tight after display name */
.modal-head h3.has-streamer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 8px;
}

.modal-head h3.has-streamer .profile-title-name {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Profile platform jump row */
.streamer-platforms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  /* profile-body already pads 16px — only bottom gap here */
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 170, 60, 0.16);
  background:
    linear-gradient(120deg, rgba(255, 106, 0, 0.07), transparent 55%),
    rgba(255, 255, 255, 0.025);
}

.streamer-platforms-kicker {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 170, 60, 0.72);
  font-family: Sora, system-ui, sans-serif;
}

.streamer-platforms-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.streamer-plat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 16, 0.55);
  color: rgba(235, 240, 248, 0.9);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.streamer-plat:hover,
.streamer-plat:focus-visible {
  border-color: rgba(255, 170, 60, 0.45);
  color: #ffe0b0;
  background: rgba(255, 170, 60, 0.1);
  outline: none;
}

.streamer-plat-ico {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: currentColor;
  opacity: 0.85;
  /* Masked brand glyphs */
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

.streamer-plat[data-plat="douyin"] .streamer-plat-ico {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16.6 5.82s.51.5 0 0A4.278 4.278 0 0 1 15.54 3h-3.09v12.4a2.592 2.592 0 0 1-2.59 2.5c-1.42 0-2.6-1.16-2.6-2.6 0-1.72 1.66-3.01 3.37-2.48V9.66c-3.45-.46-6.47 2.22-6.47 5.64 0 3.33 2.76 5.7 5.69 5.7 3.14 0 5.69-2.55 5.69-5.7V9.01a7.35 7.35 0 0 0 4.3 1.38V7.3s-1.88.09-3.24-1.48z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16.6 5.82s.51.5 0 0A4.278 4.278 0 0 1 15.54 3h-3.09v12.4a2.592 2.592 0 0 1-2.59 2.5c-1.42 0-2.6-1.16-2.6-2.6 0-1.72 1.66-3.01 3.37-2.48V9.66c-3.45-.46-6.47 2.22-6.47 5.64 0 3.33 2.76 5.7 5.69 5.7 3.14 0 5.69-2.55 5.69-5.7V9.01a7.35 7.35 0 0 0 4.3 1.38V7.3s-1.88.09-3.24-1.48z'/%3E%3C/svg%3E");
}

.streamer-plat[data-plat="bilibili"] .streamer-plat-ico {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17.813 4.653h.854c1.51.054 2.769.578 3.773 1.574 1.004.995 1.524 2.249 1.56 3.76v7.36c-.036 1.51-.556 2.769-1.56 3.773s-2.262 1.524-3.773 1.56H5.333c-1.51-.036-2.769-.556-3.773-1.56S.036 18.858 0 17.347v-7.36c.036-1.511.556-2.765 1.56-3.76 1.004-.996 2.262-1.52 3.773-1.574h.774l-1.174-1.12a1.234 1.234 0 0 1-.373-.906c0-.356.124-.659.373-.907l.027-.027c.267-.249.573-.373.92-.373.347 0 .653.124.92.373L9.653 4.44c.071.071.134.142.187.213h4.267a.836.836 0 0 1 .16-.213l2.853-2.747c.267-.249.573-.373.92-.373.347 0 .662.151.929.4.267.249.391.551.391.907 0 .355-.124.659-.373.907zM5.333 7.24c-.746.018-1.373.276-1.88.773-.506.498-.769 1.13-.787 1.894v7.52c.018.764.281 1.395.787 1.893.507.498 1.134.756 1.88.773h13.334c.746-.017 1.373-.275 1.88-.773.506-.498.769-1.129.787-1.893v-7.52c-.018-.764-.281-1.396-.787-1.894a2.51 2.51 0 0 0-1.88-.773z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17.813 4.653h.854c1.51.054 2.769.578 3.773 1.574 1.004.995 1.524 2.249 1.56 3.76v7.36c-.036 1.51-.556 2.769-1.56 3.773s-2.262 1.524-3.773 1.56H5.333c-1.51-.036-2.769-.556-3.773-1.56S.036 18.858 0 17.347v-7.36c.036-1.511.556-2.765 1.56-3.76 1.004-.996 2.262-1.52 3.773-1.574h.774l-1.174-1.12a1.234 1.234 0 0 1-.373-.906c0-.356.124-.659.373-.907l.027-.027c.267-.249.573-.373.92-.373.347 0 .653.124.92.373L9.653 4.44c.071.071.134.142.187.213h4.267a.836.836 0 0 1 .16-.213l2.853-2.747c.267-.249.573-.373.92-.373.347 0 .662.151.929.4.267.249.391.551.391.907 0 .355-.124.659-.373.907zM5.333 7.24c-.746.018-1.373.276-1.88.773-.506.498-.769 1.13-.787 1.894v7.52c.018.764.281 1.395.787 1.893.507.498 1.134.756 1.88.773h13.334c.746-.017 1.373-.275 1.88-.773.506-.498.769-1.129.787-1.893v-7.52c-.018-.764-.281-1.396-.787-1.894a2.51 2.51 0 0 0-1.88-.773z'/%3E%3C/svg%3E");
}

.streamer-plat[data-plat="site"] .streamer-plat-ico {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 2c1.7 0 3.3.53 4.6 1.43L12 10.03 7.4 5.43A7.96 7.96 0 0 1 12 4zm-6.6 2.9L10.03 12 5.43 16.6A7.96 7.96 0 0 1 4 12c0-1.7.53-3.3 1.4-4.6zM12 20a7.96 7.96 0 0 1-4.6-1.43L12 13.97l4.6 4.6A7.96 7.96 0 0 1 12 20zm1.97-9.03L18.57 6.4A7.96 7.96 0 0 1 20 12c0 1.7-.53 3.3-1.43 4.6L13.97 12z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 2c1.7 0 3.3.53 4.6 1.43L12 10.03 7.4 5.43A7.96 7.96 0 0 1 12 4zm-6.6 2.9L10.03 12 5.43 16.6A7.96 7.96 0 0 1 4 12c0-1.7.53-3.3 1.4-4.6zM12 20a7.96 7.96 0 0 1-4.6-1.43L12 13.97l4.6 4.6A7.96 7.96 0 0 1 12 20zm1.97-9.03L18.57 6.4A7.96 7.96 0 0 1 20 12c0 1.7-.53 3.3-1.43 4.6L13.97 12z'/%3E%3C/svg%3E");
}

@media (max-width: 719px) {
  .ladder-who .who-text,
  .lead-who .who-text {
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: break-word;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .ladder-who:has(.streamer-mark),
  .lead-who:has(.streamer-mark) {
    align-items: flex-start;
    flex-wrap: wrap;
    row-gap: 3px;
  }

  .streamer-platforms {
    margin: 0 0 10px;
    padding: 9px 10px;
  }

  .streamer-plat {
    min-height: 36px;
    padding: 8px 12px;
  }
}
