/* ShotGram v116 — new Explore, ranked Clans list, new clan page. Loads last. */

/* ───────────── Explore ───────────── */
.xp-head { padding: 14px 16px 6px; display: grid; gap: 2px; }
.xp-head h1 { font-size: 28px; letter-spacing: -.03em; }
.xp-search { position: sticky; top: var(--sa-top-h, 0px); z-index: 20; padding: 8px 12px 10px;
  background: linear-gradient(var(--ink, #05060d) 70%, transparent); }
.xp-search .search-wrap { border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.xp-discovery { display: grid; gap: 14px; padding: 4px 0 6px; }
.xp-block { display: grid; gap: 10px; }
.xp-block-head { padding: 0 16px; font-size: 15px; }
.xp-discovery .explore-people-strip { display: flex; gap: 12px; overflow-x: auto; padding: 2px 16px 6px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.xp-discovery .explore-people-strip::-webkit-scrollbar { display: none; }
.xp-discovery .explore-person-card { flex: none; width: 104px; scroll-snap-align: start; display: grid; justify-items: center; gap: 6px;
  padding: 14px 8px 12px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); }
.xp-discovery .explore-person-card b { max-width: 92px; font-size: 13px; }
.xp-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px; }
.xp-tag { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; font-weight: 700; font-size: 13.5px;
  background: linear-gradient(135deg, rgba(10,180,251,.16), rgba(205,14,251,.16)); border: 1px solid rgba(var(--violet-rgb, 139, 92, 255),.3); color: #fff; }
.xp-tag small { font-weight: 600; opacity: .65; font-size: 11px; }
.xp-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 16px 8px; }
.xp-title b { font-size: 17px; }
.explore-hero-v71 { display: none !important; }

/* ───────────── Clans tab: one ranked list ───────────── */
.clan-list-head { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 16px 4px; }
.clan-list-head b { font-size: 18px; }
.clan-search { position: sticky; top: var(--sa-top-h, 0px); z-index: 15; padding: 6px 12px 8px;
  background: linear-gradient(var(--ink, #05060d) 70%, transparent); }
.clan-ranked { display: grid; gap: 8px; padding: 4px 12px 24px; }
.clan-rank-row { display: flex !important; align-items: center; gap: 12px; padding: 12px !important; border-radius: 18px !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--clan-color, #5865f2) 14%, transparent), rgba(255,255,255,.03)) !important;
  border: 1px solid color-mix(in srgb, var(--clan-color, #5865f2) 30%, transparent) !important; text-align: start; }
.clan-rank-no { width: 30px; flex: none; text-align: center; font-weight: 900; font-size: 15px; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; }
.clan-rank-row.podium .clan-rank-no { font-size: 22px; }
.clan-rank-row.p1 { box-shadow: 0 0 0 1px rgba(255,204,51,.5), 0 10px 30px rgba(255,204,51,.12); }
.clan-rank-row.p2 { box-shadow: 0 0 0 1px rgba(200,210,230,.4); }
.clan-rank-row.p3 { box-shadow: 0 0 0 1px rgba(205,127,50,.45); }
.clan-rank-stats { display: flex; gap: 12px; align-items: center; margin-top: 3px; }
.clan-rank-stats > span { display: inline-flex; align-items: center; gap: 4px; }
.clan-rank-stats svg { width: 14px; height: 14px; }
.minw0 { min-width: 0; }
.top-clans, #topClans, #topClansHint { display: none !important; }

/* ───────────── Inside a clan: new hero ───────────── */
.clan-hero-v2 { position: relative; margin: 10px 12px 6px; border-radius: 26px; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--clan-color, #5865f2) 40%, #0b0d1c), color-mix(in srgb, var(--clan-color-2, #a855f7) 30%, #07080f));
  border: 1px solid color-mix(in srgb, var(--clan-color, #5865f2) 45%, transparent); box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.clan-hero-banner { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.clan-hero-glow { position: absolute; width: 260px; height: 260px; border-radius: 50%; top: -120px; inset-inline-end: -60px;
  background: radial-gradient(circle, color-mix(in srgb, var(--clan-color-2, #a855f7) 70%, transparent), transparent 70%); opacity: .55; }
.clan-hero-main { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 16px 8px; }
.clan-hero-emblem { width: 76px; height: 76px; flex: none; border-radius: 22px; display: grid; place-items: center;
  background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.clan-hero-text { min-width: 0; display: grid; gap: 6px; justify-items: start; }
.clan-hero-text h2 { font-size: 24px; max-width: 100%; }
.clan-hero-desc { position: relative; margin: 0 16px 6px; font-size: 13.5px; color: rgba(255,255,255,.78); line-height: 1.45; }
.clan-hero-stats { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 10px;
  background: rgba(255,255,255,.08); border-top: 1px solid rgba(255,255,255,.08); }
.clan-hero-stats > div { display: grid; justify-items: center; gap: 2px; padding: 11px 4px; background: rgba(5,6,13,.45); }
.clan-hero-stats b { font-size: 16px; font-weight: 900; }
.clan-hero-stats span { font-size: 11px; color: rgba(255,255,255,.6); }
.clan-hero-stats .clan-owner-badge, .clan-hero-stats .clan-rank { font-size: 11.5px; padding: 3px 8px; }
.clan-room-hero { display: none !important; }

/* clan page rooms list */
#clanPane .clan-channel-head { padding: 14px 16px 8px; border: 0; }
#clanPane .voice-room { margin: 0 12px 10px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
#clanPane .voice-room.joined { border-color: rgba(52, 245, 164, .45); background: rgba(52, 245, 164, .06); }
.clan-home-cta { min-height: 74px; }

/* ───────────── Performance: lists that are off-screen are not painted ───────────── */
.clan-rank-row { content-visibility: auto; contain-intrinsic-size: auto 76px; }

/* ───────────── DM press-and-hold (Instagram style) ───────────── */
.dm-actions { position: fixed; inset: 0; z-index: 2400; background: rgba(8, 9, 16, .55);
  -webkit-backdrop-filter: blur(18px) saturate(1.1); backdrop-filter: blur(18px) saturate(1.1);
  display: flex; align-items: flex-end; animation: dmActIn .16s ease-out; }
.dm-actions.out { animation: dmActOut .16s ease-in forwards; }
@keyframes dmActIn { from { opacity: 0; } } @keyframes dmActOut { to { opacity: 0; } }
.dm-actions-inner { width: 100%; padding: 0 14px calc(env(safe-area-inset-bottom, 0px) + 18px); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.dm-actions.mine .dm-actions-inner { align-items: flex-end; }
.dm-react-bar { display: flex; gap: 2px; padding: 8px 10px; border-radius: 999px; background: #1f1f24; box-shadow: 0 12px 40px rgba(0,0,0,.45);
  max-width: 100%; overflow-x: auto; scrollbar-width: none; animation: dmPop .2s cubic-bezier(.2,1.4,.4,1); }
.dm-react-bar::-webkit-scrollbar { display: none; }
.dm-react-bar button { border: 0; background: none; font-size: 30px; line-height: 1; width: 46px; height: 46px; border-radius: 50%; flex: none; transition: transform .12s; }
.dm-react-bar button:active { transform: scale(1.3); }
.dm-react-bar button.on { background: rgba(255,255,255,.14); }
.dm-actions-bubble { max-width: 82%; pointer-events: none; }
.dm-actions-bubble .bubble { margin: 0 !important; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.dm-actions-bubble .dm-reacts { display: none; }
.dm-actions-list { min-width: 230px; border-radius: 22px; overflow: hidden; background: #1f1f24; box-shadow: 0 16px 50px rgba(0,0,0,.5); animation: dmPop .22s cubic-bezier(.2,1.2,.4,1); }
.dm-actions-list button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 20px; border: 0; background: none;
  color: #fff; font-size: 17px; font-weight: 600; text-align: start; }
.dm-actions-list button + button { border-top: 1px solid rgba(255,255,255,.06); }
.dm-actions-list button:active { background: rgba(255,255,255,.07); }
.dm-actions-list button svg { width: 24px; height: 24px; flex: none; }
.dm-actions-list button.danger { color: #ff453a; }
@keyframes dmPop { from { opacity: 0; transform: scale(.92); } }

/* reactions under a bubble */
.bubble-row.has-react { margin-bottom: 14px; }
.bubble { position: relative; }
.dm-reacts { position: absolute; bottom: -16px; inset-inline-start: 10px; display: inline-flex; gap: 2px; padding: 2px 6px;
  border-radius: 999px; background: #22232b; border: 2px solid var(--ink, #05060d); font-size: 14px; line-height: 1.3; cursor: pointer; }
.bubble-row.mine .dm-reacts { inset-inline-start: auto; inset-inline-end: 10px; }
.dm-reacts small { font-size: 11px; font-weight: 700; margin-inline-start: 2px; opacity: .8; }

/* quoted message inside a reply */
.dm-quote { display: grid; gap: 1px; width: 100%; margin: -2px 0 6px; padding: 6px 10px; border: 0; border-radius: 12px; text-align: start;
  background: rgba(0,0,0,.22); border-inline-start: 3px solid rgba(255,255,255,.55); color: inherit; font-size: 12.5px; }
.dm-quote b { font-size: 11.5px; opacity: .85; }
.dm-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.bubble-row.flash .bubble { animation: dmFlash 1.2s ease; }
@keyframes dmFlash { 30% { box-shadow: 0 0 0 3px rgba(var(--violet-rgb, 139, 92, 255),.8); } }

/* "Replying to…" bar above the composer */
.room-bar .dm-replying { position: absolute; bottom: 100%; left: 0; right: 0; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; background: #15161e; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.room-bar .dm-replying b { font-size: 12px; color: #a78bfa; }
.room-bar .dm-replying .truncate { opacity: .75; }
.clan-hero-stats .clan-policy { font-size: 11px; padding: 3px 8px; }
.clan-public-action { padding: 10px 12px; }
.clan-hero-v2 + .notice { margin: 6px 12px; }
.clan-hero-v2 .clan-hero-stats:has(> div:nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
.profile-friends { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 2px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(var(--violet-rgb, 139, 92, 255),.35); background: rgba(var(--violet-rgb, 139, 92, 255),.12); color: #fff; font-weight: 700; font-size: 13px; }
.profile-friends svg { width: 16px; height: 16px; }

/* v122 — auto-delete banner under the chat header */
.dm-ttl-bar { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 6px 12px; border: 0;
  background: rgba(var(--violet-rgb, 139, 92, 255), .12); color: #c4b5fd; font-size: 12.5px; font-weight: 600; border-bottom: 1px solid rgba(var(--violet-rgb, 139, 92, 255),.2); }
.dm-ttl-bar svg { width: 15px; height: 15px; }
