:root {
  --social-ink: #080b12;
  --social-panel: rgba(8, 12, 19, .94);
  --social-panel-light: rgba(18, 23, 34, .9);
  --social-line: rgba(122, 145, 169, .36);
  --social-cyan: #69e5f7;
  --social-violet: #b75dff;
  --social-gold: #e3ba51;
  --social-danger: #ff6965;
}

.social-page {
  min-height: 100vh;
  color: #e9e7eb;
}

.social-shell {
  width: min(1480px, calc(100% - 48px));
  min-height: 70vh;
  margin: 0 auto;
  padding: clamp(34px, 5vw, 78px) 0 80px;
}

.social-shell code {
  color: var(--social-cyan);
  overflow-wrap: anywhere;
}

.social-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(28px, 5vw, 80px);
  margin-bottom: 28px;
  padding: clamp(26px, 4vw, 58px);
  background:
    linear-gradient(90deg, rgba(5, 8, 14, .98) 0%, rgba(12, 12, 23, .88) 58%, rgba(39, 17, 61, .72) 100%),
    url("assets/hero-brand-universe.png") center 54% / cover;
}

.social-hero.compact {
  min-height: 270px;
}

.social-hero > div:first-child {
  max-width: 920px;
}

.social-hero p:not(.social-kicker) {
  max-width: 720px;
  margin: 18px 0 0;
  color: #babcc7;
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1.65;
}

.social-hero .tv-display-title {
  margin: 7px 0 0;
  font-size: clamp(52px, 7.6vw, 116px);
  line-height: .82;
}

.social-hero .accent {
  color: var(--social-violet);
}

.social-kicker {
  margin: 0 0 8px;
  color: var(--social-cyan);
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .23em;
  text-transform: uppercase;
}

.social-hero-actions,
.social-card-actions,
.social-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-hero-actions {
  flex-direction: column;
  min-width: 220px;
}

.button.small {
  min-height: 36px;
  padding: 9px 14px;
  font-size: 10px;
}

.social-empty {
  max-width: 900px;
  margin: 30px auto;
  padding: 36px;
  text-align: center;
}

.social-empty h2 {
  margin: 5px 0 14px;
  color: #f4edf8;
  font-size: clamp(28px, 4vw, 52px);
  overflow-wrap: anywhere;
}

.social-empty p {
  margin: 0 auto 22px;
  color: #b5b8c2;
  line-height: 1.7;
}

.social-command-grid {
  display: grid;
  grid-template-columns: minmax(340px, .72fr) minmax(460px, 1.28fr);
  gap: 22px;
  margin-bottom: 22px;
}

.social-xp-card,
.social-signal-card,
.social-lists-grid > article,
.social-blocks {
  padding: 24px;
}

.social-member-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 15px;
}

.social-member-main img,
.social-member-avatar {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  border: 1px solid rgba(105, 229, 247, .5);
  border-radius: 50%;
  object-fit: cover;
  background: #080a10;
  box-shadow: 0 0 25px rgba(105, 229, 247, .14);
}

.social-member-main h2,
.social-member-main h3 {
  margin: 0 0 6px;
  color: #f2eef4;
  font-size: clamp(20px, 2vw, 30px);
  overflow-wrap: anywhere;
}

.social-member-main p {
  margin: 0;
}

.social-xp-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 23px 0 15px;
}

.social-xp-summary div {
  display: grid;
  gap: 3px;
  border-left: 2px solid var(--social-violet);
  padding: 7px 12px;
  background: rgba(179, 92, 255, .06);
}

.social-xp-summary span {
  color: #9fa4b1;
  font: 9px/1.3 "IBM Plex Mono", monospace;
  letter-spacing: .16em;
}

.social-xp-summary strong {
  color: #fff;
  font: 400 clamp(24px, 3vw, 38px)/1 var(--thunder-heading-font);
}

.social-progress {
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(105, 229, 247, .35);
  background: #04070b;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, .8);
}

