/* SummerToons — Canlı Sohbet V1
   Dark/mor kimlik. Mobil ~320px tam-genişlik; masaüstü sidebar'da ~560px
   yarı-dikey kart; büyüt: desktop ~78vh ortalı, mobil full-screen. */

/* ==========================================================================
   Homepage slot placement.
   ROOT-CAUSE FIX (2026-09-12, r8): .stchat-panel and .st-rank-panel used to
   be two SEPARATE grid items sharing the sidebar column across two DIFFERENT
   grid rows — but .stchat-panel's row (row 3) was SHARED with the much
   taller .st-updates-main (Yeni Bölümler) in the main column, and a CSS
   Grid row's height is always the tallest item in that row. So row 3 grew
   to match Yeni Bölümler's full height, and Popüler Seriler (row 4) only
   started after that huge row ended — a giant blank gap between the two
   sidebar panels that had nothing to do with either panel's own content.
   Fix: homepage.php now wraps both in one <div class="st-sidebar"> — a
   single independent flex column, sized by ITS OWN content (chat + a small
   gap + Popüler Seriler), placed as ONE grid item. Whatever height Yeni
   Bölümler needs no longer has any bearing on where Popüler Seriler sits;
   it always sits directly below the chat panel by exactly `gap`.

   DESKTOP (>=900px): main column = Yeni Bölümler only; sidebar column =
   Canlı Sohbet directly above Popüler Seriler, sticking together as a unit
   while the (usually much taller) main column scrolls past:
     [ main: Yeni Bölümler ]   [ sidebar: Canlı Sohbet -> Popüler Seriler ]

   MOBILE (<=899px): .st-sidebar is display:contents — the wrapper itself
   generates no box and takes no part in the flex layout, so .stchat-panel
   and .st-rank-panel rejoin .st-home's flex flow exactly as if the wrapper
   were never there, each keeping its OWN existing `order` (they are NOT
   adjacent on mobile: Bugünün Gözdeleri -> Canlı Sohbet -> Yeni Bölümler ->
   Kütüphanem -> Popüler Seriler -> Yeni Seriler, unchanged from prior
   revisions).
   ========================================================================== */
@media (min-width: 900px) {
  .st-home > .st-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    grid-column: 2;
    grid-row: 3;
    align-self: start;
    position: sticky;
    top: 92px;
  }
}
@media (max-width: 899px) {
  .st-home > .st-sidebar { display: contents; }
  .st-sidebar > .stchat-panel         { order: 3 !important; }
  .st-home > .st-updates-main         { order: 4 !important; }
  .st-home > .mauve-continue-section  { order: 5 !important; }
  .st-sidebar > .st-rank-panel        { order: 6 !important; }
  .st-home > .st-new-panel            { order: 7 !important; }
  /* full-bleed inside the (still full-width, mobile) parent column */
  .st-sidebar > .stchat-panel { justify-self: stretch; }
}

.stchat-panel {
  --stc-bg:        #0b0715;
  --stc-surface:   #150c28;
  --stc-surface-2: #1c1236;
  --stc-line:      rgba(175,103,255,.16);
  --stc-line-2:    rgba(175,103,255,.30);
  --stc-main:      #5b0cec;
  --stc-lilac:     #af67ff;
  --stc-light:     #d7bcff;
  --stc-text:      #f0ecfa;
  --stc-text-2:    #b3a4d0;
  --stc-text-3:    #7d6f9b;

  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  /* Lands the panel below the site's sticky header when arriving via
     #stchat (e.g. the post-login redirect), instead of its top edge being
     tucked under it. */
  scroll-margin-top: 84px;
  border: 1px solid var(--stc-line);
  border-radius: 16px;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(91,12,236,.18), transparent 60%),
    linear-gradient(180deg, #100a20, #0b0715);
  overflow: hidden;
}
.stchat-panel * { box-sizing: border-box; }

/* ==========================================================================
   Popovers that get appended to <body> (menu, sticker panel, mention list) —
   AND the reused summertoons-community emoji / GIF pickers — live OUTSIDE
   .stchat-panel and outside .stc, so the CSS custom properties those stylesheets
   rely on are undefined there and the panels render TRANSPARENT.
   Re-declare the full token set (chat names + STC names) on those selectors so
   every popover paints a solid dark SummerToons surface.
   ========================================================================== */
