/* Social Tray: a right-hand rail that PUSHES the page (so it never covers a table) and can stay
   open all session. Below ~900px there is no room to push, so it floats over the page instead. */
:root { --st-w: 340px; }
@media (min-width: 1440px) { :root { --st-w: 384px; } }

#app-wrap { transition: padding-right .25s ease; }
html.social-open #app-wrap { padding-right: var(--st-w); }

/* ---------- Topbar toggle ---------- */
/* Sizing/colours come from base.html's shared `.nv-sq` top-bar square; only the open state lives here. */
html.social-open #social-toggle { color: #fde68a; border-color: rgba(245, 158, 11, .5); background: rgba(245, 158, 11, .08); }
.st-badge {
    position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px; background: #f43f5e; color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
    border: 2px solid #0c0d12;
}
.st-badge.hidden { display: none; }

/* ---------- Panel ---------- */
#social-tray {
    /* Starts under the fixed 64px top bar, which spans the full width above it. */
    position: fixed; top: 64px; right: 0; bottom: 0; width: var(--st-w); z-index: 45;
    display: flex; flex-direction: column; min-height: 0;
    /* Obsidian carbon (#090a0d family), brushed-amber hairline. Deliberately no backdrop-filter: the tray
       sits over base.html's animated gold-dust canvas, and a blur there would re-render every frame. */
    background:
        radial-gradient(120% 40% at 100% 0%, rgba(245, 158, 11, .06), transparent 60%),
        linear-gradient(to bottom, rgba(12, 13, 18, .98), rgba(9, 10, 13, .98));
    border-left: 1px solid rgba(245, 158, 11, .2);
    box-shadow: -18px 0 40px rgba(0, 0, 0, .55), inset 1px 0 0 rgba(255, 255, 255, .03);
    transform: translateX(100%); visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
    font-size: 12px; color: #e4e4e7;
}
html.social-open #social-tray { transform: none; visibility: visible; transition: transform .25s ease; }
html.st-no-anim #social-tray, html.st-no-anim #app-wrap { transition: none !important; }

@media (max-width: 900px) {
    html.social-open #app-wrap { padding-right: 0; }
    /* Floating: start under the topbar so the toggle (which closes it) stays reachable. */
    #social-tray { top: 64px; width: min(92vw, var(--st-w)); z-index: 45; }
}