.social-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--social-cyan), var(--social-violet));
  box-shadow: 0 0 16px rgba(105, 229, 247, .7);
  transition: width .35s ease;
}

.social-xp-card > p:last-child {
  margin: 10px 0 0;
  color: #9ea3ae;
  font-size: 12px;
}

.social-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.social-section-head.compact {
  align-items: center;
  margin-bottom: 16px;
}

.social-section-head h2 {
  margin: 0;
  color: #ece8ed;
  font-size: clamp(25px, 3vw, 44px);
  line-height: 1;
}

.social-section-head > p {
  max-width: 520px;
  margin: 0;
  color: #aeb2bd;
  line-height: 1.55;
}

.social-signal-list {
  display: grid;
  max-height: 250px;
  gap: 7px;
  overflow: auto;
  padding-right: 3px;
}

.social-signal {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(122, 145, 169, .22);
  padding: 10px 12px;
  color: #d5d5dc;
  background: rgba(1, 4, 9, .5);
  text-decoration: none;
}

.social-signal::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--social-violet);
  box-shadow: 0 0 10px rgba(183, 93, 255, .75);
}

.social-signal.read {
  opacity: .62;
}

.social-signal small {
  color: #818895;
  white-space: nowrap;
}

.social-search {
  margin-bottom: 22px;
  padding: clamp(22px, 3vw, 34px);
}

.social-search form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.social-search input,
.message-compose textarea,
.social-dialog textarea {
  width: 100%;
  border: 1px solid rgba(122, 145, 169, .42);
  border-radius: 0;
  color: #f0edf2;
  background: rgba(2, 6, 11, .82);
  outline: none;
}

.social-search input {
  min-height: 54px;
  padding: 0 18px;
}

.social-search input:focus,
.message-compose textarea:focus,
.social-dialog textarea:focus {
  border-color: var(--social-cyan);
  box-shadow: 0 0 0 2px rgba(105, 229, 247, .12);
}

