.cm-hue-0 { --hue: #ff8a1f; }
.cm-hue-1 { --hue: #3fd5c4; }
.cm-hue-2 { --hue: #f5c518; }
.cm-hue-3 { --hue: #5aa9ff; }
.cm-hue-4 { --hue: #5fe08a; }
.cm-hue-5 { --hue: #ff7ab3; }

.cm-head {
  padding-bottom: 28px;
  border-bottom: 0;
}

.cm-head--tight {
  padding: 28px 0 20px;
}

.cm-head--tight h1 {
  margin-bottom: 0;
}

.cm-head__row {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.cm-nav {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 26, 34, .92), rgba(14, 19, 25, .92));
}

.cm-nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 138, 31, .35) 30%, rgba(63, 213, 196, .25) 70%, transparent);
  pointer-events: none;
}

.cm-nav__in {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cm-nav__in::-webkit-scrollbar {
  display: none;
}

.cm-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 16px;
  color: var(--muted);
  font: .76rem var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none !important;
  transition: color .15s, background .15s;
}

.cm-nav__link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .02);
}

.cm-nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transition: transform .2s var(--ease);
}

.cm-nav__link[aria-current="page"] {
  color: var(--signal-2);
}

.cm-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.cm-nav__link--end {
  margin-left: auto;
}

.cm-nav__link .avatar {
  width: 22px;
  height: 22px;
}

.cm-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--signal);
  color: #160a00;
  font: 700 .66rem/1 var(--font-mono);
  letter-spacing: 0;
}

.cm-count--muted {
  background: var(--panel-3);
  color: var(--text-2);
}

.cm-user {
  color: var(--hue, var(--text));
  font-weight: 600;
  text-decoration: none;
}

a.cm-user:hover {
  color: var(--hue, var(--text));
  text-decoration: underline;
}

.cm-user.is-gone {
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
}

.cm-role {
  height: 20px;
  padding: 0 6px;
  font-size: .62rem;
  gap: 4px;
}

.cm-role .icon {
  width: 11px;
  height: 11px;
}

.cm-on {
  color: var(--ok);
}

.cm-ava {
  position: relative;
  display: inline-grid;
  flex: none;
}

.cm-ava.is-online::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 2px var(--bg), 0 0 8px var(--ok);
}

.cm-ava--sm .avatar {
  width: 30px;
  height: 30px;
}

.cm-ava--sm.is-online::after {
  width: 9px;
  height: 9px;
}

.cm-ava--xl .avatar {
  width: 104px;
  height: 104px;
  border-width: 2px;
}

.cm-ava--xl.is-online::after {
  width: 16px;
  height: 16px;
  right: -4px;
  bottom: -4px;
}

.cm-group-ava {
  color: var(--cyan);
}

.cm-group-ava .icon {
  width: 55%;
  height: 55%;
}

.cm-cats,
.cm-topics,
.cm-hits {
  overflow: hidden;
}

.cm-cat,
.cm-topic {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 150px 250px;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}

.cm-cat:last-child,
.cm-topic:last-child {
  border-bottom: 0;
}

.cm-cat:hover,
.cm-topic:hover {
  background: rgba(255, 255, 255, .02);
}

.cm-cat__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-2);
  background: linear-gradient(160deg, var(--panel-3), var(--panel));
  color: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.cm-cat__icon .icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
}

.cm-cat.is-new .cm-cat__icon {
  border-color: var(--signal);
  color: var(--signal-2);
  box-shadow: inset 0 0 18px rgba(255, 138, 31, .18);
}

.cm-cat__icon--lg {
  width: 68px;
  height: 68px;
  flex: none;
  margin-top: 6px;
}

.cm-cat__icon--lg .icon {
  width: 30px;
  height: 30px;
}

.cm-cat__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 4px;
  font-size: 1.08rem;
}

.cm-cat__title a {
  color: var(--text);
}

.cm-cat__title a:hover {
  color: var(--signal-2);
}

.cm-cat__main p {
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
}

.cm-cat__last {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: .9rem;
}

.cm-cat__last > a {
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-cat__last > a:hover {
  color: var(--text);
}

.cm-topic__nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  text-align: center;
}