/* ---------- Tab strip: same height as the topbar so the two rails line up ---------- */
.st-tabs { height: 64px; flex: none; display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid rgba(245, 158, 11, .2); background: rgba(9, 9, 11, .6); }
.st-tab {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    color: #71717a; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    border-bottom: 2px solid transparent; transition: color .15s, background .15s, border-color .15s;
}
.st-tab svg { width: 18px; height: 18px; }
.st-tab:hover { color: #d4d4d8; }
.st-tab.active { color: #fbbf24; font-weight: 700; border-bottom-color: #fbbf24; background: rgba(245, 158, 11, .05); }
.st-tab .st-badge { top: 7px; right: calc(50% - 26px); border-color: #0c0d12; }
.st-tab .st-pip { position: absolute; top: 9px; right: calc(50% - 20px); width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, .8); }
.st-tab .st-pip.hidden { display: none; }

.st-panes { flex: 1; min-height: 0; position: relative; }
.st-pane { position: absolute; inset: 0; display: none; flex-direction: column; min-height: 0; }
.st-pane.active { display: flex; }

/* Chat tab: the Global | Table switch (only at a multi-seat table) over two stacked chat views. */
.st-sub { flex: none; display: flex; gap: 4px; margin: 10px 12px 0; padding: 3px; border-radius: 10px; background: rgba(9, 9, 11, .8); border: 1px solid #27272a; }
.st-sub.hidden { display: none; }
.st-sub button {
    flex: 1; position: relative; padding: 5px 0; border-radius: 7px; font-size: 10px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: #71717a; transition: color .15s, background .15s, box-shadow .15s;
}
.st-sub button:hover { color: #d4d4d8; }
.st-sub button.active { color: #fbbf24; background: rgba(245, 158, 11, .1); box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .35); }
.st-sub .st-pip { position: absolute; top: 4px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, .8); }
.st-sub .st-pip.hidden { display: none; }
.st-host { flex: 1; min-height: 0; display: none; flex-direction: column; }
.st-host.active { display: flex; }

/* ---------- Chat view ---------- */
.st-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.st-chead { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(245, 158, 11, .12); }
.st-chead > div:first-child { min-width: 0; }
.st-ctitle { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; color: #fcd34d; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-csub { font-size: 10px; color: #71717a; margin-top: 1px; }
.st-ccount { display: flex; align-items: center; gap: 6px; flex: none; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 600; color: #a7f3d0; white-space: nowrap; background: rgba(16, 185, 129, .08); border: 1px solid rgba(16, 185, 129, .25); }
.st-ccount::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 6px rgba(52, 211, 153, .8); animation: st-pulse 2s ease-in-out infinite; }
.st-chat.offline .st-ccount { color: #a1a1aa; background: rgba(63, 63, 70, .3); border-color: #3f3f46; }
.st-chat.offline .st-ccount::before { background: #71717a; box-shadow: none; animation: none; }
@keyframes st-pulse { 50% { opacity: .35; } }
html.calm-motion .st-ccount::before { animation: none; }
/* Closed, the tray is hidden and slid away, but its loops (the live dot) still cost every page a style pass per frame:
   they hold still until it opens (COMFORT_AND_PERFORMANCE_PLAN.md 6.6 step 2). */
html:not(.social-open) #social-tray *, html:not(.social-open) #social-tray *::before, html:not(.social-open) #social-tray *::after { animation-play-state: paused; }
.st-log { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 6px; display: flex; flex-direction: column; gap: 1px; overscroll-behavior: contain; }
.st-log::-webkit-scrollbar, .st-scroll::-webkit-scrollbar { width: 6px; }
.st-log::-webkit-scrollbar-thumb, .st-scroll::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 3px; }

/* Grouped chat: a header (.st-head: nameplate, level, plate, location, time) opens a player's run of messages and
   the lines after it (.st-cont) are just text, indented under the name. html.chat-compact (Settings -> Compact Chat)
   trims the header to the crest + name. */
.st-msg { padding: 1px 8px; border-radius: 6px; font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; transition: background .15s; user-select: text; }
.st-msg.st-head { margin-top: 7px; padding-top: 4px; }
.st-msg:first-child { margin-top: 0; }
.st-msg:hover { background: rgba(255, 255, 255, .025); }
.st-msg.mine { background: rgba(245, 158, 11, .035); }
.st-mhead { display: flex; align-items: center; gap: 6px; min-width: 0; margin-bottom: 2px; }
.st-mhead > * { flex: none; }
.st-mhead .st-user { flex: 0 0 auto; min-width: 0; max-width: 58%; display: inline-flex; }   /* the plate gives way first */
.st-mhead .np-plate { flex: 0 1 auto; min-width: 0; display: inline-flex; }
.st-mhead .ins-title { max-width: 100%; }
.st-msg .st-text { padding-left: 27px; }
.st-time { margin-left: auto; padding-left: 4px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px; color: #71717a; font-variant-numeric: tabular-nums; user-select: none; }
.st-lvl { font: 700 9.5px/1 'JetBrains Mono', ui-monospace, monospace; color: #a8a29e; user-select: none; }
.st-loc { padding: 0 5px; border-radius: 4px; font-size: 9.5px; font-weight: 600; line-height: 15px; letter-spacing: -.01em; color: #a1a1aa; background: #18181b; border: 1px solid #27272a; white-space: nowrap; user-select: none; }
html.chat-compact .st-mhead .st-lvl, html.chat-compact .st-mhead .np-plate, html.chat-compact .st-mhead .st-loc { display: none; }
html.chat-compact .st-msg.st-head { margin-top: 4px; padding-top: 2px; }
.st-user { cursor: pointer; }
.st-user:hover { filter: brightness(1.2); }
.st-user:hover .np-name, .st-user:hover .st-plain { text-decoration: underline; text-underline-offset: 2px; }
.st-user .np-name { font-size: 12px; }
.st-plain { font-weight: 600; color: #fcd34d; }
.st-text { color: #e4e4e7; font-weight: 400; }
.st-reaction .st-text { color: #a8a29e; font-style: italic; }
.st-react { display: inline-block; font-style: normal; font-size: 17px; line-height: 1; vertical-align: -2px; margin-left: 2px; }
/* House announcements (system lines). The Daily High Roller one is gold on royal purple. */
.st-announce { margin: 4px 2px; padding: 7px 10px; border-radius: 10px; font-size: 11px; line-height: 1.5; color: #e4e4e7;
    background: rgba(24, 24, 27, .8); border: 1px solid #27272a; }
.st-announce.hr { color: #fde68a; background: linear-gradient(120deg, rgba(46, 16, 101, .85), rgba(76, 29, 149, .6)); border-color: rgba(251, 191, 36, .45);
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, .15), 0 0 14px rgba(168, 85, 247, .12); }
.st-announce .st-text { color: inherit; font-weight: 600; }
.st-announce .st-text { padding-left: 0; }
.st-announce .st-time { margin: 0 6px 0 0; padding: 0; }
.st-announce .st-time { color: rgba(233, 213, 255, .6); }
/* Staff: a line typed in the staff console carries a STAFF tag; a staff announcement is a gold banner. */
.st-staff-tag { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px; font: 800 9px/16px Inter, sans-serif;
    letter-spacing: .1em; text-transform: uppercase; color: #1a1408; background: linear-gradient(180deg, #f3d58f, #e5b85c); vertical-align: 1px; }
.st-staffmsg .st-text { color: #fde68a; }
.st-announce.staff { color: #fef3c7; background: linear-gradient(120deg, rgba(66, 45, 8, .9), rgba(41, 28, 6, .85));
    border-color: rgba(229, 184, 92, .55); box-shadow: inset 0 0 0 1px rgba(229, 184, 92, .12), 0 0 14px rgba(229, 184, 92, .1); }
.st-announce.staff .st-time { color: rgba(253, 230, 138, .6); }
.st-sys { text-align: center; font-size: 10px; color: #71717a; padding: 4px 0; }
.st-sys.bad { color: #fb7185; }
.st-empty { margin: auto; text-align: center; color: #71717a; font-size: 11px; padding: 24px; line-height: 1.6; }
.st-new { position: absolute; left: 50%; bottom: 66px; transform: translateX(-50%); z-index: 3; padding: 4px 12px; border-radius: 999px; font-size: 10px; font-weight: 700; background: linear-gradient(to right, #fbbf24, #d97706); color: #0c0a09; box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
.st-new.hidden { display: none; }

/* Input dock: obsidian glass field + gold Send. */
.st-compose { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid rgba(245, 158, 11, .2); background: rgba(12, 13, 18, .9); }
.st-compose input, .st-search input {
    flex: 1; min-width: 0; padding: 8px 14px; border-radius: 12px; background: rgba(9, 9, 11, .8); color: #f4f4f5;
    border: 1px solid #27272a; font-size: 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.st-compose input::placeholder, .st-search input::placeholder { color: #71717a; }
.st-compose input:focus, .st-search input:focus { border-color: rgba(251, 191, 36, .6); box-shadow: 0 0 0 1px rgba(251, 191, 36, .3); }
.st-compose input:disabled { opacity: .45; cursor: not-allowed; }
.st-send {
    flex: none; padding: 8px 16px; border-radius: 12px; font-weight: 900; font-size: 12px; color: #000; cursor: pointer;
    background: linear-gradient(to right, #fbbf24, #d97706); box-shadow: 0 0 12px rgba(245, 158, 11, .3);
    transition: background .15s, transform .1s, box-shadow .15s;
}
.st-send:hover:not(:disabled) { background: linear-gradient(to right, #fcd34d, #f59e0b); box-shadow: 0 0 16px rgba(245, 158, 11, .45); }
.st-send:active:not(:disabled) { transform: scale(.95); }
.st-send:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
/* Quick chat (static/js/emotes/quickchat.js): the composer's picker button and the lines it says. */
.st-quick { flex: none; padding: 8px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; color: #fde68a; background: #18181b; border: 1px solid rgba(245, 158, 11, .35); transition: border-color .15s, background .15s; }
.st-quick:hover, .st-quick[aria-expanded="true"] { border-color: rgba(251, 191, 36, .7); background: #1f1f24; }
.st-quickmsg .st-text { color: #fde68a; font-weight: 600; }

/* Club placeholder shown over the log until clubs exist */
.st-locked { margin: auto; text-align: center; padding: 28px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.st-locked .ico { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .35); color: #fbbf24; }
.st-locked h4 { font-family: 'Playfair Display', Georgia, serif; font-size: 16px; color: #fbbf24; font-weight: 700; }
.st-locked p { font-size: 11px; color: #a8a29e; line-height: 1.6; max-width: 240px; }
.st-locked a { padding: 7px 16px; border-radius: 8px; background: rgba(245, 158, 11, .15); border: 1px solid rgba(245, 158, 11, .4); color: #fbbf24; font-weight: 700; font-size: 11px; }
.st-locked a:hover { background: rgba(245, 158, 11, .25); }

/* ---------- Lists (messages + directory) ---------- */
.st-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.st-h { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #a1a1aa; display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 0; }
.st-h .n { color: #71717a; font-weight: 600; letter-spacing: 0; }
.st-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(24, 24, 27, .6); border: 1px solid #27272a; }
.st-row.click { cursor: pointer; transition: background .15s, border-color .15s; }
.st-row.click:hover { background: rgba(39, 39, 42, .7); border-color: rgba(245, 158, 11, .3); }
.st-av { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fbbf24; background: rgba(217, 119, 6, .18); border: 1px solid rgba(245, 158, 11, .35); }
.st-av .dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #52525b; border: 2px solid #0c0d12; }
.st-av .dot.on { background: #34d399; }
.st-name { flex: 1; min-width: 0; }
.st-name b { display: block; font-size: 12px; color: #f4f4f5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-name small { display: block; font-size: 10px; color: #71717a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-acts { display: flex; gap: 4px; flex: none; }
.st-ic { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: rgba(39, 39, 42, .7); color: #d4d4d8; transition: background .15s, color .15s; }
.st-ic:hover { background: rgba(63, 63, 70, .8); color: #fff; }
.st-ic.gold { background: rgba(245, 158, 11, .18); color: #fbbf24; }
.st-ic.gold:hover { background: rgba(245, 158, 11, .32); }
.st-ic svg { width: 15px; height: 15px; }
.st-btn { padding: 4px 9px; border-radius: 7px; font-size: 10px; font-weight: 700; background: rgba(39, 39, 42, .8); color: #d4d4d8; transition: background .15s; }
.st-btn:hover { background: rgba(63, 63, 70, .9); }
.st-btn.go { background: #059669; color: #052e16; }
.st-btn.go:hover { background: #10b981; }
.st-btn.gold { background: #d97706; color: #1c1917; }
.st-btn.gold:hover { background: #f59e0b; }
.st-unread { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #f59e0b; color: #1c1917; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.st-box { border-radius: 12px; border: 1px solid rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .06); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.st-box .st-h { color: #fbbf24; margin: 2px 4px 0; }
.st-box .st-row { background: rgba(12, 13, 18, .8); }
.st-search { flex: none; padding: 12px 12px 0; display: flex; }
.st-search input { padding-left: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 9px 50%; background-size: 16px; }

/* ---------- DM thread ---------- */
.st-thread-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid rgba(245, 158, 11, .12); }
.st-thread-head .st-name b { font-family: 'Playfair Display', Georgia, serif; color: #fbbf24; font-size: 14px; cursor: pointer; }
.st-bubble-row { display: flex; }
.st-bubble-row.mine { justify-content: flex-end; }
.st-bubble { max-width: 82%; padding: 7px 11px; border-radius: 12px; font-size: 12px; line-height: 1.4; word-break: break-word; overflow-wrap: anywhere; background: #18181b; border: 1px solid #27272a; color: #e4e4e7; border-bottom-left-radius: 4px; }
.st-bubble-row.mine .st-bubble { background: linear-gradient(135deg, #fbbf24, #d97706); border-color: transparent; color: #0c0a09; border-bottom-left-radius: 12px; border-bottom-right-radius: 4px; }

/* ---------- In-tray toast ---------- */
.st-toast { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 5; padding: 8px 12px; border-radius: 10px; font-size: 11px; font-weight: 600; text-align: center; background: rgba(12, 13, 18, .97); border: 1px solid rgba(245, 158, 11, .5); color: #fde68a; box-shadow: 0 8px 20px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .2s, transform .2s; }
.st-toast.show { opacity: 1; transform: none; }
.st-toast.bad { border-color: rgba(244, 63, 94, .6); color: #fda4af; }
#st-page-toast { position: fixed; left: 50%; right: auto; bottom: 24px; z-index: 80; max-width: min(90vw, 360px); font-size: 12px; transform: translate(-50%, 6px); }
#st-page-toast.show { transform: translate(-50%, 0); }

/* With the tray open the topbar has ~340px less room: drop the greeting before anything else gives. */

/* ---- Chat filter notice (social_tray.js automodNotice): a blocked chat line / DM, warning or mute ---- */
:is(#st-automod, #st-ask) { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 16px;
              background: radial-gradient(ellipse at 50% 35%, rgba(69, 10, 10, .28), rgba(0, 0, 0, .78) 70%); }
:is(#st-automod, #st-ask).show { display: grid; }
:is(#st-automod, #st-ask) .st-am-card { width: 100%; max-width: 420px; padding: 26px 24px 20px; border-radius: 18px; text-align: left;
              background: linear-gradient(180deg, #14151b, #0a0b0f); border: 1px solid rgba(245, 158, 11, .4);
              box-shadow: 0 24px 70px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .04);
              color: #d4d4d8; font-family: Inter, system-ui, sans-serif; }
:is(#st-automod, #st-ask).mute .st-am-card { border-color: rgba(244, 63, 94, .5); }
:is(#st-automod, #st-ask) .st-am-kicker { font: 700 10px 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .16em;
              text-transform: uppercase; color: #f59e0b; }
:is(#st-automod, #st-ask).mute .st-am-kicker { color: #fb7185; }
:is(#st-automod, #st-ask) .st-am-title { margin: 8px 0 10px; font: 800 20px 'Playfair Display', Georgia, serif; color: #fde68a; }
:is(#st-automod, #st-ask).mute .st-am-title { color: #fecdd3; }
:is(#st-automod, #st-ask) .st-am-text { margin: 0 0 18px; font-size: 13px; line-height: 1.6; color: #a1a1aa; }
:is(#st-automod, #st-ask) .st-am-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
:is(#st-automod, #st-ask) .st-am-link { font-size: 12px; color: #fbbf24; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
:is(#st-automod, #st-ask) .st-am-ok { padding: 9px 18px; border-radius: 11px; border: 0; cursor: pointer; font-size: 12px; font-weight: 800;
              letter-spacing: .06em; color: #1a1206; background: linear-gradient(180deg, #fde68a, #d97706); }
:is(#st-automod, #st-ask) .st-am-ok:focus-visible { outline: 2px solid #fde68a; outline-offset: 2px; }
#st-ask .st-ask-input { width: 100%; margin: 0 0 16px; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(245, 158, 11, .35); background: #0a0b0f; color: #fde68a; font: 600 13px 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
#st-ask .st-ask-input:focus-visible { outline: 2px solid #fde68a; outline-offset: 1px; }

/* ---------- Notification popups (static/js/social_popups.js) ----------
   Cards in the top-right corner under the top bar (left of the tray when it is open): a DM, an invite, a friend
   request. Same obsidian + amber hairline as the tray; the life bar along the bottom freezes while hovered. */
.st-popups { position: fixed; top: 76px; right: 16px; z-index: 85; width: min(340px, calc(100vw - 32px));
             display: flex; flex-direction: column; gap: 10px; pointer-events: none; transition: right .25s ease; }
html.social-open .st-popups { right: calc(var(--st-w) + 16px); }
@media (max-width: 900px) { html.social-open .st-popups { right: 16px; } }
.st-pop { position: relative; overflow: hidden; pointer-events: auto; cursor: pointer;
          display: flex; align-items: flex-start; gap: 11px; padding: 12px 34px 13px 12px; border-radius: 14px;
          background: radial-gradient(120% 60% at 0% 0%, rgba(245, 158, 11, .08), transparent 60%),
                      linear-gradient(to bottom, rgba(18, 19, 25, .98), rgba(9, 10, 13, .98));
          border: 1px solid rgba(245, 158, 11, .32); color: #e4e4e7; font-size: 12px;
          box-shadow: 0 14px 34px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .04);
          opacity: 0; transform: translateX(24px); transition: opacity .2s ease, transform .2s ease; }
.st-pop.show { opacity: 1; transform: none; }
.st-pop.leaving { opacity: 0; transform: translateX(24px); pointer-events: none; }
.st-pop:hover { border-color: rgba(251, 191, 36, .55); }
.st-pop:focus-visible { outline: 2px solid #fde68a; outline-offset: 2px; }
.st-pop-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
              color: #fbbf24; background: rgba(217, 119, 6, .16); border: 1px solid rgba(245, 158, 11, .35); }
.st-pop-invite .st-pop-ico, .st-pop-club_invite .st-pop-ico { color: #34d399; background: rgba(5, 150, 105, .16); border-color: rgba(16, 185, 129, .4); }
.st-pop-ranked .st-pop-ico { color: #c4b5fd; background: rgba(124, 58, 237, .16); border-color: rgba(167, 139, 250, .4); }
.st-pop-body { min-width: 0; flex: 1; }
.st-pop-kicker { font: 700 9px 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; color: #d97706; }
.st-pop-title { margin-top: 2px; font-weight: 700; font-size: 13px; color: #fde68a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-pop-text { margin-top: 2px; color: #a1a1aa; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2;
               -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.st-pop-acts { display: flex; gap: 6px; margin-top: 9px; }
.st-pop-btn { padding: 5px 12px; border-radius: 8px; border: 0; cursor: pointer; font-size: 11px; font-weight: 700;
              background: rgba(39, 39, 42, .9); color: #d4d4d8; transition: background .15s; }
.st-pop-btn:hover { background: rgba(63, 63, 70, .95); }
.st-pop-btn.go { background: #059669; color: #052e16; }
.st-pop-btn.go:hover { background: #10b981; }
.st-pop-btn.gold { background: linear-gradient(to bottom, #fbbf24, #d97706); color: #1c1917; }
.st-pop-btn.gold:hover { background: #f59e0b; }
.st-pop-btn:disabled { opacity: .55; cursor: default; }
.st-pop [hidden], .st-pop-err:empty { display: none; }
.st-pop-err { margin-top: 6px; font-size: 11px; color: #fda4af; }
.st-pop-x { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border: 0; border-radius: 6px; cursor: pointer;
            background: transparent; color: #71717a; font-size: 11px; line-height: 22px; text-align: center; }
.st-pop-x:hover { color: #e4e4e7; background: rgba(63, 63, 70, .6); }
.st-pop-life { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; transform-origin: left center;
               background: linear-gradient(to right, #b45309, #fbbf24); animation: st-pop-life 6s linear forwards; }
.st-pop.paused .st-pop-life { animation-play-state: paused; }
@keyframes st-pop-life { from { transform: scaleX(1); } to { transform: scaleX(0); } }
html.calm-motion .st-pop, html.calm-motion .st-pop.leaving { transform: none; transition: opacity .15s; }
html.calm-motion .st-pop-life { animation: none; opacity: .5; }

