/* Portal social surfaces. The rail, server navigation and conversation remain
   distinct across viewport sizes, including when artwork is unavailable. */
#communityHub,
#communityDialog,
#view-messages {
  --social-rail: #090e14;
  --social-sidebar: #11181e;
  --social-stage: #151d25;
  --social-field: #202c33;
  --social-line: #354741;
  --social-muted: #b9c8c4;
  --social-ink: #f4fff9;
  --social-mint: #78edb6;
  --social-accent: #51edaa;
  --social-violet: #c6b3ff;
  color: var(--social-ink);
  --edge: var(--social-line);
}
#communityHub,
#view-messages {
  max-width: 80rem;
  margin: .75rem auto 2rem;
}
:is(#communityHub, #communityDialog, #view-messages) :is(input, textarea, select, button, summary, a, [tabindex]):focus-visible {
  outline: 2px solid var(--social-mint);
  outline-offset: 2px;
}
:is(#communityHub, #communityDialog, #view-messages) :is(h1,h2,h3,h4) {
  color: var(--social-ink);
  font-family: inherit;
  letter-spacing: -.025em;
  text-shadow: none;
  overflow-wrap: anywhere;
}
:is(#communityHub, #communityDialog, #view-messages) .btn {
  min-height: 44px;
  border: 1px solid var(--social-line);
  border-radius: .65rem;
  background: var(--social-field);
  color: var(--social-ink);
  padding: .45rem .8rem;
  font: inherit;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.25;
  box-shadow: none;
  transform: none;
  text-shadow: none;
}
:is(#communityHub, #communityDialog, #view-messages) :is(.btn.primary, .btn[data-social="request"], .btn[data-social="accept"]) {
  background: var(--social-accent);
  border-color: transparent;
  color: #082618;
}
:is(#communityHub, #communityDialog, #view-messages) .btn:not(:disabled):hover {
  border-color: #68827a;
}
:is(#communityHub, #communityDialog, #view-messages) :is(.btn.primary, .btn[data-social="request"], .btn[data-social="accept"]):hover {
  background: var(--social-mint);
}
:is(#communityHub, #communityDialog, #view-messages) :is(input:not([type=checkbox]), textarea, select) {
  border-color: var(--social-line);
  background: #151a1e;
  color: var(--social-ink);
  box-sizing: border-box;
  font-size: 1rem;
}
:is(#communityHub, #view-messages) :is(.hint, .cm-meta, .soc-meta, small) { color: var(--social-muted); }
:is(#communityHub, #view-messages) .cm-workspace {
  display: grid;
  grid-template-columns: 4.45rem minmax(0,1fr);
  background: var(--social-sidebar);
  border: 1px solid var(--social-line);
  border-radius: 1.05rem;
  overflow: clip;
  min-height: min(66dvh,43rem);
  box-shadow: inset 0 1px #a9ffd91f, 0 12px 28px -18px #000d;
}
:is(#communityHub, #view-messages) .cm-rail {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: center;
  max-height: calc(100dvh - 4.5rem);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: #526661 transparent;
  background: var(--social-rail);
  border-right: 1px solid #2b3338;
  padding: .8rem .25rem;
  min-width: 0;
}
:is(#communityHub, #view-messages) .cm-rail-link {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #3d494d;
  border-radius: .95rem;
  background: linear-gradient(145deg,#253b34,#18222c);
  color: #e6fff1;
  font-size: .95rem;
  font-weight: 750;
  text-align: center;
  line-height: 1;
  box-shadow: none;
}
:is(#communityHub, #view-messages) .cm-rail-link:is([aria-current="page"], [aria-current="true"]) {
  border-color: #5dd5a0;
  background: linear-gradient(145deg,#28533f,#173a32);
  border-radius: .95rem;
}
:is(#communityHub, #view-messages) .cm-rail-link:is([aria-current="page"], [aria-current="true"])::before {
  content: "";
  position: absolute;
  inset-inline-start: -.5rem;
  width: 3px;
  height: 1.35rem;
  border-radius: 2px;
  background: var(--social-mint);
}
:is(#communityHub, #view-messages) .cm-rail-link img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}
:is(#communityHub, #view-messages) .cm-rail-link .cm-rail-icon { max-width: 100%; max-height: 100%; border-radius: inherit; }
:is(#communityHub, #view-messages) .cm-rail-link[data-cm="create"] { color: var(--social-mint); }
#communityHub .cm-main {
  padding: clamp(.85rem, 2vw, 1.5rem);
  min-width: 0;
}
#communityHub .cm-main:has(.cm-shell) { padding: 0; }
#communityHub .cm-main:has(.cm-shell) > :is(.cm-heading,.cm-banner,[data-cm-status]:not(:empty)) { margin: .8rem 1rem; }
#communityHub .cm-main > .cm-banner { width: calc(100% - 2rem); max-height: 7rem; }
#communityHub .cm-heading { padding: 0; gap: .6rem; }
#communityHub .cm-heading h1,
#view-messages .soc-head h1 { font-size: clamp(1.35rem, 2.3vw, 1.85rem); line-height: 1.2; }
#communityHub .cm-heading > .cm-row { flex: 1 1 auto; min-width: 0; }
#communityHub .cm-controls { gap: .4rem; }
#communityHub [data-cm-status]:empty { margin: 0; }
#communityHub .cm-search { max-width: 40rem; margin-block: 1rem 1.25rem; }
#communityHub .cm-search label { color: var(--social-muted); font-size: .9rem; }
#communityHub [data-cm-results] h2 { margin: 1.1rem 0 .55rem; font-size: 1.05rem; }
#communityHub :is(.cm-card,.cm-frame,.cm-list,.cm-stage) {
  background: var(--social-stage);
  border-color: var(--social-line);
  box-shadow: none;
}
#communityHub .cm-frame { margin-top: .8rem; }
#communityHub .cm-card { border-radius: .75rem; gap: .5rem; }
#communityHub .cm-card h3 { font-size: 1.1rem; }
#communityHub .cm-card .btn { justify-self: start; }
#communityHub .cm-card p { color: #d1dadd; }
#communityHub :is(.cm-art,.cm-emblem) { border-radius: .8rem; }
#communityHub .cm-shell {
  gap: 0;
  grid-template-columns: minmax(12rem,15rem) minmax(0,1fr);
  border-top: 1px solid var(--social-line);
}
#communityHub .cm-shell > :first-child {
  min-width: 0;
  padding: .7rem;
  background: var(--social-sidebar);
  border-right: 1px solid var(--social-line);
}
#communityHub .cm-list,
#communityHub .cm-stage { margin: 0; border: 0; border-radius: 0; }
#communityHub .cm-list { background: transparent; padding: 0; }
#communityHub .cm-list nav { gap: .15rem; }
#communityHub .cm-channel-group + .cm-channel-group { margin-top: .8rem; }
#communityHub .cm-channel-group h3 { margin: .35rem .65rem; color: var(--social-muted); font-size: .87rem; }
#communityHub .cm-list button {
  width: 100%;
  font-weight: 650;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
#communityHub .cm-list button[aria-current="true"] {
  color: #e4fff1;
  background: #274236;
  box-shadow: inset 3px 0 #6becae;
}
#communityHub .cm-side details { margin-top: .4rem; border-top: 1px solid var(--social-line); }
#communityHub .cm-side summary,
#communityHub .cm-list summary { color: var(--social-muted); font-size: .93rem; }
#communityHub .cm-stage { padding: 0; }
#communityHub .cm-channel-title {
  align-content: center;
  padding: .75rem 1rem;
  min-height: 3.3rem;
  gap: .4rem .75rem;
  margin: 0;
  background: linear-gradient(100deg,#1a2c29,#191d2b);
}
#communityHub .cm-channel-title h2 { font-size: 1.12rem; }
#communityHub .cm-stage-body { padding: .6rem .9rem .85rem; }
#communityHub .cm-stage-body > div { min-width: 0; }
#communityHub .cm-log,
#view-messages .soc-history {
  max-height: clamp(12rem,45dvh,36rem);
  padding-inline: .2rem;
  scrollbar-width: thin;
  scrollbar-color: #526661 transparent;
  scroll-padding-block: .75rem;
}
#communityHub .cm-log { min-height: min(23dvh,13rem); }
#communityHub .cm-log > p:only-child { color: var(--social-muted); padding: .6rem .25rem; }
#communityHub .cm-chat { border-bottom: 1px solid #ffffff0d; padding: .55rem .25rem; }
#communityHub .cm-chat p { white-space: pre-wrap; }
#communityHub .cm-byline { gap: .4rem; }
#communityHub .cm-chat time { font-size: .83rem; color: var(--social-muted); }
#communityHub .cm-chat .cm-row { gap: .3rem; margin-top: .2rem; }
#communityHub .cm-chat .cm-row .btn,
#view-messages .soc-meta .btn {
  padding: .15rem .45rem;
  min-height: 1.8rem !important;
  background: transparent;
  color: var(--social-muted);
  font-size: .83rem;
  border: 0;
  text-decoration: underline;
  text-decoration-color: #59686b;
  text-underline-offset: .17rem;
}
#communityHub .cm-compose,
#view-messages .soc-compose {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  gap: .4rem .55rem;
  margin: .5rem 0 0;
  padding: .55rem;
  border: 1px solid #45535a;
  border-radius: .8rem;
  background: var(--social-field);
}
#communityHub .cm-compose [data-reply] { grid-column: 1/-1; }
#communityHub .cm-compose [data-reply]:empty { display: none; }
#communityHub .cm-compose label,
#view-messages .soc-compose label { color: #d5dfe1; font-size: .89rem; }
#communityHub .cm-compose textarea,
#view-messages .soc-compose textarea {
  height: 2.75rem;
  min-height: 44px;
  padding: .5rem .65rem;
  border: 1px solid #445057;
  border-radius: .5rem;
}
#communityHub .cm-history-nav { display: flex; flex-wrap: wrap; gap: .45rem; }
#communityHub .room-call-pane {
  border-radius: .75rem;
  background: #171d21;
  border: 1px solid var(--social-line);
  padding: .85rem;
  margin-bottom: .6rem;
}
#communityHub .room-call-pane h3 { font-size: 1rem; }
#communityHub .room-call-pane .room-button { border-radius: .65rem; }
#communityHub .room-call-pane > .room-button {
  justify-self: start;
  background: var(--social-accent);
  color: #082618;
  border-color: transparent;
}
#communityHub .room-peer { min-width: 0; }
#communityDialog { background: var(--social-sidebar); border-color: #50645d; }