.cm-topic__nums dt {
  order: 2;
  font: .62rem var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cm-topic__nums dd {
  margin: 0;
  font: 1.12rem/1.2 var(--font-mono);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.cm-topic__nums div {
  display: flex;
  flex-direction: column-reverse;
}

.cm-topic {
  grid-template-columns: 32px minmax(0, 1fr) 150px 220px;
  padding: 14px 20px;
}

.cm-topic__state {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.cm-topic.is-new .cm-topic__state {
  border-color: rgba(255, 138, 31, .5);
  color: var(--signal-2);
}

.cm-topic.is-pinned {
  background: linear-gradient(90deg, rgba(255, 138, 31, .05), transparent 60%);
}

.cm-topic.is-pinned .cm-topic__state {
  color: var(--signal);
}

.cm-topic.is-hidden {
  opacity: .62;
}

.cm-topic__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
  min-width: 0;
}

.cm-topic__title a {
  color: var(--text);
  overflow-wrap: anywhere;
}

.cm-topic.is-new .cm-topic__title a {
  color: var(--signal-2);
}

.cm-topic__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  font-size: .84rem;
  color: var(--muted);
}

.cm-topic__meta .tag {
  height: 20px;
  font-size: .62rem;
}

.cm-topic__cat {
  color: var(--cyan);
}

.cm-topic__jump {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: .72rem var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cm-topic__last {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.cm-topic__last .avatar {
  width: 30px;
  height: 30px;
  flex: none;
}

.cm-topic__last > span {
  display: grid;
  min-width: 0;
  font-size: .86rem;
}

.cm-topic__ago {
  color: var(--muted);
  font-size: .8rem;
}

.cm-toolbar {
  gap: 14px;
  margin-bottom: 18px;
}

.cm-toolbar__end {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.cm-why {
  height: auto;
  min-height: 24px;
  padding: 4px 10px;
  white-space: normal;
  text-transform: none;
  letter-spacing: 0;
  font-size: .78rem;
}

.cm-search {
  display: flex;
  gap: 8px;
}

.cm-search .input {
  flex: 1;
  min-width: 0;
}

.cm-search--big {
  max-width: 620px;
}

.cm-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cm-feed li {
  display: grid;
  gap: 2px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
}

.cm-feed li:last-child {
  border-bottom: 0;
}

.cm-feed li > a {
  color: var(--text);
  font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-feed li > a:hover {
  color: var(--signal-2);
}

.cm-feed span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  color: var(--muted);
}

.cm-feed--flat li {
  padding: 8px 0;
}

.cm-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.cm-stats .readout {
  padding: 10px;
}

.cm-stats .readout__value {
  font-size: 1.25rem;
}

.cm-stats .readout__label {
  font-size: .58rem;
  letter-spacing: .12em;
}

.cm-online-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  font: .76rem var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-2);
}

.cm-names {
  margin: 0;
  font-size: .88rem;
  line-height: 1.7;
}

.cm-board__note {
  font: .68rem var(--font-mono);
  letter-spacing: .08em;
  color: var(--muted);
}

.cm-board__body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 18px 26px;
  align-items: start;
  padding: 18px 22px;
}

.cm-board__stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cm-board__stats .readout {
  padding: 10px 12px;
}

.cm-board__stats .readout__value {
  font-size: 1.45rem;
}

.cm-board__stats .readout__label {
  font-size: .6rem;
  letter-spacing: .14em;
}

.cm-board__who .cm-online-line {
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.cm-board__split {
  font: .82rem var(--font-body);
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.cm-board__split--block {
  margin: 4px 0 8px;
}

.cm-board__names {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-board__names li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .22);
  font-size: .88rem;
}

.cm-board__names li.is-staff {
  border-left: 2px solid var(--signal);
}

.cm-board__names .cm-user {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-board__names .cm-board__rest {
  padding: 4px 10px;
  border-style: dashed;
  background: none;
  color: var(--muted);
  font-size: .82rem;
}

.cm-board__newest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 22px;
  font-size: .9rem;
}

.cm-board__key {
  font: .68rem var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.cm-posts {
  gap: 22px;
}

.cm-post .msg__head {
  gap: 6px 10px;
}

.cm-post__meta {
  font: .72rem var(--font-mono);
  color: var(--muted);
}

.cm-post__num {
  font: .74rem var(--font-mono);
  color: var(--muted);
}

.cm-post__num:hover {
  color: var(--signal-2);
}

.msg__head .cm-post__num {
  margin-left: 0;
}

.cm-post .msg__head time {
  margin-left: auto;
}

.cm-post:target .msg__box {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-dim);
}

.cm-post__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 8px 12px 10px 16px;
  border-top: 1px dashed var(--line);
}

.cm-post__edited {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--muted);
}