.social-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.social-member-card,
.social-member-row {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(122, 145, 169, .3);
  background:
    linear-gradient(135deg, rgba(12, 17, 26, .96), rgba(15, 9, 25, .94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.social-member-card {
  display: grid;
  gap: 17px;
  padding: 18px;
}

.social-member-card .social-member-main img {
  width: 54px;
  height: 54px;
}

.social-member-card h3,
.social-member-row h3 {
  font-family: "Oswald", "Arial Narrow", sans-serif !important;
  text-transform: none;
}

.social-member-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.social-member-card .social-profile-slug,
.social-member-row .social-profile-slug {
  color: #9096a2;
  font: 10px/1.4 "IBM Plex Mono", monospace;
  overflow-wrap: anywhere;
}

.social-member-card .profile-rank-badge,
.social-member-row .profile-rank-badge {
  padding: 5px 8px;
  font-size: 8px;
}

.social-card-actions a,
.social-card-actions button,
.message-head-actions a,
.message-head-actions button,
.message-filter-tabs button {
  border: 1px solid rgba(151, 165, 190, .34);
  padding: 9px 11px;
  color: #d8d7dd;
  background: rgba(10, 12, 19, .8);
  font-family: "Oswald", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.social-card-actions button:hover,
.social-card-actions a:hover,
.message-head-actions a:hover,
.message-head-actions button:hover,
.message-filter-tabs button:hover,
.message-filter-tabs button.active {
  border-color: var(--social-violet);
  color: #fff;
  background: rgba(111, 45, 189, .28);
}

.social-card-actions .danger {
  border-color: rgba(255, 105, 101, .4);
  color: #ffaaa7;
}

.social-placeholder {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px dashed rgba(122, 145, 169, .3);
  padding: 24px;
  color: #9197a3;
  text-align: center;
}

.social-lists-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.social-count {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(183, 93, 255, .65);
  color: #fff;
  background: rgba(111, 45, 189, .25);
  font: 700 12px/1 "IBM Plex Mono", monospace;
}

.social-member-list {
  display: grid;
  gap: 10px;
}

.social-member-list > p {
  color: #8f95a1;
}

.social-member-row {
  display: grid;
  gap: 13px;
  padding: 13px;
}

.social-member-row .social-member-main img {
  width: 46px;
  height: 46px;
}

.social-member-row h3 {
  margin: 0 0 2px;
  font-size: 15px;
}

.social-blocks {
  margin-top: 22px;
}

.social-blocks summary {
  color: #c2c3cb;
  font: 700 12px/1.4 "IBM Plex Mono", monospace;
  letter-spacing: .12em;
  cursor: pointer;
}

.social-blocks summary span {
  color: var(--social-violet);
}

.social-blocks details[open] summary {
  margin-bottom: 16px;
}

.social-global-result {
  position: fixed;
  z-index: 120;
  right: 22px;
  bottom: 22px;
  max-width: min(460px, calc(100% - 44px));
  margin: 0;
  border: 1px solid rgba(105, 229, 247, .55);
  padding: 13px 16px;
  color: #e8fbff;
  background: rgba(5, 13, 20, .96);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .55), 0 0 20px rgba(105, 229, 247, .15);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}

.social-global-result.visible {
  opacity: 1;
  transform: translateY(0);
}

.social-global-result.error {
  border-color: rgba(255, 105, 101, .7);
  color: #ffd2d0;
  background: rgba(34, 8, 10, .96);
}

.message-console {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  min-height: 680px;
  gap: 20px;
}

.message-sidebar,
.message-stage {
  min-width: 0;
  padding: 20px;
}

.social-icon-link {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--social-violet);
  color: #fff;
  text-decoration: none;
}

.message-filter-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.message-filter-tabs button {
  padding-inline: 5px;
}

.message-thread-list {
  display: grid;
  gap: 8px;
}

.message-thread {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(122, 145, 169, .25);
  padding: 11px;
  color: #dddde2;
  background: rgba(4, 8, 14, .7);
  text-align: left;
  cursor: pointer;
}

.message-thread.active,
.message-thread:hover {
  border-color: rgba(183, 93, 255, .72);
  background: rgba(111, 45, 189, .17);
}

.message-thread img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.message-thread-copy {
  min-width: 0;
}

.message-thread-copy strong,
.message-thread-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-thread-copy strong {
  margin-bottom: 3px;
}

.message-thread-copy small {
  color: #8e95a2;
}

.message-unread {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #06070b;
  background: var(--social-cyan);
  font: 700 10px/1 monospace;
}

.message-stage {
  display: grid;
}

.message-empty {
  align-self: center;
  max-width: 620px;
  margin: auto;
  text-align: center;
}

.message-empty h2 {
  margin: 8px 0 14px;
  font-size: clamp(34px, 5vw, 64px);
}

.message-empty p:last-child {
  color: #999faa;
  line-height: 1.7;
}

.message-conversation {
  display: grid;
  grid-template-rows: auto auto minmax(280px, 1fr) auto;
  min-height: 630px;
}

.message-conversation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(122, 145, 169, .28);
  padding-bottom: 15px;
}

.message-head-actions {
  display: flex;
  gap: 7px;
}

.message-request-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  border-left: 3px solid var(--social-gold);
  padding: 14px 16px;
  background: rgba(227, 186, 81, .08);
}

.message-request-banner p {
  margin: 4px 0 0;
  color: #b6b4aa;
}

.message-request-banner > div:last-child {
  display: flex;
  gap: 7px;
}

.message-log {
  display: flex;
  max-height: 490px;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 20px 5px;
}

.message-bubble {
  align-self: flex-start;
  max-width: min(76%, 690px);
  border: 1px solid rgba(122, 145, 169, .32);
  padding: 11px 13px;
  background: rgba(10, 14, 21, .9);
}

.message-bubble.mine {
  align-self: flex-end;
  border-color: rgba(183, 93, 255, .48);
  background: rgba(74, 27, 111, .28);
}

.message-bubble.removed {
  opacity: .55;
  font-style: italic;
}

