/* VoidCraft Social Hub — full UI refresh (layout-only; preserves API and chat behavior) */
:root {
  --sh-bg: #080b13;
  --sh-panel: #101624;
  --sh-panel-2: #141c2d;
  --sh-line: rgba(171, 190, 230, .15);
  --sh-line-strong: rgba(171, 190, 230, .24);
  --sh-text: #f4f6ff;
  --sh-muted: #9ba7c2;
  --sh-dim: #737f9d;
  --sh-violet: #ad9aff;
  --sh-cyan: #85f5ee;
  --sh-green: #73e5bd;
}
html { background: var(--sh-bg); }
body {
  background:
    radial-gradient(ellipse at 10% 5%, rgba(111, 76, 210, .12), transparent 34rem),
    radial-gradient(ellipse at 92% 25%, rgba(36, 166, 177, .08), transparent 31rem),
    var(--sh-bg);
  color: var(--sh-text);
}
body, button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
.social-main {
  width: min(1240px, calc(100% - 48px));
  max-width: 1240px;
  padding: 34px 0 64px;
}
.social-hero {
  position: relative;
  max-width: none;
  margin: 0 0 26px;
  padding: clamp(26px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid var(--sh-line);
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 80% 5%, rgba(133, 245, 238, .1), transparent 35%),
    radial-gradient(ellipse at 90% 90%, rgba(173, 154, 255, .13), transparent 45%),
    linear-gradient(125deg, rgba(19, 25, 41, .98), rgba(10, 15, 27, .98));
  box-shadow: 0 24px 70px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.035);
}
.social-hero::after {
  content: "";
  position: absolute;
  right: -65px;
  top: -95px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(173,154,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 32px rgba(173,154,255,.025), 0 0 0 64px rgba(133,245,238,.018);
  pointer-events: none;
}
.social-hero .eyebrow { color: var(--sh-cyan); letter-spacing: .16em; font-size: 10px; font-weight: 900; }
.social-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: 20px 0 14px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -.065em;
}
.social-gradient { background: linear-gradient(100deg, #c4b6ff 5%, #85f5ee 85%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.social-hero > p { position: relative; z-index: 1; max-width: 650px; color: #aeb8d1; font-size: 14px; line-height: 1.8; }
.social-status {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding: 12px 15px;
  border: 1px solid var(--sh-line);
  border-radius: 14px;
  background: rgba(5, 9, 18, .62);
  color: #cbd4e9;
  font-size: 12px;
}
.social-status b { margin-left: auto; border: 1px solid rgba(173,154,255,.28); border-radius: 999px; padding: 5px 9px; color: #d8ceff; background: rgba(119,91,210,.1); font-size: 9px; letter-spacing: .12em; }
.status-light { flex: 0 0 8px; }
.social-status.online .status-light { background: var(--sh-green); box-shadow: 0 0 14px rgba(115,229,189,.65); }
.social-status.offline .status-light { background: #ff91a6; box-shadow: 0 0 12px rgba(255,145,166,.35); }

.social-panel {
  min-width: 0;
  border: 1px solid var(--sh-line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(19,26,42,.98), rgba(11,16,28,.98));
  box-shadow: 0 18px 48px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.025);
}
.social-auth-layout { grid-template-columns: minmax(0,1.05fr) minmax(280px,.8fr); gap: 18px; margin: 0 0 34px; }
.auth-panel, .beta-panel { padding: clamp(22px, 3vw, 34px); }
.vc-chat-brand { gap: 14px; align-items: center; }
.vc-chat-brand > a { display: grid; place-items: center; flex: 0 0 52px; height: 52px; border-radius: 16px; background: linear-gradient(140deg, rgba(125,93,225,.2), rgba(39,177,180,.12)); border: 1px solid var(--sh-line-strong); }
.vc-chat-brand-copy { min-width: 0; }
.vc-chat-brand-name { letter-spacing: .15em; }
.vc-chat-brand-subtitle { color: var(--sh-cyan); }
.vc-chat-brand-note { color: var(--sh-muted); line-height: 1.65; }
.auth-tabs { padding: 5px; gap: 5px; border-color: var(--sh-line); background: #090e19; border-radius: 14px; }
.auth-tabs button { min-height: 42px; border-radius: 10px; font-size: 12px; cursor: pointer; }
.auth-tabs button.is-active { border-color: rgba(173,154,255,.3); background: linear-gradient(135deg, rgba(116,85,210,.28), rgba(31,145,153,.13)); color: #fff; }
.auth-panel h2, .beta-panel h2 { letter-spacing: -.035em; }
.auth-panel label, .sidebar label, .report-panel label { color: #cbd4e9; font-size: 11px; letter-spacing: .02em; }
.auth-panel input, .sidebar input, .compose textarea, .report-panel textarea, .report-panel select {
  min-width: 0;
  min-height: 45px;
  border-color: var(--sh-line-strong);
  border-radius: 12px;
  background: rgba(6,10,19,.85);
}
.auth-panel input:focus, .sidebar input:focus, .compose textarea:focus, .report-panel textarea:focus, .report-panel select:focus {
  border-color: rgba(133,245,238,.65);
  box-shadow: 0 0 0 3px rgba(133,245,238,.09);
}
.social-submit { min-height: 47px; border-radius: 13px; }
.beta-panel { background: radial-gradient(ellipse at 90% 0%, rgba(173,154,255,.08), transparent 48%), linear-gradient(145deg, rgba(17,24,39,.98), rgba(10,15,26,.98)); }
.beta-panel > .eyebrow { color: var(--sh-cyan); letter-spacing: .14em; font-size: 10px; }
.info-row { gap: 12px; }
.info-row > span { background: rgba(133,245,238,.07); border-color: rgba(133,245,238,.16); }
.info-row p { color: var(--sh-muted); line-height: 1.7; }
.small-note { color: var(--sh-dim) !important; border-top-color: var(--sh-line); line-height: 1.75 !important; }

.social-account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
  padding: 22px 25px;
  border: 1px solid var(--sh-line);
  border-radius: 22px;
  background: linear-gradient(110deg, rgba(20,27,44,.96), rgba(11,17,29,.96));
}
.social-account-bar > div { min-width: 0; }
.social-account-bar .eyebrow { color: var(--sh-cyan); font-size: 10px; letter-spacing: .15em; }
.social-account-bar h2 { margin: 7px 0 4px; font-size: clamp(25px,3vw,34px); letter-spacing: -.045em; overflow-wrap: anywhere; }
.social-account-bar p { color: var(--sh-muted); font-size: 13px; }
.social-account-bar #logout { flex: 0 0 auto; }
#app-feedback { margin: 0 0 12px; }
.mobile-chat-tabs { display: none; }

.social-workspace {
  display: grid;
  grid-template-columns: minmax(275px, .38fr) minmax(0, .9fr);
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}
.sidebar { align-self: stretch; min-width: 0; padding: 5px 20px; }
.side-section { padding: 19px 0; border-bottom-color: var(--sh-line); }
.side-section h3 { font-size: 13px; letter-spacing: -.01em; }
.section-heading { gap: 10px; }
.count { border-color: rgba(133,245,238,.18); background: rgba(133,245,238,.06); color: var(--sh-cyan); }
.sidebar form { grid-template-columns: minmax(0,1fr); }
.sidebar input { min-width: 0; }
.sidebar .compact { min-height: 42px; border-radius: 11px; }
.side-list { gap: 8px; }
.request-row { min-width: 0; gap: 6px; padding: 9px; border-color: var(--sh-line); background: rgba(7,11,20,.6); }
.request-name { min-width: 0; }
.mini-action { min-height: 32px; border-color: rgba(173,154,255,.24); border-radius: 9px; padding: 7px 9px; cursor: pointer; }
.friend-row { min-width: 0; gap: 11px; min-height: 54px; padding: 10px 12px; border-color: var(--sh-line); border-radius: 13px; background: rgba(7,11,20,.55); transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.friend-row:hover { border-color: rgba(133,245,238,.25); transform: translateY(-1px); }
.friend-row.active { border-color: rgba(173,154,255,.48); background: linear-gradient(110deg, rgba(105,77,190,.18), rgba(26,112,125,.11)); box-shadow: inset 3px 0 var(--sh-violet); }
.friend-avatar { flex-basis: 36px; height: 36px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; }
.friend-copy { text-overflow: ellipsis; white-space: nowrap; }
.text-btn { min-height: 35px; border-radius: 9px; padding: 7px 9px; }
.text-btn:hover { background: rgba(133,245,238,.06); text-decoration: none; }
.list-empty { padding: 12px; border: 1px dashed var(--sh-line); border-radius: 12px; line-height: 1.6; color: var(--sh-dim); }

.chat-panel { min-width: 0; min-height: 660px; overflow: hidden; border-radius: 22px; }
.chat-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 22px 23px;
  border-bottom: 1px solid var(--sh-line);
  background: radial-gradient(ellipse at 90% 0%, rgba(133,245,238,.07), transparent 50%), rgba(16,23,38,.8);
}
.chat-heading > div { min-width: 0; }
.chat-heading .eyebrow { color: var(--sh-cyan); font-size: 9px; letter-spacing: .15em; }
.chat-heading h2 { margin: 7px 0 5px; font-size: clamp(21px,2.5vw,28px); letter-spacing: -.04em; overflow-wrap: anywhere; }
.chat-heading p { color: var(--sh-muted); line-height: 1.65; overflow-wrap: anywhere; }
.connection-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; color: var(--sh-dim); font-size: 10px; }
.connection-status.is-online::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sh-green); }
.connection-status.is-offline::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ff91a6; }
.refresh-btn { flex: 0 0 auto; min-height: 39px; border-color: var(--sh-line-strong); border-radius: 11px; padding: 9px 12px; background: rgba(7,11,20,.72); cursor: pointer; }
.refresh-btn:hover { border-color: rgba(133,245,238,.3); }
.history-toolbar { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; padding: 10px 15px; border-bottom: 1px solid rgba(171,190,230,.08); }
.history-button { min-height: 34px; border-radius: 10px; }
#history-status { min-width: 0; color: var(--sh-dim); font-size: 10px; overflow-wrap: anywhere; }
.chat-empty { flex: 1; min-height: 330px; padding: 40px 24px; }
.chat-empty > span { display: grid; place-items: center; width: 66px; height: 66px; border: 1px solid rgba(173,154,255,.22); border-radius: 22px; background: linear-gradient(145deg, rgba(117,84,232,.18), rgba(34,188,190,.07)); font-size: 27px; }
.chat-empty h3 { margin: 16px 0 5px; letter-spacing: -.025em; }
.chat-empty p { color: var(--sh-muted); line-height: 1.7; }
.messages {
  flex: 1;
  min-width: 0;
  min-height: 350px;
  max-height: min(62vh, 720px);
  padding: 22px;
  gap: 14px;
  background: radial-gradient(ellipse at 80% 0%, rgba(117,84,232,.055), transparent 55%), rgba(7,10,18,.72);
  scrollbar-color: #3a4260 transparent;
  scrollbar-width: thin;
}
.message { min-width: 0; max-width: min(82%, 590px); }
.message-meta { flex-wrap: wrap; }
.message-bubble { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.message-actions { opacity: 1; }
.message-action { min-height: 34px; border-radius: 10px; }
.compose { min-width: 0; padding: 17px; border-top-color: var(--sh-line); background: rgba(13,18,31,.98); }
.compose textarea { min-height: 84px; max-height: 220px; line-height: 1.65; resize: vertical; }
.compose-footer { flex-wrap: wrap; }
.compose-footer > span { min-width: 0; }
.compose-footer .btn { min-height: 42px; border-radius: 12px; }
.chat-actions { flex-wrap: wrap; gap: 8px; background: rgba(9,13,24,.96); border-top-color: var(--sh-line); }
.chat-actions > * { max-width: 100%; }
.report-panel { min-width: 0; border-color: var(--sh-line); border-radius: 17px; }
.report-panel textarea { min-height: 100px; }
.new-messages-button { z-index: 2; }

button, a, input, textarea, select { scroll-margin: 90px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--sh-cyan);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

@media (max-width: 1000px) {
  .social-main { width: min(100% - 32px, 820px); }
  .social-auth-layout { grid-template-columns: minmax(0,1fr); }
  .social-workspace { grid-template-columns: minmax(0,1fr); }
  .sidebar { padding-inline: 20px; }
  .side-section { padding-block: 17px; }
  .side-section .side-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .chat-panel { min-height: 600px; }
  .messages { max-height: 56vh; }
}
@media (max-width: 600px) {
  .social-main { width: calc(100% - 22px); padding: 16px 0 44px; }
  .social-hero { margin-bottom: 14px; padding: 23px 19px; border-radius: 22px; }
  .social-hero::after { right: -160px; opacity: .6; }
  .social-hero h1 { margin: 17px 0 12px; font-size: clamp(37px, 10.5vw, 53px); letter-spacing: -.06em; }
  .social-hero > p { font-size: 12px; line-height: 1.75; }
  .social-status { gap: 8px; margin-top: 17px; padding: 10px 11px; font-size: 10px; }
  .social-status b { font-size: 8px; }
  .social-auth-layout { gap: 12px; }
  .social-panel { border-radius: 19px; }
  .auth-panel, .beta-panel { padding: 19px; }
  .vc-chat-brand { align-items: flex-start; gap: 11px; }
  .vc-chat-brand > a { flex-basis: 44px; height: 44px; border-radius: 13px; }
  .vc-chat-brand img { width: 31px; height: 31px; }
  .auth-tabs button { min-height: 42px; padding-inline: 5px; font-size: 11px; }
  .beta-panel { display: block; }
  .social-account-bar { align-items: flex-start; padding: 17px 15px; gap: 10px; border-radius: 18px; }
  .social-account-bar h2 { font-size: 23px; }
  .social-account-bar p { max-width: 235px; font-size: 11px; line-height: 1.6; }
  .social-account-bar #logout { min-height: 39px; padding: 8px 10px; }
  .mobile-chat-tabs {
    position: sticky;
    top: 6px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 6px;
    margin: 0 0 11px;
    padding: 5px;
    border: 1px solid var(--sh-line);
    border-radius: 15px;
    background: rgba(10,14,24,.96);
    box-shadow: 0 9px 26px rgba(0,0,0,.26);
    backdrop-filter: blur(16px);
  }
  .mobile-chat-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 43px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--sh-muted); font: inherit; font-size: 12px; font-weight: 850; }
  .mobile-chat-tabs button.is-active { border-color: rgba(173,154,255,.25); background: linear-gradient(120deg, rgba(105,77,190,.25), rgba(26,112,125,.13)); color: #fff; }
  .tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: rgba(133,245,238,.09); color: var(--sh-cyan); font-size: 10px; }
  .social-workspace { gap: 10px; }
  .social-workspace[data-mobile-pane="chat"] .sidebar { display: none; }
  .social-workspace[data-mobile-pane="people"] .chat-panel { display: none; }
  .sidebar { padding: 4px 15px; border-radius: 17px; }
  .side-section { padding: 15px 0; }
  .side-section .side-list { grid-template-columns: minmax(0,1fr); }
  .request-row { grid-template-columns: minmax(0,1fr) auto auto; }
  .chat-panel { min-height: min(690px, max(510px, calc(100vh - 175px))); border-radius: 18px; }
  .chat-heading { align-items: flex-start; padding: 15px; gap: 8px; }
  .chat-heading h2 { font-size: 20px; }
  .chat-heading p { font-size: 11px; }
  .refresh-btn { min-height: 36px; padding: 8px 9px; font-size: 10px; white-space: normal; }
  .history-toolbar { flex-wrap: wrap; padding: 8px 12px; }
  .messages { min-height: 270px; max-height: none; flex: 1 1 auto; padding: 13px; gap: 11px; }
  .message { max-width: 94%; }
  .message-bubble { padding: 10px 12px; font-size: 13px; }
  .message-actions { gap: 4px; }
  .message-action { min-height: 35px; padding: 7px 10px; font-size: 10px; }
  .compose { padding: 12px; }
  .compose textarea { min-height: 76px; }
  .compose-footer { align-items: flex-end; }
  .compose-footer .compose-hint { display: none; }
  .compose-footer .btn { min-height: 40px; }
  .chat-actions { padding: 9px 12px; }
  .report-panel { padding: 14px; }
  .message-editor { min-width: 0; width: 100%; }
  .social-main > .small-note { text-align: left; padding: 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .friend-row, .refresh-btn, .message-actions, .message-action { transition: none !important; }
  .friend-row:hover { transform: none; }
}

/* Once signed in, prioritize the actual app over the marketing intro. */
.social-app-active .social-hero { display: none; }
.social-app-active .social-main { padding-top: 22px; }
@media (max-width: 600px) {
  .social-app-active .social-main { padding-top: 10px; }
}

/* Prefer the dynamic viewport when the browser supports it; retain the 100vh fallback above. */
@supports (height: 100dvh) {
  @media (max-width: 600px) {
    .chat-panel { min-height: min(690px, max(510px, calc(100dvh - 175px))); }
  }
}

/* ==========================================================
   VOIDCRAFT SOCIAL HUB — POLISHED AURORA THEME
   Visual layer only; keeps the existing DOM and API behavior.
   ========================================================== */
:root {
  --sh-bg: #070a12;
  --sh-panel: #101727;
  --sh-panel-2: #151e31;
  --sh-line: rgba(172, 190, 229, .14);
  --sh-line-strong: rgba(172, 190, 229, .25);
  --sh-text: #f6f7ff;
  --sh-muted: #a8b4ce;
  --sh-dim: #7785a4;
  --sh-violet: #b6a1ff;
  --sh-cyan: #8bf6ec;
  --sh-green: #73ebbc;
  --sh-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}
html { background: var(--sh-bg); scroll-behavior: smooth; }
body {
  color: var(--sh-text);
  background:
    radial-gradient(ellipse at 8% 0%, rgba(128, 91, 239, .17), transparent 33rem),
    radial-gradient(ellipse at 94% 28%, rgba(44, 189, 185, .11), transparent 30rem),
    radial-gradient(ellipse at 48% 105%, rgba(81, 75, 162, .09), transparent 42rem),
    var(--sh-bg);
}
::selection { color: #fff; background: rgba(135, 108, 231, .46); }
header {
  background: rgba(7, 10, 18, .82);
  border-bottom-color: rgba(173, 190, 230, .12);
  box-shadow: 0 8px 36px rgba(0, 0, 0, .13);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
}
header .bar { max-width: 1460px; padding-block: 11px; gap: 13px; }
header .brand { gap: 9px; letter-spacing: .15em; font-size: 12px; }
header .brand img {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 0 13px rgba(139, 246, 236, .2));
}
header .nav { gap: 4px; }
header .nav a {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 11px;
  border-color: transparent;
  font-size: 11px;
  font-weight: 750;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
header .nav a:hover {
  border-color: rgba(139, 246, 236, .15);
  background: rgba(139, 246, 236, .055);
  color: #fff;
  transform: translateY(-1px);
}
header .nav a.active, header .nav a[aria-current="page"] {
  color: #f7f6ff;
  border-color: rgba(182, 161, 255, .27);
  background: linear-gradient(125deg, rgba(149, 118, 246, .19), rgba(139, 246, 236, .075));
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
header .account-links { gap: 6px; }
header .account-links a {
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 11px;
  background: rgba(20, 27, 43, .82);
  border-color: var(--sh-line);
  font-size: 11px;
  font-weight: 800;
}
header .account-links a:last-child {
  color: #100d21;
  border-color: transparent;
  background: linear-gradient(125deg, #c5b6ff, #89eee8);
  box-shadow: 0 7px 24px rgba(150, 128, 239, .18);
}
.social-main {
  width: min(1360px, calc(100% - 44px));
  padding-top: 30px;
  padding-bottom: 70px;
}
.social-hero {
  isolation: isolate;
  min-height: 300px;
  justify-content: center;
  margin-bottom: 22px;
  border-radius: 30px;
  border-color: rgba(180, 192, 231, .17);
  background:
    radial-gradient(ellipse at 83% 6%, rgba(139, 246, 236, .12), transparent 34%),
    radial-gradient(ellipse at 91% 100%, rgba(164, 132, 255, .19), transparent 48%),
    linear-gradient(128deg, rgba(21, 26, 45, .98), rgba(9, 14, 26, .985) 65%, rgba(10, 23, 35, .98));
  box-shadow: 0 30px 90px rgba(0,0,0,.23), inset 0 1px rgba(255,255,255,.06);
}
.social-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .18;
  pointer-events: none;
  background-image: linear-gradient(rgba(185,197,239,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(185,197,239,.09) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(105deg, black, transparent 76%);
}
.social-hero::after {
  right: -62px;
  top: -112px;
  width: 310px;
  height: 310px;
  border-color: rgba(139, 246, 236, .16);
  box-shadow: 0 0 0 35px rgba(139,246,236,.025), 0 0 0 70px rgba(182,161,255,.035), 0 0 0 105px rgba(182,161,255,.018);
}
.social-hero .eyebrow {
  padding: 8px 12px;
  border-color: rgba(139, 246, 236, .18);
  background: rgba(8, 13, 24, .65);
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.social-hero h1 {
  max-width: 880px;
  font-size: clamp(44px, 6.5vw, 82px);
  letter-spacing: -.07em;
  line-height: .99;
}
.social-gradient {
  background: linear-gradient(100deg, #d6ccff 0%, #9bf5f0 50%, #bbaaff 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.social-hero > p { max-width: 660px; color: #b8c3dd; font-size: 14px; }
.social-status {
  max-width: 590px;
  min-height: 48px;
  border-color: rgba(173, 190, 230, .16);
  border-radius: 15px;
  background: rgba(5, 9, 17, .72);
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.status-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f2bd69;
  box-shadow: 0 0 12px rgba(242,189,105,.5);
}
.social-panel {
  border-color: rgba(172, 190, 229, .16);
  border-radius: 23px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(129, 105, 218, .055), transparent 40%),
    linear-gradient(145deg, rgba(19, 27, 44, .98), rgba(10, 15, 27, .985));
  box-shadow: 0 22px 65px rgba(0,0,0,.20), inset 0 1px rgba(255,255,255,.035);
}
.social-auth-layout { gap: 20px; margin-top: 4px; }
.auth-panel, .beta-panel { padding: clamp(24px, 3.5vw, 38px); }
.vc-chat-brand { margin-bottom: 29px; }
.vc-chat-brand > a {
  border-color: rgba(139,246,236,.22);
  background: linear-gradient(145deg, rgba(149,118,246,.22), rgba(41,177,179,.12));
  box-shadow: 0 12px 30px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.06);
}
.vc-chat-brand-name { font-size: 13px; letter-spacing: .19em; }
.vc-chat-brand-subtitle { letter-spacing: .17em; }
.vc-chat-brand-note { max-width: 370px; }
.auth-tabs { border-color: rgba(172,190,229,.13); background: rgba(6,10,19,.75); }
.auth-tabs button {
  min-height: 45px;
  transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.auth-tabs button:hover { color: #fff; background: rgba(255,255,255,.035); }
.auth-tabs button.is-active {
  border-color: rgba(182,161,255,.27);
  background: linear-gradient(120deg, rgba(145,111,234,.25), rgba(57,160,162,.11));
  box-shadow: inset 0 1px rgba(255,255,255,.05), 0 5px 18px rgba(0,0,0,.12);
}
.auth-panel h2, .beta-panel h2 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.045em; }
.auth-panel > p:not(.small-note) { color: #b3bfd8; line-height: 1.7; }
.auth-panel input, .sidebar input, .compose textarea, .report-panel textarea, .report-panel select {
  border-color: rgba(172, 190, 229, .19);
  border-radius: 13px;
  background: rgba(5, 9, 17, .78);
  box-shadow: inset 0 1px rgba(0,0,0,.14);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-panel input:focus, .sidebar input:focus, .compose textarea:focus, .report-panel textarea:focus, .report-panel select:focus {
  border-color: rgba(139, 246, 236, .68);
  background: rgba(7, 13, 23, .97);
  box-shadow: 0 0 0 3px rgba(139,246,236,.09), 0 0 24px rgba(139,246,236,.045);
}
.social-submit {
  min-height: 50px;
  margin-top: 18px;
  border: 1px solid rgba(220,211,255,.6);
  border-radius: 14px;
  background: linear-gradient(110deg, #9476ee, #6c86e9 54%, #319d9f);
  box-shadow: 0 12px 30px rgba(105, 93, 214, .22), inset 0 1px rgba(255,255,255,.18);
  font-size: 13px;
  letter-spacing: .01em;
}
.social-submit:hover { box-shadow: 0 15px 35px rgba(105,93,214,.29), inset 0 1px rgba(255,255,255,.22); }
.beta-panel {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(139,246,236,.075), transparent 40%),
    radial-gradient(ellipse at 0% 100%, rgba(182,161,255,.09), transparent 48%),
    linear-gradient(145deg, rgba(18,26,43,.99), rgba(9,14,25,.99));
}
.beta-panel h2 { max-width: 400px; line-height: 1.12; }
.info-row { padding-top: 16px; border-top: 1px solid rgba(172,190,229,.09); }
.info-row > span {
  flex-basis: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(149,118,246,.18), rgba(41,177,179,.1));
  border-color: rgba(182,161,255,.19);
}
.info-row strong { color: #f0f3ff; }
.info-row p { color: #a8b4ce; }
.small-note { color: #8693b1 !important; border-top-color: rgba(172,190,229,.1); }
.social-account-bar {
  margin-bottom: 16px;
  padding: 24px 27px;
  border-color: rgba(172,190,229,.16);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(149,118,246,.13), transparent 52%),
    radial-gradient(ellipse at 100% 100%, rgba(41,177,179,.075), transparent 50%),
    rgba(13, 19, 32, .94);
  box-shadow: 0 18px 55px rgba(0,0,0,.16), inset 0 1px rgba(255,255,255,.04);
}
.social-account-bar .eyebrow { display: flex; align-items: center; gap: 7px; }
.social-account-bar .eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sh-green);
  box-shadow: 0 0 12px rgba(115,235,188,.65);
}
.social-account-bar h2 { font-size: clamp(26px, 3vw, 36px); }
.social-account-bar p { margin-bottom: 0; }
.social-account-bar #logout {
  border-radius: 12px;
  border-color: rgba(172,190,229,.22);
  background: rgba(24,31,48,.8);
}
#app-feedback { padding-inline: 4px; }
.mobile-chat-tabs {
  border-color: rgba(172,190,229,.17);
  background: rgba(9, 14, 25, .92);
  box-shadow: 0 12px 34px rgba(0,0,0,.25), inset 0 1px rgba(255,255,255,.03);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.mobile-chat-tabs button { transition: background .18s ease, color .18s ease, border-color .18s ease; }
.mobile-chat-tabs button.is-active {
  border-color: rgba(182,161,255,.28);
  background: linear-gradient(120deg, rgba(145,111,234,.24), rgba(57,160,162,.12));
  box-shadow: inset 0 1px rgba(255,255,255,.05);
}
.tab-count { border: 1px solid rgba(139,246,236,.12); }
.social-workspace { gap: 18px; }
.sidebar { padding-inline: 21px; }
.side-section { border-bottom-color: rgba(172,190,229,.11); }
.side-section h3, .report-panel h3 { color: #e9edff; font-weight: 850; }
.section-heading .count {
  min-width: 25px;
  height: 25px;
  background: rgba(139,246,236,.065);
  border-color: rgba(139,246,236,.16);
}
.sidebar form .compact {
  background: linear-gradient(120deg, rgba(145,111,234,.19), rgba(57,160,162,.11));
  border-color: rgba(182,161,255,.23);
}
.side-list { gap: 8px; }
.request-row {
  border-color: rgba(172,190,229,.13);
  border-radius: 13px;
  background: rgba(5, 9, 17, .43);
  transition: border-color .18s ease, background .18s ease;
}
.request-row:hover { border-color: rgba(139,246,236,.22); background: rgba(16,24,39,.75); }
.mini-action { min-height: 34px; background: rgba(116,91,191,.15); }
.mini-action:hover { border-color: rgba(182,161,255,.43); background: rgba(116,91,191,.25); }
.mini-action.muted { background: rgba(20,27,42,.7); }
.friend-row {
  min-height: 58px;
  border-color: rgba(172,190,229,.13);
  border-radius: 15px;
  background: rgba(5, 9, 17, .46);
  box-shadow: inset 0 1px rgba(255,255,255,.012);
}
.friend-row:hover {
  border-color: rgba(139,246,236,.3);
  background: linear-gradient(110deg, rgba(20,29,46,.94), rgba(12,24,33,.95));
  transform: translateY(-1px);
}
.friend-row.active {
  border-color: rgba(182,161,255,.45);
  background: linear-gradient(105deg, rgba(112,83,197,.2), rgba(35,112,124,.12));
  box-shadow: inset 3px 0 #b6a1ff, 0 8px 24px rgba(0,0,0,.12);
}
.friend-avatar {
  flex-basis: 39px;
  height: 39px;
  border-radius: 13px;
  border-color: rgba(255,255,255,.13);
  background: linear-gradient(145deg, #8166dc, #277f8b);
  box-shadow: inset 0 1px rgba(255,255,255,.16), 0 4px 12px rgba(0,0,0,.13);
}
.text-btn {
  border: 1px solid transparent;
  color: #aebadb;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.text-btn:hover { color: #f7f6ff; border-color: rgba(172,190,229,.13); background: rgba(255,255,255,.035); }
.text-btn.danger { color: #ff9eaf; }
.text-btn.danger:hover { border-color: rgba(255,142,164,.18); background: rgba(255,110,139,.075); }
.chat-panel {
  border-color: rgba(172,190,229,.17);
  background: rgba(9, 14, 25, .96);
  box-shadow: 0 25px 75px rgba(0,0,0,.25), inset 0 1px rgba(255,255,255,.03);
}
.chat-heading {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(139,246,236,.09), transparent 47%),
    linear-gradient(120deg, rgba(22,30,48,.97), rgba(12,18,31,.97));
  border-bottom-color: rgba(172,190,229,.14);
}
.chat-heading h2 { color: #f6f7ff; }
.connection-status {
  padding: 5px 8px;
  border: 1px solid rgba(172,190,229,.11);
  border-radius: 999px;
  background: rgba(5,9,17,.4);
}
.connection-status.is-online { color: #a6f4d5; border-color: rgba(115,235,188,.17); }
.connection-status.is-offline { color: #ffacba; border-color: rgba(255,145,166,.18); }
.refresh-btn, .history-button {
  border-color: rgba(172,190,229,.18);
  background: rgba(6, 10, 19, .72);
  color: #d7def1;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.refresh-btn:hover, .history-button:hover {
  border-color: rgba(139,246,236,.32);
  background: rgba(22,31,48,.96);
  color: #fff;
  transform: translateY(-1px);
}
.chat-empty {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(132,103,226,.105), transparent 57%),
    radial-gradient(ellipse at 50% 100%, rgba(41,177,179,.06), transparent 48%);
}
.chat-empty > span {
  border-color: rgba(182,161,255,.23);
  background: linear-gradient(145deg, rgba(149,118,246,.23), rgba(41,177,179,.12));
  color: #d2c6ff;
  box-shadow: 0 14px 35px rgba(0,0,0,.19), inset 0 1px rgba(255,255,255,.07);
}
.chat-empty h3 { color: #f0f3ff; }
.chat-empty p { color: #a2aec9; }
.messages {
  background:
    radial-gradient(ellipse at 78% 0%, rgba(127,101,216,.075), transparent 51%),
    linear-gradient(180deg, rgba(6,10,19,.94), rgba(8,13,23,.96));
  scrollbar-color: rgba(136,145,180,.36) transparent;
}
.message { max-width: min(84%, 640px); gap: 6px; }
.message-meta { gap: 9px; color: #8794b2; font-size: 10px; }
.message-meta strong { color: #bdc8e1; font-weight: 850; }
.message-bubble {
  padding: 12px 15px;
  border-color: rgba(172,190,229,.14);
  border-radius: 6px 18px 18px 18px;
  background: linear-gradient(145deg, rgba(25,34,54,.98), rgba(16,23,38,.98));
  box-shadow: 0 5px 16px rgba(0,0,0,.11), inset 0 1px rgba(255,255,255,.025);
  color: #edf1ff;
}
.message.mine .message-bubble {
  border-color: rgba(182,161,255,.25);
  border-radius: 18px 6px 18px 18px;
  background: linear-gradient(130deg, rgba(89,66,151,.74), rgba(25,81,91,.83));
  box-shadow: 0 7px 22px rgba(50,45,107,.16), inset 0 1px rgba(255,255,255,.055);
}
.message.is-pending .message-bubble { opacity: .72; }
.message.is-deleted-message .message-bubble { color: #909ab5; font-style: italic; }
.message-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 1px; }
.message-action {
  border-color: rgba(172,190,229,.13);
  background: rgba(13,19,32,.76);
  color: #afbbd5;
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.message-action:hover {
  border-color: rgba(139,246,236,.3);
  background: rgba(24,34,51,.98);
  color: #fff;
  transform: translateY(-1px);
}
.message-action.primary { border-color: rgba(182,161,255,.34); background: rgba(121,91,207,.2); color: #e6deff; }
.message-action.danger { border-color: rgba(255,145,166,.17); color: #ffacba; background: rgba(99,28,47,.22); }
.message-action.danger:hover { border-color: rgba(255,145,166,.35); background: rgba(125,31,56,.35); }
.message-editor { padding: 12px; border: 1px solid rgba(182,161,255,.24); border-radius: 15px; background: rgba(21,26,43,.95); }
.message-editor textarea { width: 100%; border-radius: 11px; border: 1px solid rgba(172,190,229,.2); background: rgba(5,9,17,.9); color: var(--sh-text); padding: 12px; }
.compose {
  gap: 12px;
  border-top-color: rgba(172,190,229,.13);
  background: linear-gradient(180deg, rgba(14,20,34,.98), rgba(10,15,26,.99));
}
.compose textarea {
  min-height: 86px;
  border-color: rgba(172,190,229,.2);
  border-radius: 14px;
  background: rgba(5,9,17,.76);
}
.compose-footer { align-items: center; gap: 12px; }
.compose-footer > span { line-height: 1.45; }
#message-count { color: #9aa8c5; font-weight: 800; }
#message-count.is-near-limit { color: #ffc27e; }
.compose-footer .btn {
  min-width: 110px;
  min-height: 44px;
  border: 1px solid rgba(220,211,255,.45);
  border-radius: 13px;
  background: linear-gradient(110deg, #9274eb, #6481e4 56%, #319a9d);
  box-shadow: 0 8px 24px rgba(110,91,212,.18), inset 0 1px rgba(255,255,255,.13);
}
.compose-footer .btn:disabled { opacity: .38; filter: saturate(.65); box-shadow: none; }
.compose-footer .btn:not(:disabled):hover { box-shadow: 0 12px 30px rgba(110,91,212,.25), inset 0 1px rgba(255,255,255,.17); }
.chat-actions {
  padding: 12px 16px;
  border-top-color: rgba(172,190,229,.1);
  background: rgba(8,13,23,.98);
}
.chat-actions > span { color: #75829f; letter-spacing: .14em; }
.report-panel {
  border-top-color: rgba(172,190,229,.12);
  background: linear-gradient(145deg, rgba(20,26,43,.97), rgba(11,16,28,.98));
}
.feedback { line-height: 1.55; overflow-wrap: anywhere; }
.feedback.is-success { color: #8ce7c5; }
.feedback.is-error { color: #ff9eaf; }
.feedback.is-info { color: #aab9d6; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--sh-cyan);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(139,246,236,.07);
}
::placeholder { color: #64728f; opacity: 1; }
footer { border-top-color: rgba(172,190,229,.1); background: linear-gradient(180deg, transparent, rgba(6,9,16,.7)); }
footer, footer a { color: #8692ad; }
footer a:hover { color: var(--sh-cyan); }

@media (min-width: 601px) {
  .social-app-active .social-main { width: min(1460px, calc(100% - 44px)); padding-top: 18px; }
  .social-app-active .social-workspace { grid-template-columns: minmax(275px, .34fr) minmax(0, .92fr); align-items: start; }
  .social-app-active .sidebar { position: relative; }
  .social-app-active .chat-panel { min-height: min(780px, calc(100vh - 205px)); }
  .social-app-active .messages { max-height: min(54vh, 560px); }
}
@media (max-width: 1000px) {
  header .bar { width: calc(100% - 30px); }
  .social-main { width: calc(100% - 28px); }
  .social-hero { min-height: 270px; }
}
@media (max-width: 600px) {
  header .bar { width: calc(100% - 20px); }
  header .brand { font-size: 10px; letter-spacing: .11em; }
  header .brand img { width: 30px; height: 30px; }
  header .nav a { min-height: 37px; padding: 8px 10px; font-size: 10px; }
  header .account-links a { min-height: 36px; padding: 7px 8px; font-size: 10px; }
  .social-main { width: calc(100% - 18px); padding-bottom: 42px; }
  .social-hero { min-height: 0; padding: 23px 18px; border-radius: 22px; }
  .social-hero h1 { font-size: clamp(37px, 10.3vw, 53px); line-height: 1.02; }
  .social-status { gap: 7px; padding: 10px 11px; }
  .social-auth-layout { gap: 12px; }
  .auth-panel, .beta-panel { padding: 20px 18px; }
  .social-panel { border-radius: 19px; }
  .social-account-bar { padding: 17px 15px; }
  .mobile-chat-tabs { top: 5px; margin-bottom: 10px; }
  .social-workspace { gap: 10px; }
  .sidebar { padding-inline: 15px; }
  .friend-row { min-height: 55px; }
  .chat-panel { min-height: max(500px, calc(100vh - 168px)); }
  .chat-heading { padding: 15px 14px; }
  .messages { padding: 13px; gap: 10px; }
  .message { max-width: 95%; }
  .message-bubble { padding: 11px 12px; border-radius: 6px 15px 15px 15px; }
  .message.mine .message-bubble { border-radius: 15px 6px 15px 15px; }
  .message-actions { margin-top: 3px; }
  .message-action { min-height: 34px; padding: 7px 10px; }
  .compose { padding: 12px; }
  .compose-footer .btn { min-width: 94px; }
  .chat-actions { gap: 6px; padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  header .nav a, .auth-tabs button, .request-row, .friend-row, .text-btn, .refresh-btn, .history-button, .message-action { transition: none !important; }
}


/* Website single-sign-on controls */
.social-auth-divider{display:flex;align-items:center;gap:12px;margin:16px 0;color:var(--muted,#9da7c6);font-size:.82rem}
.social-auth-divider:before,.social-auth-divider:after{content:"";height:1px;flex:1;background:rgba(166,177,221,.2)}
#website-sso{width:100%;margin-top:10px}
#website-sso-note{line-height:1.55;margin:9px 0 16px}
.social-account-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
@media(max-width:620px){.social-account-actions{width:100%}.social-account-actions .btn{flex:1;min-width:0}.social-account-bar{align-items:flex-start;gap:14px;flex-wrap:wrap}}


#website-sso-controls[hidden],#link-website-account[hidden]{display:none!important}