.stchat-menu, .stchat-stkpanel, .stchat-stkbackdrop, .stchat-mention-pop, .stchat-toast,
.stc-emoji, .stc-emoji--sheet, .stc-emoji--pop, .stc-emoji__backdrop,
.stc-gif, .stc-gif--sheet, .stc-gif--pop {
  --stc-bg:          #0b0715;
  --stc-surface:     #150c28;
  --stc-surface-2:   #1c1236;
  --stc-surface-hi:  #1c1236;
  --stc-chip:        #241633;
  --stc-line:        rgba(175,103,255,.18);
  --stc-line-2:      rgba(175,103,255,.32);
  --stc-line-soft:   rgba(175,103,255,.12);
  --stc-line-inner:  rgba(175,103,255,.14);
  --stc-main:        #5b0cec;
  --stc-lilac:       #af67ff;
  --stc-light:       #d7bcff;
  --stc-accent:      #5b0cec;
  --stc-accent-soft: #af67ff;
  --stc-text:        #f0ecfa;
  --stc-text-2:      #b3a4d0;
  --stc-text-3:      #7d6f9b;
  --stc-text-body:   #d6d0e2;
  --stc-text-muted:  #9a90ad;
  --stc-text-dim:    #7d6f9b;
  --stc-like:        #ED93B1;
  --stc-badge-bg:    #26215C;
  --stc-badge-text:  #CECBF6;
  --stc-danger:      #ff6b6b;
  --stc-radius:      12px;
  --stc-radius-sm:   8px;
}
/* the STC pickers assume a dark ground; force an opaque one regardless */
.stc-emoji, .stc-emoji--sheet, .stc-emoji--pop,
.stc-gif, .stc-gif--sheet, .stc-gif--pop {
  background: #150c28 !important;
  border: 1px solid rgba(175,103,255,.32) !important;
  box-shadow: 0 18px 55px rgba(0,0,0,.6) !important;
  color: #f0ecfa;
  z-index: 2147483300 !important;
}
.stc-emoji__backdrop { z-index: 2147483290 !important; background: rgba(7,3,15,.62) !important; }
.stc-emoji__grid, .stc-gif__grid { background: transparent !important; }

.stchat-shell { display: flex; flex-direction: column; min-height: 0; }

/* Several inner rows (.stchat-replybar, .stchat-preview) declare their own
   `display` for when they're shown, toggled via the `hidden` attribute in JS.
   A same-specificity author rule that sets `display` beats the UA default
   `[hidden]{display:none}`, so without this the element still occupied a
   bordered row even while hidden and empty — the "empty bar above the
   composer" bug. Force [hidden] to always win inside the panel. */
.stchat-panel [hidden] { display: none !important; }

/* ---------- header ---------- */
.stchat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 11px 14px;
  border-bottom: 1px solid var(--stc-line);
  background: linear-gradient(180deg, rgba(91,12,236,.14), transparent);
}
.stchat-head__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.stchat-logo {
  width: 40px; height: 40px; min-width: 40px; border-radius: 10px;
  object-fit: contain; object-position: center; aspect-ratio: 1 / 1;
  background: rgba(175,103,255,.06); padding: 3px;
  box-shadow: 0 0 0 1px var(--stc-line-2), 0 0 14px rgba(175,103,255,.20);
  flex: 0 0 auto;
}
.stchat-head__title {
  margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .2px;
  color: var(--stc-text); white-space: nowrap;
}
.stchat-status {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--stc-light);
  border: 1px solid var(--stc-line-2); border-radius: 999px; padding: 2px 8px;
}
.stchat-status--test { color: #ffd27a; border-color: rgba(255,210,122,.4); }
.stchat-expand {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--stc-line-2); border-radius: 9px;
  background: rgba(175,103,255,.08); color: var(--stc-light);
  font-size: 15px; cursor: pointer; transition: background .12s, box-shadow .12s;
}
.stchat-expand:hover { background: rgba(175,103,255,.16); box-shadow: 0 0 12px rgba(175,103,255,.25); }