.message-bubble p {
  margin: 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message-bubble footer {
  display: flex;
  min-height: 0;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 7px;
  border: 0;
  padding: 0;
  color: #79808c;
  background: transparent;
  font-size: 9px;
}

.message-bubble footer button {
  border: 0;
  padding: 0;
  color: #9ba0aa;
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
}

.message-compose {
  border-top: 1px solid rgba(122, 145, 169, .28);
  padding-top: 14px;
}

.message-compose textarea {
  min-height: 86px;
  resize: vertical;
  padding: 12px;
}

.message-compose > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.message-compose span {
  color: #878e9a;
  font: 10px/1.4 monospace;
}

.social-dialog {
  width: min(560px, calc(100% - 30px));
  border: 1px solid rgba(183, 93, 255, .68);
  padding: 0;
  color: #ebe8ee;
  background: #090d15;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .75), 0 0 40px rgba(183, 93, 255, .2);
}

.social-dialog::backdrop {
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(5px);
}

.social-dialog form {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 28px;
}

.social-dialog h2,
.social-dialog p {
  margin: 0;
}

.social-dialog p {
  color: #a8adb8;
  line-height: 1.55;
}

.social-dialog label {
  display: grid;
  gap: 7px;
  color: #c8c9d0;
}

.social-dialog textarea {
  padding: 12px;
  resize: vertical;
}

.social-dialog-close {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 10px;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.social-profile-actions {
  display: grid;
  gap: 13px;
  margin-top: 18px;
  border-top: 1px solid rgba(122, 145, 169, .3);
  padding-top: 17px;
}

.social-profile-actions .social-card-actions {
  align-items: center;
}

.profile-xp-inline {
  display: grid;
  width: min(460px, 100%);
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
}

.profile-xp-inline > strong,
.profile-xp-inline > span {
  font: 700 10px/1.2 "IBM Plex Mono", monospace;
}

.profile-xp-inline > strong {
  color: var(--social-cyan);
}

.profile-xp-inline > span {
  color: #c9c6cd;
}

.profile-xp-inline .social-progress {
  height: 8px;
}

.profile-tab-link {
  display: block;
  box-sizing: border-box;
  text-decoration: none;
}

@media (max-width: 1050px) {
  .social-command-grid,
  .social-lists-grid {
    grid-template-columns: 1fr;
  }

  .social-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .message-console {
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .social-shell {
    width: min(100% - 24px, 1480px);
    padding-top: 22px;
  }

  .social-hero {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 24px 20px;
  }

  .social-hero .tv-display-title {
    font-size: clamp(44px, 16vw, 72px);
  }

  .social-hero-actions {
    width: 100%;
    min-width: 0;
  }

  .social-hero-actions .button {
    width: 100%;
    text-align: center;
  }

  .social-command-grid {
    gap: 14px;
  }

  .social-xp-card,
  .social-signal-card,
  .social-lists-grid > article,
  .social-blocks,
  .message-sidebar,
  .message-stage {
    padding: 17px;
  }

  .social-section-head {
    display: grid;
  }

  .social-search form,
  .social-card-grid {
    grid-template-columns: 1fr;
  }

  .social-search form .button {
    width: 100%;
  }

  .message-console {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .message-sidebar {
    max-height: 480px;
    overflow-y: auto;
  }

  .message-stage {
    min-height: 580px;
  }

  .message-conversation-head,
  .message-request-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .message-bubble {
    max-width: 88%;
  }
}

@media (max-width: 440px) {
  .social-shell {
    width: calc(100% - 16px);
  }

  .social-member-main img,
  .social-member-avatar {
    width: 52px;
    height: 52px;
  }

  .social-xp-summary {
    grid-template-columns: 1fr;
  }

  .social-card-actions,
  .message-head-actions,
  .message-request-banner > div:last-child {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .social-card-actions > *,
  .message-head-actions > *,
  .message-request-banner .button {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-progress span,
  .social-global-result {
    transition: none;
  }
}
