/* ================================================================
   social-hub.css — Social Hub panel (FAB + DM + Friends/Requests)
   Requires pages to define (or let fallbacks apply):
     --accent  --surface  --surface2  --bg2  --border
     --text  --muted  --red  --green
   ================================================================ */

/* ── FAB ─────────────────────────────────────────────────────── */
.chat-fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1100;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--border, rgba(99,102,241,.2));
    background: linear-gradient(135deg, var(--accent, #6366f1) 0%, var(--cyan, #22d3ee) 100%);
    color: #fff;
    box-shadow: 0 14px 30px rgba(0,0,0,.24);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    overflow: visible;
}

.chat-fab-label {
    position: absolute;
    right: 68px;
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    white-space: nowrap;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(99,102,241,.2));
    background: var(--surface, #12122a);
    color: var(--text, #e2e8f0);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: .04em;
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
    box-shadow: 0 10px 22px rgba(0,0,0,.18);
}
.chat-fab:hover .chat-fab-label,
.chat-fab:focus-visible .chat-fab-label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
@media (max-width: 760px) { .chat-fab-label { display: none; } }

.chat-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--red, #f43f5e);
    color: #fff;
    border-radius: 999px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    line-height: 14px;
    pointer-events: none;
    display: none;
}

/* ── Panel ───────────────────────────────────────────────────── */
.chat-panel {
    position: fixed;
    right: 16px;
    bottom: 84px;
    z-index: 1090;
    width: min(360px, calc(100vw - 24px));
    height: min(62vh, 520px);
    display: flex;
    flex-direction: column;
    background: var(--surface, #12122a);
    border: 1px solid var(--border, rgba(99,102,241,.2));
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(0,0,0,.22);
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(.98);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    /* Reset page font so all children use panel fonts, not page body font */
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
}
.chat-panel.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
@media (max-width: 760px) {
    .chat-panel { right: 10px; left: 10px; width: auto; height: min(56vh, 460px); }
}

/* ── Panel Tabs ──────────────────────────────────────────────── */
.sh-panel-tabs {
    display: flex;
    padding: 0;
    border-bottom: 1px solid var(--border, rgba(99,102,241,.2));
    background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(34,211,238,.08));
    flex-shrink: 0;
}
.sh-panel-tab-btn {
    flex: 1;
    padding: 8px 4px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted, #64748b);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
    transition: color .14s, background .14s, border-color .14s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: -1px;
    border-radius: 0;
    white-space: nowrap;
}
.sh-panel-tab-btn:hover { color: var(--text, #e2e8f0); background: rgba(99,102,241,.08); }
.sh-panel-tab-btn.active {
    background: rgba(99,102,241,.12);
    color: var(--text, #e2e8f0);
    border-bottom-color: var(--accent, #6366f1);
    font-weight: 700;
}
.sh-tab-badge {
    background: var(--red, #f43f5e);
    color: #fff;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    line-height: 14px;
}

/* ── Chat Sub-tabs ───────────────────────────────────────────── */
.sh-subtabs {
    display: flex;
    padding: 0;
    border-bottom: 1px solid var(--border, rgba(99,102,241,.2));
    background: rgba(99,102,241,.04);
    flex-shrink: 0;
}
.sh-subtab-btn {
    flex: 1;
    padding: 6px 4px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted, #64748b);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: color .14s, background .14s, border-color .14s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: -1px;
    border-radius: 0;
    white-space: nowrap;
}
.sh-subtab-btn:hover { color: var(--text, #e2e8f0); background: rgba(99,102,241,.06); }
.sh-subtab-btn.active {
    background: rgba(99,102,241,.1);
    color: var(--text, #e2e8f0);
    border-bottom-color: var(--cyan, #22d3ee);
    font-weight: 700;
}
.sh-dm-badge {
    background: var(--red, #f43f5e);
    color: #fff;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    min-width: 14px;
    text-align: center;
    line-height: 13px;
}

/* ── Social List / Rows ──────────────────────────────────────── */
.sh-tab-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sh-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(99,102,241,.06);
    border: 1px solid rgba(99,102,241,.14);
    border-left: 4px solid rgba(99,102,241,.32);
    border-radius: 10px;
}
.sh-row-info { flex: 1; min-width: 0; }
.sh-row-name {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent, #6366f1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sh-row-sub {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--muted, #64748b);
    margin-top: 2px;
}
.sh-row-actions { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.sh-section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: .06em;
    color: var(--muted, #64748b);
    text-transform: uppercase;
    padding: 4px 4px 0;
}
.sh-empty {
    margin: auto 0;
    text-align: center;
    color: var(--muted, #64748b);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    padding: 24px 0;
}
.sh-group-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: .06em;
    color: var(--muted, #64748b);
    text-transform: uppercase;
    padding: 6px 4px 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sh-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}
.sh-online-dot.offline { background: #64748b; }

.sh-list-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--muted, #64748b);
    padding: 2px 4px 6px;
    text-align: right;
}
.sh-count-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--accent, #6366f1);
    color: #fff;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    margin-left: 4px;
    line-height: 14px;
    vertical-align: middle;
}
.sh-confirm-txt {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--text, #e2e8f0);
}
.sh-load-sentinel {
    height: 1px;
    flex-shrink: 0;
}
.sh-loading-row {
    text-align: center;
    padding: 10px 0 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--muted, #64748b);
    letter-spacing: .06em;
}

/* ── DM Inbox ────────────────────────────────────────────────── */
.sh-inbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    background: rgba(99,102,241,.05);
    border: 1px solid rgba(99,102,241,.12);
    border-left: 4px solid rgba(99,102,241,.28);
    border-radius: 10px;
    cursor: pointer;
    transition: background .12s;
}
.sh-inbox-item:hover { background: rgba(99,102,241,.10); }
.sh-inbox-item.has-unread { border-left-color: var(--accent, #6366f1); }
.sh-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent, #6366f1), var(--cyan, #22d3ee));
    color: #fff;
    font-family: 'Bungee', cursive;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sh-inbox-meta { flex: 1; min-width: 0; }
.sh-inbox-name {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent, #6366f1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sh-inbox-preview {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 11px;
    color: var(--muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.sh-inbox-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.sh-inbox-time { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--muted, #64748b); }
.sh-inbox-unread {
    background: var(--red, #f43f5e);
    color: #fff;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
    line-height: 15px;
}

/* ── DM Thread ───────────────────────────────────────────────── */
.sh-thread-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border, rgba(99,102,241,.2));
    background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(34,211,238,.07));
    flex-shrink: 0;
}
.sh-back-btn {
    background: none;
    border: 1px solid var(--border, rgba(99,102,241,.2));
    border-radius: 6px;
    color: var(--text, #e2e8f0);
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 16px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sh-back-btn:hover { background: rgba(99,102,241,.1); }
.sh-thread-name {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent, #6366f1);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sh-thread-status { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--muted, #64748b); flex-shrink: 0; }
.sh-thread-delete-btn {
    background: none;
    border: none;
    color: var(--muted, #64748b);
    font-size: 15px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 6px;
    transition: color .15s, background .15s;
}
.sh-thread-delete-btn:hover { color: #ef4444; background: rgba(239,68,68,.08); }
.sh-delete-confirm {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(239,68,68,.08);
    border-bottom: 1px solid rgba(239,68,68,.18);
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 12px;
    color: var(--text, #e2e8f0);
    flex-shrink: 0;
    animation: shSlideDown .15s ease;
}
@keyframes shSlideDown { from { opacity:0; transform:translateY(-100%); } to { opacity:1; transform:translateY(0); } }
.sh-delete-confirm span { flex:1; }
.sh-delete-confirm button {
    border: none;
    border-radius: 5px;
    padding: 3px 10px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .12s;
}
.sh-delete-confirm button:hover { filter: brightness(1.15); }
.sh-delete-confirm-yes { background: #ef4444; color: #fff; }
.sh-delete-confirm-no  { background: rgba(99,102,241,.15); color: var(--text, #e2e8f0); }
.sh-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
    padding-right: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sh-bubble-wrap { display: flex; flex-direction: column; gap: 1px; }
.sh-bubble-wrap.me { align-items: flex-end; }
.sh-bubble-wrap.them { align-items: flex-start; }
.sh-bubble {
    max-width: 82%;
    padding: 7px 11px;
    border-radius: 14px;
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: filter .1s;
    position: relative;
}
.sh-bubble:hover { filter: brightness(1.1); }
/* -- Grouped border-radius for consecutive same-sender bubbles -- */
/* me: default all round */
.sh-bubble.me {
    background: linear-gradient(135deg, var(--accent, #6366f1), var(--cyan, #22d3ee));
    color: #fff;
    border-radius: 14px;
}
/* them: default all round */
.sh-bubble.them {
    background: rgba(99,102,241,.10);
    border: 1px solid rgba(99,102,241,.18);
    color: var(--text, #e2e8f0);
    border-radius: 14px;
}
/* Single message (no group) — tail on the side */
.sh-bubble.me.single           { border-bottom-right-radius: 4px; }
.sh-bubble.them.single         { border-bottom-left-radius: 4px; }
/* First in group */
.sh-bubble.me.group-first      { border-bottom-right-radius: 4px; }
.sh-bubble.them.group-first    { border-bottom-left-radius: 4px; }
/* Middle in group */
.sh-bubble.me.group-mid        { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.sh-bubble.them.group-mid      { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
/* Last in group */
.sh-bubble.me.group-last       { border-top-right-radius: 4px; }
.sh-bubble.them.group-last     { border-top-left-radius: 4px; }

/* Group time separator */
.sh-group-time {
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: var(--muted, #64748b);
    padding: 6px 0 2px;
}
.sh-bubble-time { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: var(--muted, #64748b); padding: 0 4px; display: none; }

/* -- Reply block inside DM bubbles -- */
.sh-bubble .chat-msg-reply {
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 6px;
    border-left: 2px solid;
    cursor: pointer;
    font-size: 11px;
}
.sh-bubble.me .chat-msg-reply {
    background: rgba(255,255,255,.18);
    border-left-color: rgba(255,255,255,.5);
}
.sh-bubble.me .chat-msg-reply-name {
    color: rgba(255,255,255,.85);
    font-weight: 700;
    font-size: 10px;
}
.sh-bubble.me .chat-msg-reply-text {
    color: rgba(255,255,255,.6);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}
.sh-bubble.them .chat-msg-reply {
    background: rgba(99,102,241,.12);
    border-left-color: var(--accent, #6366f1);
}
.sh-bubble.them .chat-msg-reply-name {
    color: var(--accent, #6366f1);
    font-weight: 700;
    font-size: 10px;
}
.sh-bubble.them .chat-msg-reply-text {
    color: var(--muted, #64748b);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

/* -- DM Reply preview bar -- */
.sh-dm-reply-bar {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    flex-shrink: 0;
    border-top: 1px solid var(--border, rgba(99,102,241,.2));
    background: rgba(99,102,241,.06);
}
.sh-dm-reply-bar.show { display: flex; }
.sh-dm-reply-bar-label {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 11px;
    color: var(--accent, #6366f1);
    white-space: nowrap;
}
.sh-dm-reply-bar-snippet {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 11px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted, #64748b);
}
.sh-dm-reply-bar-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted, #64748b);
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 15px;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
}
.sh-dm-reply-bar-close:hover { color: var(--text, #e2e8f0); }

.sh-compose {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    border-top: 1px solid var(--border, rgba(99,102,241,.2));
    background: var(--surface, #12122a);
    flex-shrink: 0;
}
.sh-compose-input {
    flex: 1;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--border, rgba(99,102,241,.2));
    background: var(--bg2, #0a0a1f);
    color: var(--text, #e2e8f0);
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 13px;
    outline: none;
}
.sh-compose-input:focus {
    border-color: rgba(99,102,241,.5);
    box-shadow: 0 0 0 3px rgba(99,102,241,.10);
}
.sh-compose-send {
    min-width: 72px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent, #6366f1) 0%, var(--cyan, #22d3ee) 100%);
    color: #fff;
    font-family: 'Bungee', cursive;
    font-size: 12px;
    letter-spacing: .04em;
    cursor: pointer;
    padding: 0 12px;
}
.sh-compose-send:disabled { opacity: .45; cursor: not-allowed; }
.sh-compose-sticker {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border: 1px solid var(--border, rgba(99,102,241,.15));
    border-radius: 10px;
    background: var(--surface2, #f0f1f5);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, background .15s;
    flex-shrink: 0;
}
.sh-compose-sticker:hover {
    border-color: rgba(99,102,241,.4);
    background: var(--surface, #fff);
}

/* ── Hub Search ──────────────────────────────────────────────── */
.sh-search-wrap {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border, rgba(99,102,241,.2));
    flex-shrink: 0;
}
.sh-search {
    width: 100%;
    box-sizing: border-box;
    padding: 5px 10px;
    border: 1px solid var(--border, rgba(99,102,241,.2));
    border-radius: 8px;
    background: var(--surface2, var(--surface, #12122a));
    color: var(--text, #e2e8f0);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    outline: none;
}
.sh-search:focus { border-color: rgba(99,102,241,.4); }

/* ================================================================
   Global Lobby Chat — content injected into #shGlobalChatContainer
   ================================================================ */
.chat-list {
    flex: 1; overflow-y: auto; padding: 6px; padding-right: 2px; min-height: 0;
    display: flex; flex-direction: column; gap: 6px;
}
.chat-empty {
    text-align: center; padding: 24px 0;
    color: var(--muted, #64748b);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
}

/* ── Chat item (grouped by author) ── */
.chat-item {
    display: flex; flex-direction: row; align-items: flex-start;
    gap: 7px; padding: 5px 8px; border-radius: 8px;
    border-left: 3px solid rgba(99,102,241,.18);
}
.chat-item.me { border-left-color: var(--accent, #6366f1); background: rgba(99,102,241,.06); }

.chat-item-avatar {
    width: 32px; height: 32px; flex-shrink: 0;
    border-radius: 8px;
    background: rgba(79,104,232,.08);
    border: 1px solid var(--border, rgba(99,102,241,.2));
    margin-top: 1px;
    cursor: pointer;
    transition: opacity .12s;
}
.chat-item-avatar:hover { opacity: .8; }
.chat-item-avatar.chat-item-avatar-letter {
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    color: var(--accent, #6366f1);
}
.chat-item-avatar img {
    width: 100%; height: 100%; object-fit: contain; display: block;
}
/* char-rare now uses .frame-rare-char from cosmetics.css */
.chat-item-content {
    flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px;
}

.chat-item-author {
    display: flex; align-items: center;
    justify-content: space-between; gap: 6px;
}
.chat-item-author-main { display: flex; align-items: center; gap: 5px; min-width: 0; flex: 1; }
.chat-item-name {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 11.5px; font-weight: 700;
    color: var(--accent, #6366f1);
    max-width: 110px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
    cursor: pointer;
}
.chat-item-name:hover { text-decoration: underline; }
.chat-item-name.verified-badge::after { content: ''; display: inline-block; width: 9px; height: 9px; margin-left: 2px; vertical-align: middle; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%230d6efd' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M10.067.87a2.89 2.89 0 0 0-4.134 0l-.622.638-.89-.011a2.89 2.89 0 0 0-2.924 2.924l.01.89-.636.622a2.89 2.89 0 0 0 0 4.134l.637.622-.011.89a2.89 2.89 0 0 0 2.924 2.924l.89-.01.622.636a2.89 2.89 0 0 0 4.134 0l.622-.637.89.011a2.89 2.89 0 0 0 2.924-2.924l-.01-.89.636-.622a2.89 2.89 0 0 0 0-4.134l-.637-.622.011-.89a2.89 2.89 0 0 0-2.924-2.924l-.89.01-.622-.636zm.287 5.984-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7 8.793l2.646-2.647a.5.5 0 0 1 .708.708z'/%3E%3C/svg%3E") no-repeat center / contain; }
/* Winner icons — weekly (star) and monthly (crown) */
.chat-item-name.winner-weekly::before {
    content: '\2B50'; /* star */
    margin-right: 2px;
    font-size: 9px;
    vertical-align: middle;
}
.chat-item-name.winner-weekly { color: #f59e0b; }
.chat-item-name.winner-monthly::before {
    content: '\uD83D\uDC51'; /* crown */
    margin-right: 2px;
    font-size: 9px;
    vertical-align: middle;
}
.chat-item-name.winner-monthly { color: #a855f7; }
.chat-item-title {
    font-size: 9px; font-weight: 600;
    color: var(--gold, #fbbf24);
    letter-spacing: .02em;
    line-height: 1.2;
    margin-top: 1px;
}
.chat-item-time {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px; color: var(--muted, #64748b);
    white-space: nowrap; flex-shrink: 0;
}

.chat-msg-lines { display: flex; flex-direction: column; gap: 2px; padding-left: 2px; }
.chat-msg-line { cursor: pointer; padding: 2px 4px; border-radius: 4px; transition: background .1s; }
.chat-msg-line:hover { background: rgba(99,102,241,.07); }
.chat-msg-line.self { cursor: default; position: relative; }
.chat-msg-line.self:hover { background: rgba(99,102,241,.05); }
.gc-del-btn {
    display: none; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
    background: rgba(239,68,68,.15); color: #f87171; border: none; border-radius: 4px;
    width: 20px; height: 20px; font-size: 10px; line-height: 1; cursor: pointer;
    align-items: center; justify-content: center; padding: 0; transition: background .15s;
}
.gc-del-btn:hover { background: rgba(239,68,68,.35); }
.chat-msg-line.self:hover .gc-del-btn { display: inline-flex; }
.chat-item-msg {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 12.5px; line-height: 1.4;
    color: var(--text, #e2e8f0);
    overflow-wrap: anywhere; word-break: break-word;
}
.chat-item-msg a { color: var(--accent, #6366f1); text-decoration: underline; text-underline-offset: 2px; }

.chat-mention-tag {
    display: inline-flex; align-items: center;
    margin-right: 3px; padding: 0 5px;
    border-radius: 999px;
    background: rgba(99,102,241,.12);
    border: 1px solid rgba(99,102,241,.22);
    color: var(--accent, #6366f1);
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 10.5px; font-weight: 700;
}
.chat-msg-reply {
    padding: 4px 8px; margin-bottom: 2px;
    border-left: 2px solid rgba(99,102,241,.45);
    border-radius: 4px; background: rgba(99,102,241,.07);
}
.chat-msg-reply-name {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 10px; font-weight: 700;
    color: var(--accent, #6366f1);
}
.chat-msg-reply-text {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 11px; color: var(--muted, #64748b); line-height: 1.3;
}

/* ── Reply preview bar ── */
.chat-reply-preview {
    display: none; align-items: center; gap: 6px;
    padding: 5px 10px; flex-shrink: 0;
    border-top: 1px solid var(--border, rgba(99,102,241,.2));
    background: rgba(99,102,241,.06);
}
.chat-reply-preview.show { display: flex; }
.chat-reply-label {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-weight: 700; font-size: 11px;
    color: var(--accent, #6366f1); white-space: nowrap;
}
.chat-reply-snippet {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 11px; flex: 1;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--muted, #64748b);
}
.chat-reply-cancel {
    background: none; border: none; cursor: pointer;
    color: var(--muted, #64748b);
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 15px; padding: 0 2px; line-height: 1; flex-shrink: 0;
}

/* ── Compose area ── */
.chat-compose {
    display: flex; gap: 6px; padding: 8px 10px; flex-shrink: 0;
    border-top: 1px solid var(--border, rgba(99,102,241,.2));
    background: var(--surface, #12122a);
}
.chat-input {
    flex: 1; padding: 8px 12px; border-radius: 10px; outline: none;
    border: 1px solid var(--border, rgba(99,102,241,.2));
    background: var(--bg2, #0a0a1f);
    color: var(--text, #e2e8f0);
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 13px; min-height: 36px;
}
.chat-input:focus { border-color: rgba(99,102,241,.5); box-shadow: 0 0 0 3px rgba(99,102,241,.08); }
.chat-send {
    border: none; border-radius: 10px; cursor: pointer;
    background: linear-gradient(135deg, var(--accent, #6366f1) 0%, var(--cyan, #22d3ee) 100%);
    color: #fff; font-family: 'Bungee', cursive;
    font-size: 12px; letter-spacing: .04em;
    padding: 0 14px; min-width: 60px;
}
.chat-send:disabled { opacity: .45; cursor: not-allowed; }

/* ── Tiny button (shared: friends/requests rows + profile) ─── */
.tiny-btn {
    padding: 5px 10px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    background: var(--accent, #6366f1);
    color: #fff;
    cursor: pointer;
    transition: background .15s, transform .1s;
    white-space: nowrap;
    letter-spacing: .02em;
}
.tiny-btn:hover { background: #818cf8; transform: translateY(-1px); }
.tiny-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.tiny-btn.danger { background: var(--red, #e5304e); }
.tiny-btn.danger:hover { background: #f43f5e; }

/* ── Profile tooltip (fixed, appended to body) ───────────────── */
.sh-ptip {
    position: fixed;
    z-index: 9999;
    width: 230px;
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.28));
    animation: shPtipIn .12s ease;
}
@keyframes shPtipIn {
    from { opacity: 0; transform: translateY(4px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
.sh-ptip-inner {
    background: var(--surface, #12122a);
    border: 1px solid var(--border, rgba(99,102,241,.22));
    border-radius: 14px;
    overflow: hidden;
}
/* Arrow */
.sh-ptip-arr {
    position: absolute;
    width: 12px; height: 12px;
    background: var(--surface, #12122a);
    border: 1px solid var(--border, rgba(99,102,241,.22));
    transform: rotate(45deg);
}
.sh-ptip-above .sh-ptip-arr {
    bottom: -7px;
    border-top: none; border-left: none;
}
.sh-ptip-below .sh-ptip-arr {
    top: -7px;
    border-bottom: none; border-right: none;
}
/* Loading */
.sh-ptip-loading {
    padding: 20px;
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 18px;
    color: var(--muted, #64748b);
    letter-spacing: .2em;
}
/* Body */
.sh-ptip-body { padding: 12px; }
.sh-ptip-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.sh-ptip-av {
    width: 52px; height: 60px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(79,104,232,.08);
    border: 1px solid var(--border, rgba(99,102,241,.2));
}
.sh-ptip-av img { border-radius: 10px; }
/* char-rare now uses .frame-rare-char from cosmetics.css */
.sh-ptip-av img {
    width: 100%; height: 100%; object-fit: contain; display: block;
}
.sh-ptip-meta { flex: 1; min-width: 0; }
.sh-ptip-name {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 14px; font-weight: 700;
    color: var(--text, #e2e8f0);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sh-ptip-name.verified::after {
    content: '';
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-left: 3px;
    vertical-align: middle;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%230d6efd' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M10.067.87a2.89 2.89 0 0 0-4.134 0l-.622.638-.89-.011a2.89 2.89 0 0 0-2.924 2.924l.01.89-.636.622a2.89 2.89 0 0 0 0 4.134l.637.622-.011.89a2.89 2.89 0 0 0 2.924 2.924l.89-.01.622.636a2.89 2.89 0 0 0 4.134 0l.622-.637.89.011a2.89 2.89 0 0 0 2.924-2.924l-.01-.89.636-.622a2.89 2.89 0 0 0 0-4.134l-.637-.622.011-.89a2.89 2.89 0 0 0-2.924-2.924l-.89.01-.622-.636zm.287 5.984-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7 8.793l2.646-2.647a.5.5 0 0 1 .708.708z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.sh-ptip-pts {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px; font-weight: 700;
    color: var(--cyan, #22d3ee);
    margin-top: 2px;
}
.sh-ptip-title {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 10px; font-weight: 600;
    color: var(--gold, #fbbf24);
    margin-top: 1px;
    letter-spacing: .03em;
}
.sh-ptip-rank {
    display: flex; align-items: center; gap: 6px;
    margin-top: 3px;
}
.sh-ptip-tier {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 11px; font-weight: 700;
    padding: 1px 6px; border-radius: 4px;
    line-height: 1.3;
}
.sh-ptip-tier.tier-bronze   { background: rgba(205,127,50,.18); color: #CD7F32; }
.sh-ptip-tier.tier-silver   { background: rgba(192,192,192,.18); color: #aaa; }
.sh-ptip-tier.tier-gold     { background: rgba(255,215,0,.18); color: #FFD700; }
.sh-ptip-tier.tier-platinum { background: rgba(0,206,209,.18); color: #00CED1; }
.sh-ptip-tier.tier-diamond  { background: rgba(99,102,241,.15); color: #818cf8; }
.sh-ptip-tier.tier-master   { background: rgba(255,69,0,.18); color: #FF4500; }
.sh-ptip-rp {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px; color: var(--muted, #64748b);
}
.sh-ptip-currencies {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px; font-weight: 600;
    color: var(--cyan, #22d3ee);
    margin-top: 2px;
}
.sh-ptip-loc {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    color: var(--muted, #64748b);
    margin-top: 2px;
}
.sh-ptip-status {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 11px; font-weight: 700;
    color: #22c55e;
    margin-bottom: 8px;
    padding: 4px 8px;
    background: rgba(34,197,94,.1);
    border-radius: 6px;
    text-align: center;
}
.sh-ptip-acts {
    display: flex; gap: 6px;
    margin-top: 2px;
}
.sh-ptip-acts .tiny-btn {
    flex: 1; font-size: 11px; padding: 6px 8px; text-align: center;
}

/* ── Global Chat ──────────────────────────────────────────────── */
.sh-global-msg {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 5px;
    padding: 5px 12px;
    font-size: 13px;
    line-height: 1.4;
    border-bottom: 1px solid var(--border, rgba(99,102,241,.08));
}
.sh-global-msg:last-child { border-bottom: none; }
.sh-global-msg > .chat-item-avatar {
    width: 22px; height: 22px; flex-shrink: 0;
    border-radius: 5px;
    background: rgba(79,104,232,.08);
}
.sh-global-msg > .chat-item-avatar img {
    width: 100%; height: 100%; object-fit: contain; display: block;
    border-radius: 5px;
}
.sh-global-msg > .chat-item-avatar-letter {
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    color: var(--accent, #6366f1);
}
.sh-global-msg .chat-item-name {
    font-weight: 700;
    color: var(--accent, #6366f1);
    cursor: pointer;
    white-space: nowrap;
}
.sh-global-msg .chat-item-name:hover { text-decoration: underline; }
.sh-global-colon { color: var(--muted, #64748b); }
.sh-global-text { color: var(--text, #e2e8f0); flex: 1; word-break: break-word; }
.sh-global-time {
    font-size: 10px;
    color: var(--muted, #64748b);
    margin-left: auto;
    white-space: nowrap;
}

/* ── Global Chat Reply Bar ────────────────────────────────────── */
.sh-gc-reply-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: var(--surface2, #14142e);
    border-top: 1px solid var(--border, rgba(99,102,241,.15));
    font-size: 11px;
}
.sh-gc-reply-label { color: var(--accent, #6366f1); font-weight: 600; white-space: nowrap; }
.sh-gc-reply-snippet { color: var(--muted, #64748b); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-gc-reply-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 4px; }
.sh-gc-reply-close:hover { color: var(--text); }

/* ── Chat Msg Reply Bubble ───────────────────────────────────── */
.chat-msg-reply {
    padding: 4px 8px; margin-bottom: 2px;
    border-left: 2px solid var(--accent, #6366f1);
    background: rgba(99,102,241,.06);
    border-radius: 4px; font-size: 11px;
}
.chat-msg-reply-name { color: var(--accent, #6366f1); font-weight: 600; }
.chat-msg-reply-text { color: var(--muted, #64748b); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.chat-mention-tag { color: var(--accent, #6366f1); font-weight: 600; margin-right: 3px; }
.chat-msg-line { cursor: pointer; padding: 1px 0; border-radius: 4px; }
.chat-msg-line:hover { background: rgba(99,102,241,.04); }
.chat-link { color: var(--cyan, #22d3ee); text-decoration: underline; }

/* ── Notification Center ──────────────────────────────────────── */
.sh-notif-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border, rgba(99,102,241,.2));
    flex-shrink: 0;
}
.sh-mark-all-btn {
    background: none;
    border: 1px solid var(--border, rgba(99,102,241,.2));
    border-radius: 6px;
    color: var(--accent, #6366f1);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.sh-mark-all-btn:hover { background: rgba(99,102,241,.1); }
.sh-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(99,102,241,.04);
    border: 1px solid rgba(99,102,241,.1);
    border-left: 3px solid rgba(99,102,241,.2);
    border-radius: 10px;
    cursor: pointer;
    transition: background .12s;
}
.sh-notif-item:hover { background: rgba(99,102,241,.08); }
.sh-notif-item.sh-notif-unread {
    background: rgba(99,102,241,.08);
    border-left-color: var(--accent, #6366f1);
}
.sh-notif-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}
.sh-notif-body { flex: 1; min-width: 0; }
.sh-notif-title {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--text, #e2e8f0);
    line-height: 1.3;
}
.sh-notif-text {
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 11px;
    color: var(--muted, #64748b);
    line-height: 1.3;
    margin-top: 1px;
    word-break: break-word;
}
.sh-notif-time {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: var(--muted, #64748b);
    margin-top: 3px;
}
.sh-notif-actions {
    display: flex;
    gap: 4px;
    margin-top: 5px;
}
.sh-notif-actions .tiny-btn {
    font-size: 10px;
    padding: 3px 8px;
}
.sh-load-more-btn {
    display: block;
    width: 100%;
    padding: 8px 0;
    border: 1px dashed var(--border, rgba(99,102,241,.2));
    border-radius: 8px;
    background: transparent;
    color: var(--accent, #6366f1);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s;
}
.sh-load-more-btn:hover { background: rgba(99,102,241,.06); }

/* Toast */
.sh-notif-toast {
    position: fixed;
    bottom: 84px;
    right: 16px;
    z-index: 1200;
    max-width: 300px;
    padding: 10px 14px;
    background: var(--surface, #1a1a2e);
    border: 1px solid var(--border, rgba(99,102,241,.22));
    border-left: 3px solid var(--accent, #6366f1);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    font-family: 'Be Vietnam Pro', 'DM Sans', sans-serif;
    font-size: 12px;
    color: var(--text, #e2e8f0);
    line-height: 1.4;
    opacity: 0;
    transform: translateY(10px) scale(.96);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}
.sh-notif-toast-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}
@media (max-width: 760px) {
    .sh-notif-toast { right: 10px; left: 10px; max-width: none; bottom: 80px; }
}

/* ── Lock Banner ──────────────────────────────────────────────── */
.sh-locked-banner {
    padding: 20px 16px;
    text-align: center;
    color: var(--muted, #64748b);
    font-size: 13px;
    font-style: italic;
    line-height: 1.5;
}

/* ================================================================
   GIFT MODAL  (matches auth-modal design system)
   ================================================================ */
.sh-gift-overlay {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,0.58);
    backdrop-filter: blur(4px);
    animation: shGiftFadeIn .15s ease;
}
@keyframes shGiftFadeIn { from { opacity: 0; } to { opacity: 1; } }

.sh-gift-card {
    width: min(100%, 400px);
    border-radius: 24px;
    border: 1px solid var(--border, rgba(99,102,241,0.14));
    background:
        linear-gradient(180deg, rgba(91,141,238,0.1), transparent 44%),
        var(--surface, #ffffff);
    box-shadow: var(--shadow, 0 18px 40px rgba(15,23,42,0.12));
    padding: 20px;
    color: var(--text, #172033);
    font-family: var(--font-body, "Be Vietnam Pro", sans-serif);
    animation: shGiftSlideUp .2s ease;
}
@keyframes shGiftSlideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.sh-gift-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border, rgba(99,102,241,0.14));
    font-weight: 700; font-size: 15px;
}
.sh-gift-close {
    background: none; border: none; font-size: 18px;
    cursor: pointer; color: var(--muted, #64748b);
    padding: 6px 10px; border-radius: 10px;
    transition: background .2s;
}
.sh-gift-close:hover { background: var(--surface-soft, rgba(245,247,251,0.98)); color: var(--text, #172033); }

.sh-gift-body { display: flex; flex-direction: column; gap: 14px; }

.sh-gift-recipient {
    display: flex; gap: 12px; align-items: center;
    padding: 10px 12px;
    background: var(--bg, #f4f5f7);
    border: 1px solid var(--border, rgba(99,102,241,0.14));
    border-radius: 14px;
}
.sh-gift-av {
    width: 48px; height: 48px; flex-shrink: 0;
    border-radius: 50%; overflow: hidden;
    background: rgba(0,0,0,.08);
}
.sh-gift-av img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.sh-gift-info { flex: 1; min-width: 0; }
.sh-gift-name {
    font-weight: 700; font-size: 14px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sh-gift-name.verified::after {
    content: '';
    display: inline-block;
    width: 11px; height: 11px;
    margin-left: 3px; vertical-align: middle;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%230d6efd' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M10.067.87a2.89 2.89 0 0 0-4.134 0l-.622.638-.89-.011a2.89 2.89 0 0 0-2.924 2.924l.01.89-.636.622a2.89 2.89 0 0 0 0 4.134l.637.622-.011.89a2.89 2.89 0 0 0 2.924 2.924l.89-.01.622.636a2.89 2.89 0 0 0 4.134 0l.622-.637.89.011a2.89 2.89 0 0 0 2.924-2.924l-.01-.89.636-.622a2.89 2.89 0 0 0 0-4.134l-.637-.622.011-.89a2.89 2.89 0 0 0-2.924-2.924l-.89.01-.622-.636zm.287 5.984-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7 8.793l2.646-2.647a.5.5 0 0 1 .708.708z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.sh-gift-title { font-size: 11px; margin-top: 1px; }
.sh-gift-tier { margin-top: 2px; }
.sh-gift-tier .sh-ptip-tier { font-size: 11px; }

.sh-gift-form { display: flex; flex-direction: column; gap: 10px; }
.sh-gift-label {
    font-size: 12px; font-weight: 600;
    color: var(--muted, #64748b);
    letter-spacing: 0.02em;
}
.sh-gift-input {
    width: 100%; min-height: 42px; padding: 0 12px;
    background: var(--bg, #f4f5f7);
    border: 1px solid var(--border, rgba(99,102,241,0.14));
    border-radius: 12px; color: var(--text, #172033);
    font-size: 15px; font-weight: 600;
    font-family: inherit; box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
    -moz-appearance: textfield;
}
.sh-gift-input::-webkit-inner-spin-button,
.sh-gift-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sh-gift-input:focus {
    border-color: var(--blue, #4f68e8);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79,104,232,0.15);
}

.sh-gift-quick { display: flex; gap: 4px; flex-wrap: wrap; }
.sh-gift-quick button {
    flex: 1; min-width: 48px; padding: 6px 8px;
    border: 1px solid var(--border, rgba(99,102,241,0.14));
    border-radius: 10px;
    background: var(--surface-soft, rgba(245,247,251,0.98));
    color: var(--text, #172033);
    font-size: 12px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all .15s;
}
.sh-gift-quick button:hover {
    background: linear-gradient(135deg, var(--blue, #4f68e8) 0%, var(--cyan, #0891b2) 100%);
    color: #fff; border-color: transparent;
    transform: translateY(-1px);
}

.sh-gift-summary {
    font-size: 12px;
    display: flex; flex-direction: column; gap: 3px;
    padding: 8px 10px;
    background: var(--bg, #f4f5f7);
    border-radius: 10px;
}
.sh-gift-row {
    display: flex; justify-content: space-between;
    padding: 2px 0; color: var(--muted, #64748b);
}
.sh-gift-row.total {
    font-weight: 700; color: var(--text, #172033);
    border-top: 1px solid var(--border, rgba(99,102,241,0.14));
    padding-top: 5px; margin-top: 3px;
}
.sh-gift-row.remain { color: var(--green, #059669); font-weight: 600; }

.sh-gift-footer {
    display: flex; gap: 8px;
    margin-top: 16px;
}
.sh-gift-btn {
    flex: 1; min-height: 42px; border: none; border-radius: 14px;
    font-size: 14px; font-weight: 700; cursor: pointer;
    font-family: inherit;
    transition: transform .16s ease, opacity .2s;
}
.sh-gift-btn:hover { transform: translateY(-1px); opacity: 0.92; }
.sh-gift-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.sh-gift-btn.cancel {
    background: var(--surface-soft, rgba(245,247,251,0.98));
    color: var(--muted, #64748b);
    border: 1px solid var(--border, rgba(99,102,241,0.14));
}
.sh-gift-btn.cancel:hover { color: var(--text, #172033); }
.sh-gift-btn.confirm {
    background: linear-gradient(135deg, var(--blue, #4f68e8) 0%, var(--cyan, #0891b2) 100%);
    color: #fff;
    box-shadow: var(--shadow, 0 18px 40px rgba(15,23,42,0.12));
}

/* ── Gift Tabs ── */
.sh-gift-tabs {
    display: flex; gap: 4px;
    background: var(--bg, #f4f5f7);
    border-radius: 12px; padding: 3px;
}
.sh-gift-tab {
    flex: 1; padding: 7px 0; border: none; border-radius: 10px;
    background: transparent; color: var(--muted, #64748b);
    font-size: 13px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all .18s;
}
.sh-gift-tab.active {
    background: var(--surface, #ffffff);
    color: var(--text, #172033);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.sh-gift-tab:hover:not(.active) { color: var(--text, #172033); }

/* ── Gift Items Grid ── */
.sh-gift-items-loading,
.sh-gift-items-empty {
    text-align: center; padding: 20px 8px;
    color: var(--muted, #64748b); font-size: 13px;
}
.sh-gift-items-grid {
    display: flex; flex-direction: column; gap: 6px;
    max-height: 220px; overflow-y: auto;
    padding: 2px;
}
.sh-gift-items-grid::-webkit-scrollbar { width: 4px; }
.sh-gift-items-grid::-webkit-scrollbar-thumb { background: var(--border, rgba(99,102,241,0.18)); border-radius: 4px; }

.sh-gift-item {
    display: flex; gap: 10px; align-items: center;
    padding: 8px 10px;
    border: 1.5px solid var(--border, rgba(99,102,241,0.14));
    border-radius: 12px;
    background: var(--surface-soft, rgba(245,247,251,0.98));
    cursor: pointer; transition: all .15s;
}
.sh-gift-item:hover {
    border-color: var(--blue, #4f68e8);
    background: rgba(79,104,232,0.06);
}
.sh-gift-item.selected {
    border-color: var(--blue, #4f68e8);
    background: rgba(79,104,232,0.1);
    box-shadow: 0 0 0 2px rgba(79,104,232,0.18);
}
.sh-gift-item.rarity-rare { border-left: 3px solid #a855f7; }
.sh-gift-item.rarity-legendary { border-left: 3px solid #f59e0b; }
.sh-gift-item-icon {
    width: 32px; height: 32px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; border-radius: 8px;
    background: var(--bg, #f4f5f7);
}
.sh-gift-item-info { flex: 1; min-width: 0; }
.sh-gift-item-name {
    font-size: 13px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--text, #172033);
}
.sh-gift-item-type {
    font-size: 11px; color: var(--muted, #64748b); margin-top: 1px;
}
.sh-gift-item-price {
    flex-shrink: 0; font-size: 12px; font-weight: 700;
    color: var(--amber, #d97706);
    white-space: nowrap;
}

/* ── Gift Characters Grid ── */
.sh-gift-chars-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
    padding: 2px;
}

.sh-gift-char {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 6px 4px;
    border: 1.5px solid var(--border, rgba(99,102,241,0.14));
    border-radius: 12px;
    background: var(--surface-soft, rgba(245,247,251,0.98));
    cursor: pointer; transition: all .15s;
}
.sh-gift-char:hover {
    border-color: var(--blue, #4f68e8);
    background: rgba(79,104,232,0.06);
}
.sh-gift-char.selected {
    border-color: var(--blue, #4f68e8);
    background: rgba(79,104,232,0.1);
    box-shadow: 0 0 0 2px rgba(79,104,232,0.18);
}
.sh-gift-char.rarity-rare { border-color: #a855f7; }
.sh-gift-char.rarity-rare.selected { border-color: #a855f7; box-shadow: 0 0 0 2px rgba(168,85,247,0.22); }
.sh-gift-char img {
    width: 48px; height: 48px; object-fit: cover;
    image-rendering: pixelated; border-radius: 6px;
}
.sh-gift-char-name {
    font-size: 10px; font-weight: 600;
    color: var(--text, #172033);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%; text-align: center;
}
.sh-gift-char-price {
    font-size: 9px; font-weight: 700;
    color: var(--amber, #d97706); text-align: center;
}

/* ── Gift Characters Paging ── */
.sh-gift-chars-paging {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 6px;
}
.sh-gift-page-btn {
    background: var(--surface-soft, rgba(245,247,251,0.98));
    border: 1px solid var(--border, rgba(99,102,241,0.14));
    border-radius: 8px; padding: 4px 10px;
    font-size: 12px; cursor: pointer; transition: all .15s;
    color: var(--text, #172033);
}
.sh-gift-page-btn:hover {
    background: var(--blue, #4f68e8); color: #fff; border-color: transparent;
}
.sh-gift-page-info {
    font-size: 12px; color: var(--muted, #64748b); font-weight: 600;
}
