/* =========================================================
   STS v5.6.170 - Smooth fitted chat + silent Sloth Coins
   Makes the watch page chat cleaner, less chunky, and hides
   reward notification spam from the chat timeline.
   ========================================================= */

html body.streamx-v5.twitch-v53 .watch-shell{
  grid-template-columns:minmax(0,1fr) minmax(360px, 520px) !important;
  gap:14px !important;
}

html body.streamx-v5.twitch-v53 .chat-panel.upgraded.pro-chat,
html body.streamx-v5.twitch-v53 aside.chat-panel.upgraded.pro-chat{
  height:calc(100vh - 88px) !important;
  min-height:0 !important;
  top:74px !important;
  border-radius:18px !important;
  border:1px solid rgba(157,73,255,.45) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(157,73,255,.16), transparent 34%),
    radial-gradient(circle at 92% 100%, rgba(57,255,20,.10), transparent 30%),
    rgba(8,10,16,.94) !important;
  box-shadow:0 18px 60px rgba(0,0,0,.38), inset 0 0 0 1px rgba(255,255,255,.035) !important;
  overflow:hidden !important;
}

html body.streamx-v5.twitch-v53 .sts102-chat-head{
  min-height:82px !important;
  padding:13px 14px !important;
  background:linear-gradient(180deg,rgba(17,20,32,.98),rgba(10,12,18,.95)) !important;
  border-bottom:1px solid rgba(157,73,255,.30) !important;
  box-shadow:0 12px 30px rgba(0,0,0,.22) !important;
}

html body.streamx-v5.twitch-v53 .sts102-chat-titlebox{gap:11px !important;min-width:0 !important;}
html body.streamx-v5.twitch-v53 .sts102-chat-avatar{
  width:48px !important;height:48px !important;border-radius:16px !important;
  border:2px solid rgba(174,80,255,.95) !important;
  box-shadow:0 0 22px rgba(157,73,255,.28) !important;
}
html body.streamx-v5.twitch-v53 .sts102-chat-title{
  font-size:22px !important;line-height:1 !important;letter-spacing:.03em !important;
  text-shadow:0 0 18px rgba(157,73,255,.22) !important;
}
html body.streamx-v5.twitch-v53 .sts102-chat-sub{
  margin-top:5px !important;font-size:12px !important;color:rgba(239,232,255,.64) !important;
  white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;max-width:250px !important;
}
html body.streamx-v5.twitch-v53 .sts102-viewer-pill{
  height:42px !important;padding:0 13px !important;border-radius:16px !important;
  background:rgba(18,24,28,.86) !important;border:1px solid rgba(57,255,20,.24) !important;
}
html body.streamx-v5.twitch-v53 .sts102-menu-btn{width:40px !important;height:40px !important;border-radius:14px !important;}

html body.streamx-v5.twitch-v53 .v55-chat-ref .chat-messages,
html body.streamx-v5.twitch-v53 .chat-messages.pro-messages{
  gap:4px !important;
  padding:10px 12px 12px !important;
  background:linear-gradient(180deg,rgba(7,9,13,.96),rgba(6,8,12,.98)) !important;
  scroll-behavior:smooth !important;
}

html body.streamx-v5.twitch-v53 .chat-messages.pro-messages::-webkit-scrollbar{width:8px !important;}
html body.streamx-v5.twitch-v53 .chat-messages.pro-messages::-webkit-scrollbar-track{background:rgba(255,255,255,.025) !important;}
html body.streamx-v5.twitch-v53 .chat-messages.pro-messages::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,#a63cff,#39ff14) !important;border-radius:999px !important;border:2px solid rgba(7,9,13,.96) !important;
}