/* ---------- body / feed ---------- */
.stchat-body { display: flex; flex-direction: column; min-height: 0; height: 320px; }
/* Desktop sidebar card: taller, compact semi-vertical format that fits
   naturally above Popüler Seriler. Skipped while expanded/fullscreen — that
   mode already forces height:auto (see .stchat-panel--expanded below). */
@media (min-width: 900px) {
  .stchat-panel:not(.stchat-panel--expanded) .stchat-body { height: 560px; }
}
.stchat-feed {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 12px 6px; display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin; scrollbar-color: var(--stc-line-2) transparent;
}
.stchat-feed::-webkit-scrollbar { width: 8px; }
.stchat-feed::-webkit-scrollbar-thumb { background: var(--stc-line-2); border-radius: 8px; }

.stchat-older {
  align-self: center; margin: 8px 0 2px; padding: 4px 12px;
  font-size: 12px; color: var(--stc-text-2);
  border: 1px solid var(--stc-line); border-radius: 999px; background: transparent; cursor: pointer;
}
.stchat-older:hover { color: var(--stc-text); border-color: var(--stc-line-2); }

.stchat-empty { margin: auto; color: var(--stc-text-3); font-size: 13px; text-align: center; padding: 20px; }

/* ---------- message group ----------
   A group is one avatar + one name/badge/time header for one or more
   consecutive same-sender messages (see chat.js appendRows/renderGroup).
   Each individual message is a .stchat-msg__line inside .stchat-group__lines,
   still carrying its own data-mid for moderation/reply/report targeting. */