.cm-post__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: auto;
}

.cm-post__actions form {
  margin: 0;
}

.cm-act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
  font: .7rem var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none !important;
}

.cm-act:hover {
  color: var(--text);
  border-color: var(--line-2);
}

.cm-act--danger:hover {
  color: #ff9c94;
  border-color: rgba(255, 90, 79, .5);
}

.cm-new-line {
  color: var(--signal-2);
}

.cm-new-line span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cm-new-line::before {
  background: linear-gradient(90deg, transparent, var(--signal), transparent);
}

.cm-blocked summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  color: var(--muted);
  font-size: .88rem;
  cursor: pointer;
  list-style: none;
}

.cm-blocked summary::-webkit-details-marker {
  display: none;
}

.cm-editor {
  display: grid;
  gap: 8px;
}

.cm-editor__label {
  margin-bottom: -2px;
}

.cm-editor__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--line);
}

.cm-editor__tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: none;
  border: 0;
  color: var(--muted);
  font: .7rem var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

.cm-editor__tab:hover {
  color: var(--text);
}

.cm-editor__tab[aria-selected="true"] {
  color: var(--signal-2);
}

.cm-editor__tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--signal);
}

.cm-editor__hint {
  margin-left: auto;
  padding: 0 4px;
  font: .7rem var(--font-mono);
  color: var(--muted);
}

.cm-editor__preview {
  min-height: 140px;
  padding: 14px 16px;
  border: 1px dashed var(--line-2);
  background: rgba(0, 0, 0, .2);
  transition: opacity .15s;
}

.cm-editor__preview.is-stale {
  opacity: .55;
}

.cm-editor.is-preview .cm-editor__src {
  display: none;
}

.cm-modbox .panel__body form {
  margin: 0;
}

.cm-move {
  display: flex;
  gap: 6px;
}

.cm-move .select {
  min-height: 32px;
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: .86rem;
}

.cm-tips,
.cm-rules {
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: .92rem;
}

.cm-tips li + li,
.cm-rules li + li {
  margin-top: 6px;
}

.cm-hit {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.cm-hit:last-child {
  border-bottom: 0;
}

.cm-hit h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.cm-hit h3 a {
  color: var(--text);
}

.cm-hit p {
  margin: 0 0 6px;
  color: var(--text-2);
  font-size: .92rem;
}

.cm-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  transition: border-color .15s;
}

.cm-card:hover {
  border-color: var(--line-2);
}

.cm-card.is-staff {
  border-left: 2px solid var(--signal);
}

.cm-card.is-request {
  border-color: rgba(255, 138, 31, .45);
}

.cm-card__main {
  flex: 1;
  min-width: 0;
}

.cm-card__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0;
  font-size: 1rem;
}

.cm-card__meta {
  margin: 2px 0 0;
  font-size: .8rem;
  color: var(--muted);
}

.cm-card__acts {
  display: flex;
  gap: 6px;
  flex: none;
}

.cm-card__acts form {
  margin: 0;
}

.cm-world {
  flex: none;
}

.cm-profile-top {
  padding-bottom: 28px;
}

.cm-dossier {
  overflow: visible;
  background:
    linear-gradient(90deg, rgba(255, 138, 31, .06), transparent 40%),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(255, 255, 255, .015) 23px 24px),
    linear-gradient(180deg, var(--panel-2), var(--panel));
}

.cm-dossier__in {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 28px;
}

.cm-dossier__id .eyebrow {
  margin-bottom: 6px;
}

.cm-dossier__name {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  color: var(--hue, var(--text));
  overflow-wrap: anywhere;
}

.cm-dossier__tags {
  gap: 8px;
}

.cm-dossier__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin: 16px 0 0;
}

.cm-dossier__meta div {
  display: grid;
}

