/* RUN20: scoped social surface; the existing page and native systems are untouched. */
#friends-social{--social-bg:#100c15;--social-panel:#17101b;--social-line:#ffffff12;--social-text:#f4edf5;--social-muted:#aaa1b1;--social-accent:#ff941c;color:var(--social-text);font-size:13px;line-height:1.5}
#friends-social svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
#friends-social button{font:inherit;letter-spacing:.04em;cursor:pointer}#friends-social button:disabled{cursor:not-allowed;opacity:.38}#friends-social button:focus-visible,#friends-social a:focus-visible{outline:2px solid var(--social-accent);outline-offset:3px}
.social-launch{position:fixed;bottom:24px;right:24px;width:64px;height:64px;display:grid;place-items:center;border:1px solid #ff941c55;background:#151016;box-shadow:0 10px 40px #0007,0 0 20px #ff941c08;border-radius:4px;color:var(--social-accent);z-index:75;transition:right .25s ease,background .2s}
#friends-social .social-launch svg{width:29px;height:29px}.social-launch:hover{background:#261a1b}.social-launch.is-open{right:424px}.social-badge{position:absolute;right:-7px;top:-7px;min-width:23px;height:23px;padding:0 5px;border-radius:15px;background:var(--social-accent);color:#211000;font-size:11px;font-weight:800;border:2px solid #100c15}
.social-panel{position:fixed;right:0;top:0;bottom:0;width:400px;max-width:100%;background:var(--social-bg);border-left:1px solid #ff941c40;box-shadow:-18px 0 70px #0006;z-index:74;display:flex;flex-direction:column;transform:translateX(104%);visibility:hidden;transition:transform .25s ease,visibility .25s;isolation:isolate}
.social-panel:before{content:'';position:absolute;left:0;right:0;top:0;height:2px;background:linear-gradient(90deg,#ff941c11,var(--social-accent),#ff941c11)}.social-panel.is-open{transform:translateX(0);visibility:visible}
#friends-social .social-header{height:auto;min-height:94px;display:flex;align-items:center;padding:22px;gap:12px;background:linear-gradient(110deg,#24151b,#100c15);border-bottom:1px solid var(--social-line);flex-shrink:0}
#friends-social h2,#friends-social h3,#friends-social p{margin:0}#friends-social h2{font-size:18px;letter-spacing:.11em}#friends-social h3{font-size:14px}.social-mark{display:grid;place-items:center;min-width:39px;height:39px;color:var(--social-accent);background:#ff941c0b;border:1px solid #ff941c40}.social-summary{color:var(--social-muted);font-size:11px;margin-top:3px!important}.social-close{margin-left:auto}
#friends-social .social-icon{display:inline-grid;place-items:center;min-width:36px;min-height:36px;padding:8px;border-radius:3px;background:transparent;color:#a49baa;border:1px solid var(--social-line)}#friends-social .social-icon:hover{color:var(--social-accent);background:#ff941c09;border-color:#ff941c4a}
.social-tabs{display:flex;border-bottom:1px solid var(--social-line);flex-shrink:0}.social-tabs>button{display:flex;justify-content:center;align-items:center;gap:8px;width:50%;min-height:53px;padding:12px 5px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:#9c93a5;font-size:11px!important;font-weight:700;letter-spacing:.12em!important}.social-tabs>button[aria-selected=true]{color:var(--social-accent);background:#ff941c07;border-bottom-color:var(--social-accent)}#friends-social .social-tabs svg{width:17px;height:17px}.social-tab-count{color:var(--social-accent)}
#friends-social .social-connection{padding:10px 22px;font-size:10px;color:#9fac9e;letter-spacing:.04em;border-bottom:1px solid var(--social-line)}#friends-social .social-connection.is-offline{color:#e5ba72}.social-content{overflow:auto;flex:1;overscroll-behavior:contain;min-height:0;scrollbar-width:thin;scrollbar-color:#584057 transparent}
#friends-social .social-section-label{display:flex;align-items:center;gap:9px;padding:19px 22px 10px;color:#928799;letter-spacing:.16em;text-transform:uppercase;font-size:10px}.social-section-label>span{display:grid;place-items:center;min-width:20px;height:18px;font-size:10px;color:var(--social-accent);border:1px solid #ff941c35}.social-mini-dot{width:6px;height:6px;background:var(--social-accent);border-radius:50%}#friends-social .social-section-label svg{width:13px;height:13px}
.social-friend{position:relative;display:grid;grid-template-columns:49px minmax(0,1fr) auto;column-gap:12px;padding:15px 22px;border-bottom:1px solid var(--social-line);transition:background .15s}.social-friend:hover{background:#ffffff03}.social-friend[data-presence=offline] .social-avatar{filter:saturate(.3)}.social-friend[data-presence=offline] .social-person{color:#b2a9b9}
.social-avatar{position:relative;display:grid;place-items:center;width:49px;height:49px;flex-shrink:0;background:linear-gradient(135deg,#4b3333,#221b2c);border:1px solid #ffffff19;color:#ddbc8a;font-weight:800;font-size:16px;border-radius:3px}.social-avatar img{width:100%;height:100%;object-fit:cover;border-radius:2px}.social-avatar.large{width:72px;height:72px;font-size:24px}.social-avatar.avatar-unavailable:before{content:'?';position:absolute;color:#c6b5ce}.social-dot{position:absolute;bottom:-3px;right:-3px;width:11px;height:11px;border:2px solid var(--social-bg);border-radius:50%;background:#635b6b}.social-dot.game{background:#ff941c}.social-dot.website{background:#eaca56}
.social-person{min-width:0}.social-person strong{display:block;font-size:13px;overflow-wrap:anywhere;line-height:1.4}.social-presence{display:block;font-size:11px;color:#b2a7bc;line-height:1.5;margin-top:3px}.social-friend[data-presence=game] .social-presence{color:#ed9f40}.social-friend[data-presence=website] .social-presence{color:#d4bd69}.social-server{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;border:1px solid #ff941c2b;background:#ff941c07;color:#bfa98b;font-size:10px;padding:1px 5px;margin-top:5px}
.social-actions{grid-column:2 / 4;display:flex;gap:7px;margin-top:10px}#friends-social .social-actions button{height:36px;min-width:40px}.social-unread{display:inline-grid;place-items:center;height:20px;min-width:20px;padding:0 5px;border-radius:10px;background:#ff941c;color:#211306;font-size:10px;font-weight:800}
#friends-social .social-footer{margin:0;padding:15px 22px;border-top:1px solid var(--social-line);display:block;background:#110d16;flex-shrink:0}#friends-social .social-add{width:100%;display:flex;justify-content:center;align-items:center;gap:10px;padding:12px 8px;font-size:10px;color:#c3b8cc;border:1px solid var(--social-line);background:transparent;letter-spacing:.16em}#friends-social .social-add svg{width:17px;height:17px}
#friends-social .social-empty{padding:32px 22px;color:var(--social-muted);font-size:13px;line-height:1.7}#friends-social .social-empty h3{color:#efe6f2;margin-bottom:10px}#friends-social .social-empty p{margin-bottom:18px}#friends-social .social-empty.small{padding:6px 22px 18px;font-size:11px}
.social-invite,.social-search-person{display:flex;align-items:center;gap:12px;padding:16px 22px;border-bottom:1px solid var(--social-line)}.social-invite>div,.social-search-person strong{min-width:0;overflow-wrap:anywhere;flex:1}.social-invite small{display:block;color:var(--social-muted);font-size:11px}.social-invite button,.social-search-person button{font-size:11px!important;margin-top:6px;padding:7px;background:#241923;color:#e6d6e9;border:1px solid #ffffff15}
.social-thread{width:100%;display:flex;align-items:center;gap:12px;background:transparent;color:var(--social-text);border:0;border-radius:0;border-bottom:1px solid var(--social-line);padding:18px 22px;text-align:left}.social-thread>span:not(.social-avatar){flex:1;min-width:0}.social-thread strong{display:block;font-size:13px;overflow-wrap:anywhere}.social-thread small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--social-muted);font-size:11px;margin-top:4px}.social-thread time{font-size:9px;color:#867a90}
.social-subhead{display:flex;align-items:center;gap:10px;padding:16px;border-bottom:1px solid var(--social-line);background:#19121e;flex-shrink:0}.social-subhead .social-avatar{width:35px;height:35px;font-size:11px}.social-subhead>div{min-width:0;flex:1;overflow-wrap:anywhere}.social-subhead small{color:var(--social-muted);font-size:10px}.social-block{margin-left:auto;padding:6px;background:transparent;border:0;color:#98899f}#friends-social .social-block svg{width:18px;height:18px}.social-content:has(.social-compose){display:flex;flex-direction:column;overflow:hidden}.social-chat-messages{padding:16px;overflow:auto;flex:1;min-height:0;overscroll-behavior:contain}.social-message{width:fit-content;max-width:90%;background:#241a2d;border:1px solid #ffffff0d;border-radius:7px 7px 7px 1px;margin:0 0 12px;padding:10px 12px;min-width:110px}.social-message.outgoing{margin-left:auto;background:#352219;border-color:#ff941c20;border-radius:7px 7px 1px 7px}.social-message p{white-space:pre-wrap;overflow-wrap:anywhere}.social-message>div{display:flex;align-items:center;gap:9px;margin-top:7px;color:#b09dbb;font-size:9px}.social-message button{font-size:9px!important;padding:0;border:0;background:transparent;color:#b09dbb}.social-message small{font-size:9px}.social-compose{display:flex;gap:9px;padding:12px 16px;border-top:1px solid var(--social-line);background:#17101b;flex-shrink:0}.social-compose textarea{min-width:0;flex:1;resize:vertical;min-height:44px;max-height:150px;padding:10px;background:#100c15;border:1px solid #ffffff20;color:#eee6f3;font:inherit;line-height:1.4}.social-compose button{width:44px;align-self:flex-end;display:grid;place-items:center;height:44px;padding:10px}.social-send-state{font-size:10px;color:var(--social-muted);padding:0 16px 10px;background:#17101b;flex-shrink:0}.social-older{display:block;margin:0 auto 15px;background:transparent;border:1px solid var(--social-line);font-size:11px!important;color:var(--social-muted);padding:7px 12px}
.social-search{display:flex;align-items:flex-end;gap:8px;padding:20px}.social-search label{flex:1;min-width:0;color:var(--social-muted);font-size:11px}.social-search input{width:100%;margin-top:7px;background:#19121e;color:var(--social-text);border:1px solid #ffffff20;padding:10px}.social-search button{height:40px;display:grid;place-items:center;background:#241923;border:1px solid #ff941c30;color:var(--social-accent)}.social-fine{font-size:11px;line-height:1.6;color:var(--social-muted);padding:0 22px 16px}
#friends-social .social-modal{background:linear-gradient(135deg,#21131c,#100c16 65%);color:var(--social-text);border:1px solid #ff941c55;box-shadow:0 20px 90px #000a;width:min(540px,calc(100vw - 28px));max-width:540px;max-height:calc(100dvh - 28px);overflow:auto;border-radius:8px;padding:32px;line-height:1.6}#friends-social .social-modal::backdrop{background:#09050dcc;backdrop-filter:blur(6px)}#friends-social .social-modal h2{font-size:24px;letter-spacing:-.02em;line-height:1.2;margin:10px 0 20px;overflow-wrap:anywhere}#friends-social .social-modal p{color:#c4b6cc;margin-bottom:17px}.social-modal-close{position:absolute;right:12px;top:12px}.social-kicker{display:flex;align-items:center;gap:8px;color:var(--social-accent)!important;font-size:10px;letter-spacing:.16em;font-weight:700}.social-modal .social-kicker svg{width:16px!important;height:16px!important}.social-detail>.social-avatar{margin-bottom:20px}.social-detail .social-profile-stat{display:flex;justify-content:space-between;gap:12px;padding:17px 0;border-top:1px solid var(--social-line);margin-bottom:20px;color:var(--social-muted)}.social-detail .social-profile-stat strong{color:var(--social-text)}
#friends-social .primary{background:#f89624;color:#251303;border:1px solid #ffae51;border-radius:4px;font-weight:800;padding:12px 17px}#friends-social .primary:hover{background:#ffaa3e}#friends-social .social-abort{margin-left:9px;background:transparent;color:var(--social-muted);border:1px solid var(--social-line);padding:12px}.social-modal label{color:var(--social-muted);font-size:12px}.social-modal textarea{display:block;width:100%;min-height:90px;background:#100c15;border:1px solid #ffffff20;color:var(--social-text);margin:10px 0 18px;padding:10px;font:inherit}.social-check{display:flex!important;align-items:flex-start;gap:12px;line-height:1.65;margin:18px 0!important;padding:14px;background:#ffffff03;border:1px solid var(--social-line);border-radius:4px}.social-check input{width:17px!important;height:17px;min-width:17px;margin:3px 0 0!important;accent-color:#ff941c}.social-modal .social-fine{padding:15px 0 0}.social-tp-route{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px;background:#100b1380;border:1px solid var(--social-line);border-radius:6px}.social-tp-route>div{display:flex;flex:1;min-width:0;flex-direction:column;align-items:center;text-align:center;gap:10px}.social-tp-route strong{font-size:14px;overflow-wrap:anywhere}.social-tp-route small{font-size:10px;color:#d5a36c}.social-route-arrow{color:var(--social-accent);font-size:27px}.social-tp-server{font-size:11px;text-align:center;padding:12px;overflow-wrap:anywhere}.social-time-row{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--social-muted)}.social-seconds{color:var(--social-accent);font-size:20px;font-variant-numeric:tabular-nums}.social-modal progress{width:100%;height:4px;display:block;border:0;border-radius:4px;appearance:none;margin:8px 0 20px;background:#ffffff12}.social-modal progress::-webkit-progress-bar{background:#ffffff12}.social-modal progress::-webkit-progress-value{background:var(--social-accent)}.social-modal progress::-moz-progress-bar{background:var(--social-accent)}.social-modal-actions{display:flex;gap:12px}.social-modal-actions button{flex:1;min-height:46px;font-size:11px!important;letter-spacing:.1em!important}.social-decline{border:1px solid #ffffff25;background:transparent;color:#d8c6df;border-radius:4px}.social-popup-state{font-size:11px;margin-top:12px!important;margin-bottom:0!important;min-height:18px}.social-request{padding:15px 22px;background:#ff941c08;border-bottom:1px solid #ff941c25}.social-request strong{display:flex;align-items:center;gap:7px;font-size:12px}.social-request small{display:block;color:var(--social-muted);font-size:11px;margin-top:4px}.social-request button{font-size:10px!important;color:#dcb98e;border:1px solid #ff941c30;background:transparent;margin-top:10px;padding:7px 10px}
.social-disconnected .social-person,.social-disconnected .social-dot{opacity:.65}
@media(max-width:600px){.social-launch{right:16px;bottom:max(16px,env(safe-area-inset-bottom));width:56px;height:56px}.social-launch.is-open{right:16px}.social-panel{width:100%;max-width:420px}.social-content{padding-bottom:0}#friends-social .social-footer{padding:13px 86px calc(13px + env(safe-area-inset-bottom)) 16px;min-height:84px}#friends-social .social-header{padding:18px;min-height:84px}.social-friend{padding:14px 18px}.social-actions{gap:8px}#friends-social .social-actions button{width:44px;height:44px}#friends-social .social-modal{padding:24px 20px}.social-modal h2{font-size:22px!important}.social-tp-route{padding:16px 10px;gap:10px}.social-avatar.large{width:60px;height:60px}.social-tp-route strong{font-size:13px}.social-modal-actions{gap:8px}.social-check{padding:11px;font-size:11px!important}.social-profile-stat{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.social-panel,.social-launch,.social-friend{transition:none}}
/* Specificity also wins over the existing opt-in Halloween button theme. */
#friends-social .social-launch{background:#151016;color:var(--social-accent);border-color:#ff941c55}
#friends-social .social-launch:hover{background:#261a1b}
#friends-social .social-tabs>button{background:transparent;color:#9c93a5;border:0;border-bottom:2px solid transparent}
#friends-social .social-tabs>button[aria-selected=true]{color:var(--social-accent);background:#ff941c07;border-bottom-color:var(--social-accent)}
#friends-social .social-thread{background:transparent;border:0;border-bottom:1px solid var(--social-line);color:var(--social-text)}