html body.streamx-v5.twitch-v53 .chat-line.pro-message{
  display:grid !important;
  grid-template-columns:36px minmax(0,1fr) !important;
  gap:9px !important;
  align-items:start !important;
  padding:7px 8px !important;
  border-radius:14px !important;
  background:transparent !important;
  border:1px solid transparent !important;
  transition:background .16s ease,border-color .16s ease,transform .16s ease !important;
}
html body.streamx-v5.twitch-v53 .chat-line.pro-message:hover{
  background:rgba(255,255,255,.045) !important;
  border-color:rgba(157,73,255,.20) !important;
  transform:translateX(1px) !important;
}
html body.streamx-v5.twitch-v53 .chat-avatar-mini{
  width:34px !important;height:34px !important;min-width:34px !important;border-radius:999px !important;
  font-size:13px !important;border:2px solid rgba(57,255,20,.88) !important;
  box-shadow:0 0 14px rgba(57,255,20,.18) !important;
}
html body.streamx-v5.twitch-v53 .chat-bubble{
  min-width:0 !important;
  background:transparent !important;
  border:0 !important;
  padding:0 !important;
  box-shadow:none !important;
}
html body.streamx-v5.twitch-v53 .chat-meta{
  display:flex !important;align-items:center !important;gap:6px !important;min-width:0 !important;line-height:1.1 !important;margin-bottom:3px !important;
}
html body.streamx-v5.twitch-v53 .chat-name,
html body.streamx-v5.twitch-v53 .chat-name-link{
  color:var(--chat-name-color,#fff) !important;
  font-size:13px !important;font-weight:900 !important;max-width:130px !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;
}
html body.streamx-v5.twitch-v53 .chat-body,
html body.streamx-v5.twitch-v53 .chat-bubble > span{
  display:block !important;
  color:#f5f2ff !important;
  font-size:14px !important;
  line-height:1.35 !important;
  word-break:break-word !important;
}
html body.streamx-v5.twitch-v53 .system-line{
  grid-template-columns:28px minmax(0,1fr) !important;
  background:rgba(157,73,255,.10) !important;
  border-color:rgba(157,73,255,.16) !important;
  margin:3px 0 !important;
}
html body.streamx-v5.twitch-v53 .system-line .system-icon{width:28px !important;height:28px !important;font-size:14px !important;}
html body.streamx-v5.twitch-v53 .system-bubble{padding:8px 10px !important;border-radius:12px !important;background:rgba(255,255,255,.035) !important;}
html body.streamx-v5.twitch-v53 .system-message{font-size:13px !important;color:#ede8ff !important;}

/* Hide old/client-side Sloth Coin reward spam from the visible chat feed. */
html body.streamx-v5.twitch-v53 .chat-line.system-points,
html body.streamx-v5.twitch-v53 .chat-line[data-event="points"]{
  display:none !important;
}

html body.streamx-v5.twitch-v53 .creator-badge,
html body.streamx-v5.twitch-v53 .badge-row.compact .creator-badge{
  width:24px !important;height:24px !important;min-width:24px !important;border-radius:9px !important;padding:0 !important;
}
html body.streamx-v5.twitch-v53 .badge-label{display:none !important;}
html body.streamx-v5.twitch-v53 .inline-mod-menu summary,
html body.streamx-v5.twitch-v53 .mod-menu summary{
  width:26px !important;height:26px !important;border-radius:999px !important;background:rgba(255,255,255,.06) !important;
}
html body.streamx-v5.twitch-v53 .sts-chat-clip-btn{
  opacity:0 !important;
  pointer-events:none !important;
  height:26px !important;
  padding:0 9px !important;
  border-radius:10px !important;
  font-size:11px !important;
  transition:opacity .15s ease !important;
}
html body.streamx-v5.twitch-v53 .chat-line:hover .sts-chat-clip-btn{
  opacity:1 !important;
  pointer-events:auto !important;
}
html body.streamx-v5.twitch-v53 .sts-message-reactions{margin-top:5px !important;gap:5px !important;}
html body.streamx-v5.twitch-v53 .sts-message-reaction-pill{font-size:12px !important;padding:3px 7px !important;border-radius:999px !important;}

html body.streamx-v5.twitch-v53 .v53-emote-strip{
  flex:0 0 auto !important;
  padding:9px 10px !important;
  gap:7px !important;
  background:rgba(9,12,17,.98) !important;
  border-top:1px solid rgba(157,73,255,.24) !important;
  overflow-x:auto !important;
}
html body.streamx-v5.twitch-v53 .v53-emote-strip .emote-pick{
  width:40px !important;height:40px !important;min-width:40px !important;border-radius:13px !important;
  background:rgba(255,255,255,.055) !important;border:1px solid rgba(255,255,255,.08) !important;
  transition:transform .14s ease,background .14s ease,border-color .14s ease !important;
}
html body.streamx-v5.twitch-v53 .v53-emote-strip .emote-pick:hover{
  transform:translateY(-2px) scale(1.03) !important;background:rgba(157,73,255,.18) !important;border-color:rgba(157,73,255,.45) !important;
}
html body.streamx-v5.twitch-v53 .v53-emote-strip .emote-pick img{width:28px !important;height:28px !important;}
html body.streamx-v5.twitch-v53 .v53-emote-strip .emote-pick span{display:none !important;}

html body.streamx-v5.twitch-v53 .chat-form.pro-chat-form{
  display:grid !important;
  grid-template-columns:50px minmax(0,1fr) 88px !important;
  gap:9px !important;
  padding:10px 12px 12px !important;
  background:linear-gradient(180deg,rgba(11,13,19,.98),rgba(17,12,28,.98)) !important;
  border-top:1px solid rgba(157,73,255,.28) !important;
}
html body.streamx-v5.twitch-v53 .chat-wave-btn{
  width:50px !important;height:48px !important;border-radius:16px !important;
  background:linear-gradient(135deg,#8b35ff,#b13cff) !important;
  box-shadow:0 0 22px rgba(157,73,255,.22) !important;
}
html body.streamx-v5.twitch-v53 .chat-form.pro-chat-form input{
  height:48px !important;border-radius:14px !important;padding:0 14px !important;
  background:rgba(12,18,22,.96) !important;border:1px solid rgba(255,255,255,.11) !important;color:#fff !important;
}
html body.streamx-v5.twitch-v53 .chat-form.pro-chat-form input:focus{
  border-color:rgba(57,255,20,.70) !important;box-shadow:0 0 0 3px rgba(57,255,20,.10) !important;
}
html body.streamx-v5.twitch-v53 .chat-form.pro-chat-form button:last-child{
  height:48px !important;border-radius:14px !important;font-weight:1000 !important;
  background:linear-gradient(135deg,#a63cff,#b83bff) !important;color:#fff !important;
}

html body.streamx-v5.twitch-v53 .sts-chat-announcements{display:none !important;}

@media(max-width:1180px){
  html body.streamx-v5.twitch-v53 .watch-shell{grid-template-columns:1fr !important;}
  html body.streamx-v5.twitch-v53 .chat-panel.upgraded.pro-chat{position:relative !important;top:auto !important;height:min(620px,70vh) !important;}
}