.cm-dossier__meta dt {
  font: .64rem var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.cm-dossier__meta dd {
  margin: 0;
  font-size: .94rem;
}

.cm-dossier__meta dd a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cm-dossier__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  align-self: start;
}

.cm-dossier__actions form {
  margin: 0;
}

.cm-dossier--locked .cm-dossier__in {
  grid-template-columns: auto minmax(0, 1fr);
}

.cm-dossier--locked .cm-dossier__actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.cm-menu {
  position: relative;
}

.cm-menu summary {
  list-style: none;
}

.cm-menu summary::-webkit-details-marker {
  display: none;
}

.cm-menu__list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  display: grid;
  min-width: 230px;
  padding: 6px;
  border: 1px solid var(--line-3);
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.cm-menu__list form {
  margin: 0;
}

.cm-menu__list button,
.cm-menu__list a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: 0;
  color: var(--text-2);
  font: .9rem var(--font-body);
  text-align: left;
  cursor: pointer;
  text-decoration: none !important;
}

.cm-menu__list button:hover,
.cm-menu__list a:hover {
  background: var(--panel-3);
  color: var(--text);
}

.cm-menu__form {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-bottom: 1px solid var(--line);
}

.cm-menu__form .input {
  min-height: 34px;
  padding: 6px 10px;
  font-size: .88rem;
}

.cm-menu__form button {
  width: auto;
  flex: none;
}

.cm-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cm-mini li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: .88rem;
}

.cm-mini .cm-user {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-settings-id {
  display: flex;
  gap: 14px;
  align-items: center;
}

.cm-choice,
.cm-reasons {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.cm-choice legend,
.cm-reasons legend {
  margin-bottom: 8px;
  padding: 0;
}

.cm-mention {
  padding: 0 3px;
  border-radius: var(--r);
  background: var(--cyan-dim);
  color: var(--cyan);
  font-weight: 600;
}

.cm-mention.is-me {
  background: var(--signal-dim);
  color: var(--signal-2);
}

.cm-pm {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.cm-pm__list {
  position: sticky;
  top: calc(var(--topbar) + 20px);
  max-height: calc(100vh - var(--topbar) - 40px);
  display: flex;
  flex-direction: column;
}

.cm-pm__list .panel__head .btn {
  flex: none;
}

.cm-pm__empty {
  padding: 18px;
  margin: 0;
}

.cm-convs {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}

.cm-conv {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
  color: var(--text-2);
  text-decoration: none !important;
  transition: background .15s;
}

.cm-conv:hover {
  background: rgba(255, 255, 255, .025);
  color: var(--text);
}

.cm-conv.is-active {
  border-left-color: var(--signal);
  background: var(--panel-3);
}

.cm-conv__main {
  display: grid;
  flex: 1;
  min-width: 0;
}

.cm-conv__top {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.cm-conv__top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
}

.cm-conv__top time {
  flex: none;
  font: .68rem var(--font-mono);
  color: var(--muted);
}

.cm-conv__preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .84rem;
  color: var(--muted);
}

.cm-conv.is-unread .cm-conv__preview {
  color: var(--text);
}

.cm-pm__pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cm-pm__pane[data-cm-conv] {
  height: calc(100vh - var(--topbar) - 150px);
  min-height: 520px;
}

.cm-pm__pane--idle {
  min-height: 420px;
  justify-content: center;
  padding: 24px;
}

.cm-pm__pane--idle .empty {
  border: 0;
}

.cm-pm__privacy {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
}

.cm-pm__head {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, transparent 0 3px, rgba(255, 255, 255, .012) 3px 4px);
}

.cm-pm__back {
  display: none;
}

.cm-pm__who {
  flex: 1;
  min-width: 0;
}

.cm-pm__name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.08rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-pm__sub {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-log {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
}

.cm-log__empty {
  margin: auto;
  color: var(--muted);
}

.cm-more {
  margin: 0 0 10px;
  text-align: center;
  font: .74rem var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cm-more a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cm-day {
  position: relative;
  margin: 14px 0 8px;
  text-align: center;
  font: .68rem var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.cm-day::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line);
}

.cm-day span {
  position: relative;
  padding: 0 12px;
  background: var(--panel);
}

.cm-day--new {
  color: var(--signal-2);
}

.cm-day--new::before {
  background: rgba(255, 138, 31, .45);
}

.cm-sys {
  margin: 6px 0;
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
  font-style: italic;
}

.cm-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: min(78%, 640px);
  margin-top: 8px;
}

.cm-msg.is-cont {
  margin-top: 0;
}

.cm-msg.is-mine {
  align-self: flex-end;
  align-items: flex-end;
}

.cm-msg__who {
  margin: 0 0 2px 4px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--hue, var(--text-2));
}