#view-messages.active { padding: 0; }
#view-messages .soc-main {
  display: grid;
  grid-template-columns: minmax(11rem,14rem) minmax(0,1fr);
  grid-template-rows: auto auto auto 1fr;
  align-content: start;
  padding: .85rem;
  gap: .45rem 1rem;
  min-width: 0;
  background: var(--social-sidebar);
}
#view-messages .soc-main > * { min-width: 0; grid-column: 2; }
#view-messages .soc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  grid-column: 1/-1;
  padding: .3rem .25rem .8rem;
  border-bottom: 1px solid var(--social-line);
}
#view-messages .soc-head h1 { margin: 0; }
#view-messages .soc-tabs {
  grid-row: 2 / span 5;
  grid-column: 1;
  display: flex;
  flex-flow: column nowrap;
  align-self: start;
  gap: .2rem;
  margin: .2rem 0;
}
#view-messages .soc-tabs button {
  background: transparent;
  border-color: transparent;
  color: var(--social-muted);
  text-align: start;
  justify-content: flex-start;
}
#view-messages .soc-tabs [aria-pressed="true"] {
  color: #e3fff1;
  background: #274236;
  box-shadow: inset 3px 0 var(--social-mint);
}
#view-messages .soc-status,
#view-messages .soc-pager { margin: 0; }
#view-messages :is(.soc-status,.soc-pager):empty { display: none; }
#view-messages .soc-find,
#view-messages .soc-thread,
#view-messages .soc-results,
#view-messages .soc-suggestions {
  padding: .85rem;
  margin: 0;
  border: 1px solid var(--social-line);
  border-radius: .8rem;
  background: var(--social-stage);
}
#view-messages .soc-results:empty,
#view-messages .soc-suggestions:empty { display: none; }
#view-messages .soc-suggestions h2,
#view-messages .soc-thread h2 { font-size: 1.12rem; }
#view-messages .soc-suggestion .soc-row { flex: 1 1 9rem; width: auto; }
#view-messages .soc-person,
#view-messages .soc-suggestion { min-width: 0; overflow-wrap: anywhere; }
#view-messages .soc-suggestion {
  display: flex;
  gap: .6rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: .4rem 0;
}
#view-messages .soc-list { gap: .2rem; }
#view-messages .soc-row {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 0;
  border-color: transparent;
  background: #262d32;
}
#view-messages .soc-shortcuts { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
#view-messages .soc-avatar {
  display: inline-grid;
  place-items: center;
  margin: 0;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #53796c;
  background: #29453d;
  color: #e2fff1;
  font-weight: 750;
  font-size: .88rem;
}
#view-messages .soc-name { display: grid; min-width: 0; gap: .1rem; overflow-wrap: anywhere; }
#view-messages .soc-shortcuts [data-social="findFriends"] { color: #d9ffea; border-color: #487665; background: #224036; }
#view-messages .soc-main:not(:has(.soc-tabs)) { grid-template-columns: minmax(0,1fr); }
#view-messages .soc-main:not(:has(.soc-tabs)) > * { grid-column: 1; }
#view-messages .soc-history {
  min-height: min(24dvh,14rem);
  gap: .5rem;
  padding: .4rem .2rem;
  margin: .5rem 0;
}
#view-messages .soc-bubble { background: #26313a; }
#view-messages .soc-mine { background: #234334; }
#view-messages .soc-meta { gap: .45rem; }
#view-messages .soc-thread .soc-person-actions { margin: .45rem 0; }
#view-messages .soc-main > p:only-of-type + .btn { justify-self: start; }