.stchat-group { display: flex; gap: 9px; align-items: flex-start; }
.stchat-msg__av {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none;
  background: var(--stc-surface-2); border: 1px solid var(--stc-line);
}
.stchat-msg__av--fb {
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  color: var(--stc-light); background: var(--stc-surface-2);
}
.stchat-msg__main { min-width: 0; flex: 1 1 auto; position: relative; }
.stchat-msg__meta { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.stchat-group__lines { display: flex; flex-direction: column; }
.stchat-msg__line { margin-top: 2px; }
.stchat-msg__line + .stchat-msg__line { margin-top: 5px; }
.stchat-msg__name {
  padding: 0; border: 0; background: none; cursor: pointer;
  font-weight: 700; font-size: 13px; color: var(--stc-text); line-height: 1.2;
}
.stchat-msg__name:hover { text-decoration: underline; }

/* role name styles — CSS ONLY, never authority */
.stchat-name--admin {
  color: #c9a6ff;
  text-shadow: 0 0 10px rgba(122,60,255,.75), 0 0 2px rgba(160,110,255,.6);
  font-weight: 800;
}
.stchat-name--team {
  color: var(--stc-lilac);
  text-shadow: 0 0 8px rgba(175,103,255,.45);
}

.stchat-msg__role {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  color: var(--stc-light); background: rgba(91,12,236,.28);
  border: 1px solid var(--stc-line-2); border-radius: 6px; padding: 1px 6px;
}
.stchat-msg__time { font-size: 11px; color: var(--stc-text-3); }

.stchat-msg__body { font-size: 13.5px; line-height: 1.5; color: var(--stc-text); }
.stchat-msg__body p { margin: 0; overflow-wrap: anywhere; }
.stchat-msg__text a { color: var(--stc-light); }
.stchat-msg__tomb { color: var(--stc-text-3); font-style: italic; font-size: 12.5px; }

/* ad-spam: shadow-banned message — only its author + moderators ever see it */
.stchat-msg__line.is-spam { opacity: .72; }
.stchat-msg__line.is-spam .stchat-msg__body { border-left: 2px solid rgba(255,170,90,.5); padding-left: 8px; }
.stchat-msg__spamtag {
  display: inline-block; margin-top: 4px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  color: #ffd27a; background: rgba(255,180,90,.12);
  border: 1px solid rgba(255,190,110,.35); border-radius: 6px; padding: 2px 7px;
}

.stchat-msg__quote {
  border-left: 2px solid var(--stc-line-2); padding: 2px 8px; margin-bottom: 4px;
  font-size: 12px; color: var(--stc-text-2); background: rgba(175,103,255,.06); border-radius: 0 6px 6px 0;
}
.stchat-msg__quote strong { color: var(--stc-light); }

.stchat-media { display: inline-block; margin: 3px 0; }
.stchat-media img { display: block; border-radius: 10px; border: 1px solid var(--stc-line); }
.stchat-media--gif img,
.stchat-media--img img { max-width: 220px; max-height: 200px; object-fit: cover; }
.stchat-media--sticker { border: 0; }
.stchat-media--sticker img,
img.stchat-media--sticker { width: 96px; height: 96px; object-fit: contain; border: 0; }

.stchat-msg__acts {
  display: flex; gap: 4px; margin-top: 3px; opacity: 0; transition: opacity .12s;
}
.stchat-msg__line:hover .stchat-msg__acts,
.stchat-msg__line:focus-within .stchat-msg__acts { opacity: 1; }
.stchat-msg__act {
  font-size: 11.5px; color: var(--stc-text-3); background: none; border: 0; cursor: pointer; padding: 1px 4px;
}
.stchat-msg__act:hover { color: var(--stc-light); }
.stchat-msg__more { font-size: 14px; line-height: 1; }

/* message ⋯ menu — body-appended, must paint solid + sit above messages/images */
.stchat-menu {
  position: absolute; z-index: 2147483300; min-width: 168px;
  background: #150c28; border: 1px solid var(--stc-line-2); border-radius: 11px;
  box-shadow: 0 16px 46px rgba(0,0,0,.6); padding: 6px; display: flex; flex-direction: column;
}
.stchat-menu__item {
  text-align: left; font-size: 13px; color: var(--stc-text); background: none; border: 0;
  padding: 9px 11px; border-radius: 8px; cursor: pointer; line-height: 1.3;
}
.stchat-menu__item:hover { background: rgba(175,103,255,.16); }
.stchat-menu__item.is-danger { color: #ff9a9a; }
.stchat-menu__item.is-danger:hover { background: rgba(255,120,120,.14); }

/* ---------- locked ---------- */
.stchat-lockedmsg {
  margin: auto; text-align: center; padding: 26px 22px; max-width: 420px;
}
.stchat-lockedmsg__icon { font-size: 28px; display: block; margin-bottom: 10px; }
.stchat-lockedmsg p { margin: 0; color: var(--stc-text-2); font-size: 13.5px; line-height: 1.6; }
.stchat-retry {
  margin-top: 12px; padding: 8px 16px; border-radius: 9px; border: 1px solid var(--stc-line-2);
  background: rgba(175,103,255,.08); color: var(--stc-light); font-weight: 700; font-size: 12.5px;
  cursor: pointer;
}
.stchat-retry:hover { background: rgba(175,103,255,.16); }

.stchat-locked-composer {
  border-top: 1px solid var(--stc-line); padding: 14px; text-align: center;
}
.stchat-locked-composer p { margin: 0 0 8px; color: var(--stc-text-2); font-size: 13px; line-height: 1.55; }
.stchat-login-btn {
  display: inline-block; padding: 8px 16px; border-radius: 9px; font-size: 13px; font-weight: 700;
  color: #fff; background: linear-gradient(90deg, var(--stc-main), #3a1a9e); text-decoration: none;
}

/* ---------- composer ---------- */
.stchat-composer { border-top: 1px solid var(--stc-line); padding: 9px 10px; background: rgba(10,6,20,.5); }
.stchat-replybar {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--stc-text-2);
  padding: 6px 12px; border-top: 1px solid var(--stc-line); background: rgba(175,103,255,.06);
}
.stchat-replybar__t { color: var(--stc-text-3); }
.stchat-replybar strong { color: var(--stc-light); }
.stchat-replybar__x { margin-left: auto; background: none; border: 0; color: var(--stc-text-3); cursor: pointer; font-size: 12px; }

/* ---------- staged attachment preview (GIF / uploaded image) ---------- */
.stchat-preview {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px; padding: 7px 9px;
  border: 1px solid var(--stc-line-2); border-radius: 11px;
  background: rgba(175,103,255,.07);
}
.stchat-preview__thumb {
  width: 52px; height: 52px; min-width: 52px; border-radius: 8px;
  object-fit: cover; background: var(--stc-bg); border: 1px solid var(--stc-line);
}
.stchat-preview__tag {
  font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  color: var(--stc-light); flex: 1 1 auto; min-width: 0;
}
.stchat-preview__x {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--stc-line-2); border-radius: 8px;
  background: rgba(10,6,20,.4); color: var(--stc-text-2); cursor: pointer; font-size: 13px;
}
.stchat-preview__x:hover { color: #ff9a9a; border-color: rgba(255,120,120,.4); }

.stchat-input-row { display: flex; gap: 8px; align-items: flex-end; }
.stchat-input {
  flex: 1 1 auto; min-width: 0; resize: none; max-height: 120px;
  background: var(--stc-bg); border: 1px solid var(--stc-line-2); border-radius: 11px;
  color: var(--stc-text); font: inherit; font-size: 13.5px; line-height: 1.4; padding: 9px 11px;
}
.stchat-input:focus { outline: none; border-color: var(--stc-lilac); box-shadow: 0 0 0 3px rgba(175,103,255,.15); }
.stchat-input::placeholder { color: var(--stc-text-3); }
.stchat-send {
  flex: none; padding: 9px 16px; border-radius: 11px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 13px; color: #fff;
  background: linear-gradient(90deg, var(--stc-main), #7a3cff);
}
.stchat-send:disabled { opacity: .55; cursor: default; }

.stchat-tools { display: flex; gap: 6px; margin-top: 8px; flex-wrap: nowrap; }
.stchat-tool {
  width: 34px; height: 34px; min-width: 34px; flex: 0 0 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--stc-line-2); border-radius: 9px; background: rgba(175,103,255,.04);
  color: var(--stc-text-2); cursor: pointer; font-size: 15px; line-height: 1;
  transition: color .12s, border-color .12s, background .12s;
}
.stchat-tool > span { display: block; }
.stchat-tool:hover { color: var(--stc-light); border-color: var(--stc-lilac); background: rgba(175,103,255,.12); }
.stchat-tool:focus-visible { outline: 2px solid var(--stc-lilac); outline-offset: 2px; }
.stchat-tool--gif { font-size: 10.5px; font-weight: 800; letter-spacing: .5px; }

/* reused summertoons-community pickers must sit above the expanded chat overlay */
.stc-emoji, .stc-emoji--sheet, .stc-emoji--pop,
.stc-gif, .stc-gif--sheet, .stc-gif--pop,
.stc-emoji__backdrop { z-index: 2147483300 !important; }

/* ---------- sticker panel (tabbed: Herkes / Ekip Özel) ---------- */
.stchat-stkpanel {
  position: absolute; z-index: 2147483300;
  width: min(340px, calc(100vw - 24px)); display: flex; flex-direction: column;
  background: #150c28; border: 1px solid var(--stc-line-2); border-radius: 14px;
  box-shadow: 0 18px 55px rgba(0,0,0,.62); overflow: hidden;
}
.stchat-stktabs {
  display: flex; gap: 4px; padding: 8px 8px 0; flex: none;
  border-bottom: 1px solid var(--stc-line);
}
.stchat-stktab {
  flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 6px; border: 0; border-radius: 9px 9px 0 0; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .2px;
  color: var(--stc-text-3); background: transparent;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .12s, background .12s, border-color .12s;
}
.stchat-stktab:hover { color: var(--stc-text-2); background: rgba(175,103,255,.06); }
.stchat-stktab.is-active {
  color: var(--stc-light); background: rgba(175,103,255,.12);
  border-bottom-color: var(--stc-lilac);
}
.stchat-stktab__lock { font-size: 10px; opacity: .8; }

.stchat-stkbody {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px; max-height: 300px;
  scrollbar-width: thin; scrollbar-color: var(--stc-line-2) transparent;
}
.stchat-stkbody::-webkit-scrollbar { width: 8px; }
.stchat-stkbody::-webkit-scrollbar-thumb { background: var(--stc-line-2); border-radius: 8px; }

.stchat-stkgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 7px;
}
.stchat-stkgrid__empty { grid-column: 1/-1; color: var(--stc-text-3); font-size: 12px; padding: 10px; text-align: center; }