.cm-msg__bubble {
  position: relative;
  padding: 9px 13px;
  border: 1px solid var(--line-2);
  background: var(--panel-3);
  color: var(--text);
  font-size: .95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: 2px 10px 10px 10px;
}

.cm-msg.is-cont .cm-msg__bubble {
  border-radius: 2px 10px 10px 2px;
}

.cm-msg.is-mine .cm-msg__bubble {
  border-color: rgba(255, 138, 31, .4);
  background: linear-gradient(160deg, rgba(255, 138, 31, .16), rgba(255, 138, 31, .07));
  border-radius: 10px 2px 10px 10px;
}

.cm-msg.is-mine.is-cont .cm-msg__bubble {
  border-radius: 10px 2px 2px 10px;
}

.cm-msg__bubble.is-removed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-style: italic;
  background: transparent;
  border-style: dashed;
}

.cm-msg__bubble code,
.cm-line__text code {
  padding: 1px 5px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, .35);
  font: .86em var(--font-mono);
  color: var(--cyan);
}

.cm-msg__bubble a,
.cm-line__text a {
  color: var(--signal-2);
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.cm-code {
  margin: 6px 0;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, .45);
  font: .84rem/1.5 var(--font-mono);
  color: var(--text-2);
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
}

.cm-code code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

.cm-msg__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 4px 0;
  font: .66rem var(--font-mono);
  color: var(--muted);
  opacity: 0;
  transition: opacity .15s;
}

.cm-msg:hover .cm-msg__meta,
.cm-msg:focus-within .cm-msg__meta,
.cm-msg:last-of-type .cm-msg__meta {
  opacity: 1;
}

.cm-msg__flag {
  display: inline-grid;
  place-items: center;
  padding: 2px;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
}

.cm-msg__flag:hover {
  color: var(--err);
}

.cm-msg__flag .icon {
  width: 12px;
  height: 12px;
}

.cm-seen {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-end;
  margin: 2px 4px 0;
  font: .66rem var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.cm-seen[hidden] {
  display: none;
}

.cm-seen .icon {
  width: 12px;
  height: 12px;
}

.cm-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: end;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, .18);
}

.cm-composer__input {
  min-height: 44px;
  max-height: 180px;
  resize: none;
  line-height: 1.45;
}

.cm-composer__send {
  min-height: 44px;
  width: 52px;
  padding: 0;
}

.cm-composer__hint {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  font: .68rem var(--font-mono);
  color: var(--muted);
}

.cm-composer__hint .is-warn {
  color: var(--warn);
}

.cm-composer__hint .is-err {
  color: #ff9087;
}

.cm-composer .field__error {
  grid-column: 1 / -1;
}

.cm-composer--off {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: .9rem;
}

.cm-composer--off p {
  margin: 0;
}

.cm-to {
  position: relative;
}

.cm-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: 72px;
  z-index: 30;
  margin: 0;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--line-3);
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.cm-suggest button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: 0;
  color: var(--text-2);
  font: .92rem var(--font-body);
  text-align: left;
  cursor: pointer;
}

.cm-suggest button:hover,
.cm-suggest button.is-active {
  background: var(--panel-3);
  color: var(--text);
}

.cm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.cm-chips .tag {
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-size: .78rem;
}

.cm-chat {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 210px;
  gap: 14px;
  height: calc(100vh - var(--topbar) - 120px);
  min-height: 540px;
}

.cm-chat > .panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cm-chans {
  display: grid;
  gap: 1px;
  padding: 8px 6px;
  overflow-y: auto;
}

.cm-chan {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  border-left: 2px solid transparent;
  color: var(--text-2);
  font: .9rem var(--font-mono);
  text-decoration: none !important;
}