/* ASAPANIME community identity: sharp artwork and surfaces, emerald navigation,
   violet secondary labels, and the same familiar channel/message structure. */
#communityHub .cm-discover-head {
  align-items: center;
  padding: .6rem 0 1.15rem;
  border-bottom: 1px solid var(--social-line);
}
#communityHub .cm-intro { flex: 1 1 20rem; min-width: 0; }
#communityHub .cm-eyebrow {
  margin: 0 0 .4rem;
  color: var(--social-mint);
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .1em;
  line-height: 1.5;
}
#communityHub .cm-intro-copy { margin: .6rem 0 0; color: var(--social-muted); line-height: 1.5; }
#communityHub .cm-room-name { flex: 1; min-width: 0; }
#communityHub .cm-room-name .cm-eyebrow { margin-bottom: .15rem; }
#communityHub .cm-room-head :is(.cm-art,.cm-emblem) { flex: 0 0 auto; }
#communityHub .cm-heading > .cm-row > picture { flex: 0 0 auto; }
#communityHub .cm-emblem {
  background: linear-gradient(135deg,#237d59,#143d34 58%,#302344);
  border: 1px solid #5c9b80;
  box-shadow: inset 0 1px #d1ffe933;
  font-size: 1rem;
  letter-spacing: .02em;
}
#communityHub .cm-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem 1rem;
  justify-content: space-between;
  margin: 1.4rem 0 .75rem;
}
#communityHub .cm-section-head h2 { margin: 0; font-size: 1.15rem; }
#communityHub .cm-section-head .cm-meta { color: var(--social-violet); }
#communityHub .cm-directory { gap: .9rem; }
#communityHub .cm-card { padding: 0; gap: 0; overflow: hidden; align-content: stretch; grid-template-rows: 4.5rem minmax(0,1fr); }
#communityHub .cm-card-cover {
  height: 4.5rem;
  overflow: hidden;
  border-bottom: 1px solid #50736666;
  background: linear-gradient(125deg,#142e26 8%,#246043 44%,#183d35 44.5%,#172b2e 70%,#2c2242);
}
#communityHub .cm-card-cover :is(picture,img) { display: block; width: 100%; height: 100%; }
#communityHub .cm-card-banner { object-fit: cover; }
#communityHub .cm-card-body { display: flex; flex-direction: column; gap: .6rem; min-width: 0; padding: 1rem; }
#communityHub .cm-card-body > .cm-row { flex-wrap: nowrap; align-items: center; min-width: 0; }
#communityHub .cm-card-body :is(.cm-art,.cm-emblem) { width: 2.6rem; height: 2.6rem; flex: 0 0 auto; }
#communityHub .cm-card-body > .cm-row > picture { flex: 0 0 auto; }
#communityHub .cm-card-body h3 { margin: 0; min-width: 0; line-height: 1.4; }
#communityHub .cm-card-body > p { margin: 0; font-size: 1rem; line-height: 1.55; }
#communityHub .cm-tags { overflow-wrap: anywhere; color: var(--social-violet); }
#communityHub .cm-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: auto;
  padding-top: .7rem;
}
#communityHub .cm-membership { color: var(--social-muted); font-size: .875rem; }
#communityHub .cm-membership.is-joined { color: var(--social-mint); }
#communityHub .cm-card-foot .btn { border-color: #53756b; color: #e6fff1; }
#communityHub .cm-empty { grid-column: 1/-1; margin: 0; padding: 1rem; border: 1px dashed #547064; border-radius: .75rem; color: var(--social-muted); }
#communityHub .cm-join { margin: 1rem; padding: clamp(1rem,3vw,1.75rem); }
#communityHub .cm-join > p { line-height: 1.6; }
#communityHub .cm-join > .btn { margin-top: .5rem; }
#communityHub .cm-channel-group h3 { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
#communityHub .cm-channel-count { color: var(--social-violet); font-weight: 600; }
#communityHub .cm-channel-icon { display: block; flex: 0 0 auto; width: 1.2rem; height: 1.2rem; }
#communityHub .cm-list button { display: flex; align-items: center; gap: .55rem; }
#communityHub .cm-list button > span { min-width: 0; }
#communityHub .cm-list button .cm-channel-icon { color: #96c0b1; }
#communityHub .cm-list button[aria-current="true"] .cm-channel-icon { color: var(--social-mint); }
#communityHub .cm-staff-label { margin-left: auto; font-size: .75rem; color: var(--social-violet); }
#communityHub .cm-channel-heading { display: flex; align-items: center; gap: .75rem; min-width: 0; flex: 1; }
#communityHub .cm-channel-heading > div { min-width: 0; }
#communityHub .cm-channel-heading > .cm-channel-icon { width: 1.5rem; height: 1.5rem; color: var(--social-mint); }
#communityHub .cm-channel-heading h2 { margin: 0 0 .15rem; line-height: 1.4; }
#communityHub .cm-channel-heading .cm-meta { display: block; line-height: 1.4; }
#communityHub .cm-chat { line-height: 1.55; }
#communityHub .cm-chat .cm-byline strong { color: #f0fff7; }
#communityHub .cm-chat blockquote { border-left-color: var(--social-violet); background: #c6b3ff08; padding: .25rem .65rem; }
#communityHub .cm-compose:focus-within,
#view-messages .soc-compose:focus-within { border-color: #78edb6; }
#communityHub .cm-compose textarea::placeholder { color: #a4b8b1; }
@media (hover: hover) {
  #communityHub .cm-card:hover { border-color: #6aa38d; }
  :is(#communityHub,#view-messages) .cm-rail-link:hover { border-color: var(--social-mint); }
}

@media (min-width: 801px) {
  #communityHub .cm-voice .cm-stage-body { grid-template-columns: minmax(0,1.35fr) minmax(12rem,1fr); }
}
@media (max-width: 800px) {
  #view-community { padding-top: .4rem; }
  #communityHub, #view-messages { margin: .375rem auto 1rem; }
  :is(#communityHub, #view-messages) .cm-workspace {
    grid-template-columns: 3.55rem minmax(0,1fr);
    border-radius: .8rem;
    min-height: calc(100dvh - 4.75rem - var(--room-dock-h, 0px));
  }
  :is(#communityHub, #view-messages) .cm-rail { padding: .65rem .1rem; }
  :is(#communityHub, #view-messages) .cm-rail-link { width: 44px; height: 44px; }
  :is(#communityHub, #view-messages) .cm-rail-link:is([aria-current="true"],[aria-current="page"])::before { inset-inline-start: -.32rem; }
  #communityHub .cm-shell { grid-template-columns: minmax(0,1fr); }
  #communityHub .cm-shell > :first-child { border-right: 0; border-bottom: 1px solid var(--social-line); padding: .3rem .75rem; }
  #communityHub .cm-main { padding: .7rem; }
  #communityHub .cm-main:has(.cm-shell),
  #communityHub .cm-shell,
  #communityHub .cm-stage:not(.cm-voice),
  #communityHub .cm-stage:not(.cm-voice) :is(.cm-stage-body, .cm-stage-body > div) {
    display: flex;
    flex-direction: column;
  }
  #communityHub .cm-shell,
  #communityHub .cm-stage:not(.cm-voice),
  #communityHub .cm-stage:not(.cm-voice) :is(.cm-stage-body, .cm-stage-body > div) { flex: 1 0 auto; }
  #communityHub .cm-stage:not(.cm-voice) .cm-log { flex: 1 0 auto; }
  #communityHub .cm-stage:not(.cm-voice) .cm-compose { margin-top: auto; }
  #communityHub .cm-main:has(.cm-shell) > .cm-heading { margin: .65rem .75rem; }
  #communityHub .cm-heading > .cm-controls { display: grid; width: 100%; grid-template-columns: repeat(auto-fit,minmax(min(100%,7.2rem),1fr)); }
  #communityHub .cm-heading > .cm-controls .btn { padding-inline: .35rem; }
  #communityHub .cm-stage-body { padding: .5rem .6rem .7rem; }
  #communityHub .cm-discover-head { padding-top: .25rem; }
  #communityHub .cm-intro { flex-basis: 100%; }
  #communityHub .cm-intro-copy { font-size: .95rem; }
  #communityHub .cm-section-head { margin-top: 1rem; gap: .2rem; }
  #communityHub .cm-section-head .cm-meta { font-size: .85rem; }
  #communityHub .cm-card-body { padding: .8rem; }
  #communityHub .cm-join { margin: .75rem; }
  #communityHub .cm-list > summary { display: flex; align-items: center; gap: .5rem; list-style: none; }
  #communityHub .cm-list > summary::-webkit-details-marker { display: none; }
  #communityHub .cm-list > summary::after { content: ""; width: .45rem; height: .45rem; flex: 0 0 auto; border-right: 2px solid var(--social-mint); border-bottom: 2px solid var(--social-mint); transform: rotate(45deg); margin-left: auto; margin-right: .25rem; }
  #communityHub .cm-list[open] > summary::after { transform: rotate(225deg); }
  #communityHub .cm-current-channel { color: var(--social-mint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 12rem; font-weight: 500; }
  #communityHub .cm-side details { margin: 0; }
  #communityHub .cm-log, #view-messages .soc-history { max-height: clamp(11rem,39dvh,26rem); }
  #communityHub .cm-channel-title { padding: .55rem .7rem; }
  #communityHub .cm-chat .cm-row .btn, #view-messages .soc-meta .btn { min-height: 44px !important; }
  #communityHub .cm-compose, #view-messages .soc-compose { scroll-margin-block-end: max(.75rem,env(safe-area-inset-bottom)); }
  #view-messages .soc-main { display: block; padding: .65rem; }
  #view-messages .soc-main:has(.soc-thread),
  #view-messages .soc-thread { display: flex; flex-direction: column; }
  #view-messages .soc-thread,
  #view-messages .soc-history { flex: 1 0 auto; }
  #view-messages .soc-thread > [data-social="back"] { align-self: flex-start; }
  #view-messages .soc-thread .soc-compose { margin-top: auto; }
  #view-messages .soc-tabs { flex-direction: row; gap: .35rem; overflow-x: auto; scrollbar-width: thin; padding: .25rem 0; }
  #view-messages .soc-tabs button { flex: none; white-space: nowrap; }
  #view-messages .soc-tabs [aria-pressed="true"] { box-shadow: inset 0 -2px var(--social-mint); }
  #view-messages .soc-main > :is(.soc-find,.soc-results,.soc-thread,.soc-suggestions,.soc-shortcuts) { margin-block: .45rem; }
}
@media (max-width: 370px) {
  :is(#communityHub, #view-messages) .cm-workspace { grid-template-columns: minmax(0,1fr); }
  :is(#communityHub, #view-messages) .cm-rail {
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--social-line);
    overflow-x: auto;
    padding: .4rem .5rem;
  }
  :is(#communityHub, #view-messages) .cm-rail-link:is([aria-current="true"],[aria-current="page"])::before { display: none; }
}
@media (max-width: 800px) and (max-height: 680px) {
  #communityHub .cm-current-channel { display: none; }
  #communityHub .cm-shell > :first-child:not(:has(details[open])) {
    display: grid;
    grid-template-columns: .8fr 1fr 1fr;
    gap: .3rem;
    align-items: start;
  }
  #communityHub .cm-shell > :first-child:not(:has(details[open])) .cm-side { display: contents; }
  #communityHub .cm-shell > :first-child:not(:has(details[open])) details { border: 0; min-width: 0; }
  #communityHub .cm-shell > :first-child:not(:has(details[open])) summary {
    font-size: .85rem;
    line-height: 1.2;
    padding-inline: .1rem;
  }
  #communityHub .cm-stage:not(.cm-voice) .cm-log {
    min-height: 3.5rem;
    max-height: clamp(4rem,calc(100dvh - 28rem),10rem);
  }
  #communityHub .cm-log > p:only-child { margin: 0; padding: .35rem .25rem; }
  #view-messages .soc-thread .soc-history {
    min-height: 3.5rem;
    max-height: clamp(4rem,calc(100dvh - 33rem),10rem);
  }
}
@media (max-width: 370px) {
  :is(#communityHub, #view-messages) .cm-workspace { grid-template-rows: max-content 1fr; }
}