.stchat-stk {
  position: relative; aspect-ratio: 1/1; border: 1px solid var(--stc-line); border-radius: 10px;
  background: var(--stc-bg); cursor: pointer; padding: 5px; overflow: hidden;
  display: block; width: 100%;
}
.stchat-stk img { width: 100%; height: 100%; object-fit: contain; display: block; }
.stchat-stk:hover:not(.is-locked) { border-color: var(--stc-lilac); box-shadow: 0 0 10px rgba(175,103,255,.22); }
.stchat-stk.is-locked { cursor: not-allowed; }
.stchat-stk.is-locked img { filter: grayscale(1) brightness(.55); }
.stchat-stk__lock {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; background: rgba(10,6,20,.72); color: var(--stc-light); font-size: 13px;
}
.stchat-stk__lock-t { font-size: 7.5px; text-align: center; line-height: 1.15; padding: 0 3px; color: var(--stc-text-2); }

/* phone bottom-sheet variant */
.stchat-stkpanel--sheet {
  position: fixed; left: 0; right: 0; bottom: 0; top: auto;
  width: 100%; border-radius: 16px 16px 0 0; z-index: 2147483301;
  max-height: 62vh;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.stchat-stkpanel--sheet .stchat-stkbody { max-height: calc(62vh - 46px); }
.stchat-stkbackdrop {
  position: fixed; inset: 0; z-index: 2147483300;
  background: rgba(5,3,12,.6); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}

/* ---------- mention autocomplete ---------- */
.stchat-mention-pop {
  z-index: 2147483300; min-width: 180px; max-width: 260px;
  background: var(--stc-surface); border: 1px solid var(--stc-line-2); border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5); padding: 4px; display: flex; flex-direction: column;
}
.stchat-mention-pop__i {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 0; border-radius: 7px;
  background: none; color: var(--stc-text); font-size: 13px; cursor: pointer; text-align: left;
}
.stchat-mention-pop__i.is-active,
.stchat-mention-pop__i:hover { background: rgba(175,103,255,.16); }
.stchat-mention-pop__i img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.stchat-mention-pop__i .x { width: 22px; height: 22px; border-radius: 50%; background: var(--stc-surface-2); }