.cm-chan:hover {
  background: var(--panel-3);
  color: var(--text);
}

.cm-chan[aria-current="page"] {
  border-left-color: var(--cyan);
  background: var(--cyan-dim);
  color: var(--text);
}

.cm-chan__hash {
  color: var(--cyan);
  font-family: var(--font-mono);
}

.cm-chan__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-chan__n {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  color: var(--muted);
}

.cm-chan__n .led {
  width: 6px;
  height: 6px;
}

.cm-chan .icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.cm-chat__rules {
  margin-top: auto;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--muted);
}

.cm-chat__rules p {
  display: flex;
  gap: 8px;
  margin: 0;
}

.cm-chat__rules p + p {
  margin-top: 8px;
}

.cm-chat__rules .icon {
  margin-top: 2px;
}

.cm-chat__main {
  position: relative;
}

.cm-chat__head {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, transparent 0 3px, rgba(255, 255, 255, .012) 3px 4px);
}

.cm-chat__title {
  flex: 1;
  min-width: 0;
}

.cm-chat__title h2 {
  margin: 0;
  font: 600 1.05rem var(--font-mono);
}

.cm-chat__title p {
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-chat__tags {
  flex: none;
  gap: 6px;
}

.cm-chat__people-toggle {
  cursor: default;
}

.cm-chat__log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 0;
  font-size: .94rem;
  background:
    linear-gradient(rgba(63, 213, 196, .018) 50%, transparent 50%) 0 0 / 100% 4px;
}

.cm-line {
  position: relative;
  display: grid;
  grid-template-columns: 52px auto minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 3px 16px;
  line-height: 1.5;
}

.cm-line:hover {
  background: rgba(255, 255, 255, .025);
}

.cm-line.is-cont .cm-line__name {
  visibility: hidden;
}

.cm-line.is-mention {
  background: linear-gradient(90deg, rgba(255, 138, 31, .14), rgba(255, 138, 31, .03));
  box-shadow: inset 2px 0 0 var(--signal);
}

.cm-line.is-new {
  animation: cm-in .5s var(--ease);
}

@keyframes cm-in {
  from {
    background: rgba(63, 213, 196, .12);
  }
}

.cm-line__time {
  font: .7rem var(--font-mono);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cm-line__name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--hue, var(--text));
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none !important;
}

.cm-line__name .icon {
  width: 11px;
  height: 11px;
  color: var(--signal);
}

.cm-line__text {
  color: var(--text-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cm-line.is-mine .cm-line__text {
  color: var(--text);
}

.cm-line__tools {
  position: absolute;
  right: 10px;
  top: 50%;
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s;
}

.cm-line:hover .cm-line__tools,
.cm-line:focus-within .cm-line__tools {
  opacity: 1;
  pointer-events: auto;
}

.cm-line__tools button {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 24px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
}

.cm-line__tools button:hover {
  color: var(--text);
  background: var(--panel-3);
}

.cm-line__tools button.is-danger:hover {
  color: var(--err);
}

.cm-line__tools .icon {
  width: 13px;
  height: 13px;
}

.cm-line--day {
  display: block;
  margin: 10px 16px;
}

.cm-line--day:hover {
  background: none;
}

.cm-chat__empty {
  margin: 40px 16px;
  text-align: center;
  color: var(--muted);
}

.cm-chat__jump {
  position: absolute;
  left: 50%;
  bottom: 96px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--cyan);
  background: var(--panel-2);
  color: var(--cyan);
  font: .72rem var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transform: translateX(-50%);
  box-shadow: var(--shadow);
}

.cm-chat__jump[hidden] {
  display: none;
}

.cm-chat__jump .icon {
  transform: rotate(90deg);
}

.cm-chat__locked {
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}

.cm-chat__locked h3 {
  margin: 0;
  color: var(--text);
}

.cm-chat__locked p {
  max-width: 44ch;
  margin: 0 0 8px;
}

.cluster--center {
  justify-content: center;
}

.cm-composer--chat .cm-composer__input {
  font-size: .95rem;
}

.cm-people {
  margin: 0;
  padding: 8px 12px;
  list-style: none;
  overflow-y: auto;
}

.cm-people li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px;
  color: var(--hue, var(--text-2));
  font-size: .9rem;
  font-weight: 600;
}

.cm-people li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 6px var(--ok);
  flex: none;
}

.cm-staff-mark .icon {
  width: 12px;
  height: 12px;
  color: var(--signal);
}

.cm-people__hidden,
.cm-people__note {
  margin: 0;
  padding: 0 16px 12px;
}

.cm-adm-tabs {
  margin-top: -6px;
}

.cm-adm-tabs .adm-nav__count {
  position: static;
  margin-left: 2px;
}

.cm-snapshot {
  margin: 0 0 12px;
  padding: 14px 16px;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, .35);
  font: .88rem/1.55 var(--font-mono);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cm-pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cm-adm-item > summary {
  cursor: pointer;
  list-style: none;
  flex-wrap: wrap;
}

.cm-adm-item > summary::-webkit-details-marker {
  display: none;
}

.cm-adm-item[open] > summary {
  border-bottom: 1px solid var(--line);
}

.cm-adm-item > summary .panel__title {
  flex: 1;
}

.cm-adm-item:target {
  border-color: var(--signal);
}

.cm-adm-chat {
  max-width: 520px;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .cm-chat {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .cm-chat__people {
    display: none !important;
  }

  .cm-chat.is-people-open .cm-chat__people {
    display: flex !important;
    position: absolute;
    right: 24px;
    top: 120px;
    z-index: 20;
    width: 240px;
    max-height: 60vh;
    box-shadow: var(--shadow);
  }

  .cm-chat {
    position: relative;
  }

  .cm-chat__people-toggle {
    cursor: pointer;
  }

  .cm-cat {
    grid-template-columns: 52px minmax(0, 1fr) 140px;
  }

  .cm-cat__last {
    grid-column: 2 / -1;
  }
}

@media (max-width: 980px) {
  .cm-pm {
    grid-template-columns: minmax(0, 1fr);
  }

  .cm-board__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .cm-board__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cm-pm__list {
    position: static;
    max-height: none;
  }

  .cm-pm--open .cm-pm__list,
  .cm-pm__pane--idle {
    display: none;
  }

  .cm-pm__back {
    display: inline-flex;
  }

  .cm-pm__pane[data-cm-conv] {
    height: calc(100vh - var(--topbar) - 120px);
    min-height: 460px;
  }

  .cm-topic {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .cm-topic .cm-topic__nums {
    display: none;
  }

  .cm-topic__last {
    grid-column: 2;
  }

  .cm-chat {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }

  .cm-chat__channels {
    order: 0;
  }

  .cm-chat__channels .panel__head,
  .cm-chat__rules {
    display: none;
  }

  .cm-chans {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 6px;
  }

  .cm-chan {
    flex: none;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .cm-chan[aria-current="page"] {
    border-bottom-color: var(--cyan);
  }

  .cm-chat > .cm-chat__main {
    height: calc(100vh - var(--topbar) - 150px);
    min-height: 460px;
  }

  .cm-dossier__in {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .cm-dossier__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .cm-cat {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .cm-cat__icon {
    width: 44px;
    height: 44px;
  }

  .cm-cat .cm-topic__nums {
    display: none;
  }

  .cm-topic {
    padding: 12px 14px;
    gap: 12px;
  }

  .cm-head__row .cm-cat__icon--lg {
    display: none;
  }

  .cm-dossier__in {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px;
    gap: 18px;
  }

  .cm-ava--xl .avatar {
    width: 76px;
    height: 76px;
  }

  .cm-msg {
    max-width: 90%;
  }

  .cm-line {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 8px;
  }

  .cm-line__time {
    display: none;
  }

  .cm-editor__hint {
    display: none;
  }

  .cm-composer__hint span:first-child {
    display: none;
  }

  .cm-toolbar__end {
    margin-left: 0;
    width: 100%;
  }

  .cm-toolbar__end .btn {
    flex: 1;
  }

  .cm-mini {
    grid-template-columns: minmax(0, 1fr);
  }

  .cm-chat__head {
    flex-wrap: wrap;
  }

  .cm-board .panel__head {
    flex-wrap: wrap;
    row-gap: 2px;
  }

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

  .cm-board__body,
  .cm-board__newest {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cm-line.is-new {
    animation: none;
  }
}