/* ---------- toast ---------- */
.stchat-toast {
  position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 12px);
  background: #24123a; border: 1px solid var(--stc-line-2); color: var(--stc-text);
  font-size: 12.5px; padding: 8px 14px; border-radius: 10px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 2147483001; max-width: 90%;
}
.stchat-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================ expanded */
.stchat-panel--expanded {
  position: fixed; z-index: 2147483200;
  inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 40px)); max-width: none; margin: 0;
  height: 78vh; box-shadow: 0 30px 90px rgba(0,0,0,.7);
}
.stchat-panel--expanded .stchat-body { height: auto; flex: 1 1 auto; }
.stchat-panel--expanded .stchat-shell { height: 100%; }
body.stchat-expanded-lock { overflow: hidden; }
.stchat-panel--expanded::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background: rgba(5,3,12,.72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}

/* ============================================================ mobile */
@media (max-width: 900px) {
  .stchat-panel { max-width: 100%; border-radius: 14px; }
  .stchat-body { height: 300px; }
}
@media (max-width: 560px) {
  .stchat-media--gif img, .stchat-media--img img { max-width: 160px; max-height: 150px; }
  img.stchat-media--sticker, .stchat-media--sticker img { width: 78px; height: 78px; }
  .stchat-panel--expanded {
    inset: 0; transform: none; width: 100%; height: 100%; height: 100dvh;
    border-radius: 0; border: 0;
  }
  .stchat-panel--expanded::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .stchat-toast, .stchat-expand, .stchat-msg__acts { transition: none; }
}
