.cr-app {
  --cr-ink: #13274d;
  --cr-blue: #3155ca;
  --cr-line: #d9e3f5;
  --cr-soft: #f1f5ff;
  color: var(--cr-ink);
  container: cr / inline-size;
}
[data-view="chat-rooms"][hidden], .cr-app [hidden] { display: none !important; }
.cr-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem,3vw,1.85rem);
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(112deg,#111f43,#203b80 60%,#3c58b8);
}
.cr-header h1 { color: inherit; margin: 0; font-size: clamp(1.8rem,4vw,2.6rem); letter-spacing: -.035em; }
.cr-header p { margin: .35rem 0 0; color: #e3eaff; }
.cr-primary {
  border: 1px solid #3155ca;
  border-radius: 9px;
  background: #3155ca;
  color: #fff;
  font: inherit;
  font-weight: 700;
  min-height: 40px;
  padding: .5rem .9rem;
  cursor: pointer;
}
.cr-header .cr-primary { background: #fff; color: #203b80; border-color: #fff; }
.cr-primary:disabled { opacity: .55; cursor: default; }
.cr-primary:hover:not(:disabled) { filter: brightness(.93); }
.cr-app :focus-visible, .cr-dialog :focus-visible { outline: 2px solid #3054c8; outline-offset: 2px; }
.cr-app [data-cr-status]:not(:empty) { padding: .75rem 1rem; background: #fff; border: 1px solid var(--cr-line); border-radius: 10px; }
.cr-search, .cr-lobby-tabs { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin: 1rem 0; }
.cr-search label, .cr-dialog label, .cr-compose-tools label {
  display: grid;
  gap: .35rem;
  min-width: 0;
  font-size: .85rem;
  font-weight: 650;
}
.cr-search label:first-child { flex: 1 1 200px; }
.cr-app :is(input,select,textarea), .cr-dialog :is(input,select,textarea) {
  background: #fff;
  color: #13274d;
  border: 1px solid #bdcae6;
  border-radius: 8px;
  padding: .58rem .62rem;
  box-sizing: border-box;
  width: 100%;
  font: inherit;
  margin: 0;
}
.cr-lobby-tabs button[data-cr-filter] {
  font: inherit;
  color: #1a3269;
  background: #e9effb;
  border: 1px solid #d6e2fb;
  cursor: pointer;
  border-radius: 999px;
  padding: .48rem .8rem;
}
.cr-lobby-tabs button[aria-pressed="true"] { background: #dbe7ff; border-color: #91a9ec; font-weight: 700; }
.cr-directory { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,215px),1fr)); gap: .8rem; }
.cr-room-card, .cr-empty {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--cr-line);
  border-radius: 13px;
  background: #fff;
}
.cr-room-card h3 { margin: .4rem 0 .3rem; overflow-wrap: anywhere; }
.cr-room-card p { margin: 0 0 1rem; overflow-wrap: anywhere; }
.cr-card-foot { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.cr-meta { color: #435d86; font-size: .8rem; }
.cr-room-header { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .7rem; margin: 1rem 0 .65rem; }
.cr-room-header h2, .cr-room-header p { margin: 0; overflow-wrap: anywhere; }
.cr-room-header p { color: #52668b; }
.cr-welcome { background: #eaf0ff; padding: .6rem .85rem; border-radius: 8px; overflow-wrap: anywhere; }
.cr-room-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,.35fr); gap: .65rem; }
.cr-conversation, .cr-people { min-width: 0; border: 1px solid var(--cr-line); border-radius: 12px; background: #fff; }
.cr-history { height: clamp(235px,44vh,540px); overflow: auto; overscroll-behavior: contain; padding: .4rem .8rem; }
.cr-line { border-bottom: 1px solid #eff2fa; padding: .52rem 0; overflow-wrap: anywhere; }
.cr-line header { display: flex; gap: .6rem; align-items: baseline; }
.cr-line header a { font-weight: 750; }
.cr-line header time { font-size: .74rem; color: #506384; }
.cr-notice { color: #586b8e; font-size: .82rem; font-style: italic; }
.cr-notice a { color: inherit; }
.cr-text { margin: .3rem 0; white-space: pre-wrap; }
.cr-font-serif { font-family: Georgia,serif; }
.cr-font-mono { font-family: ui-monospace,monospace; }
.cr-colour-blue { color: #2442b0; }
.cr-colour-green { color: #18624b; }
.cr-colour-plum { color: #764094; }
.cr-colour-teal { color: #07647a; }
.cr-colour-rust { color: #8e402a; }
.cr-line-actions, .cr-picker, .cr-compose-tools, .cr-staff { display: flex; flex-wrap: wrap; gap: .35rem; align-items: end; }
.cr-line-button { border: 0; border-radius: 6px; padding: .22rem .4rem; background: #f0f4ff; color: #274078; font-size: .74rem; cursor: pointer; }
.cr-line-button[aria-pressed="true"], .cr-poll button[aria-pressed="true"] { background: #dce7ff; box-shadow: 0 0 0 1px #849be6; }
.cr-poll { display: grid; gap: .4rem; max-width: 335px; margin: .4rem 0; padding: .7rem; border-radius: 8px; background: #f0f4ff; }
.cr-gif { display: block; width: 128px; max-width: 100%; height: auto; border-radius: 7px; }
.cr-picker .cr-gif { width: 72px; }
.cr-compose { background: #f5f8ff; padding: .65rem; border-top: 1px solid var(--cr-line); border-radius: 0 0 12px 12px; }
.cr-compose-tools { margin-bottom: .45rem; }
.cr-compose-tools select { width: auto; }
.cr-compose-bar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .5rem; align-items: end; }
.cr-compose-bar textarea { resize: vertical; }
.cr-picker { padding: .4rem 0; }
[data-cr-send-status] { margin: .38rem 0 0; font-size: .82rem; }
[data-cr-send-status]:empty { display: none; }
.cr-people { align-self: start; padding: .65rem; }
.cr-people h3 { display: flex; justify-content: space-between; gap: .5rem; margin: 0 0 .45rem; font-size: .9rem; }
.cr-people h3 span { font-weight: 500; }
[data-cr-members] { max-height: 340px; overflow: auto; }
.cr-person { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .32rem .16rem; font-size: .82rem; }
.cr-person a { min-width: 0; overflow-wrap: anywhere; }
.cr-online-dot { width: 7px; height: 7px; border-radius: 50%; background: #15834d; flex: 0 0 7px; }
.cr-person small { border-radius: 5px; padding: .08rem .28rem; background: #e8eeff; text-transform: capitalize; }
.cr-person .cr-friend { background: #e1f5e9; color: #18543b; }
.cr-person-menu { flex: 1 0 auto; text-align: end; }
.cr-person-menu summary { cursor: pointer; }
.cr-person-menu div { display: flex; flex-wrap: wrap; justify-content: end; gap: .32rem; }
.cr-staff { margin-top: .65rem; border-top: 1px solid var(--cr-line); padding-top: .65rem; }
.cr-people :is(video,audio) { max-width: 100%; display: block; margin-bottom: .3rem; }
.cr-people video[hidden] { display: none; }
.cr-dialog {
  width: min(440px,calc(100% - 2rem));
  max-height: 88vh;
  border: 1px solid #d9e3f5;
  border-radius: 14px;
  padding: 1.05rem;
  color: #13274d;
  background: #fff;
  box-shadow: 0 12px 36px #101d4650;
}
.cr-dialog::backdrop { background: #101d4672; }
.cr-dialog form { display: grid; gap: .65rem; }
.cr-dialog h2 { margin-top: 0; }
.cr-dialog-actions { display: flex; justify-content: end; gap: .5rem; }
.cr-dialog [role="status"]:empty { display: none; }
@container cr (max-width: 620px) {
  .cr-room-grid { grid-template-columns: minmax(0,1fr); }
  .cr-room-header { grid-template-columns: auto minmax(0,1fr); }
  .cr-room-header [data-cr-favourite] { justify-self: start; }
  [data-cr-members] { max-height: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  .cr-gif { animation: none; }
}
.cr-admin { display: grid; gap: .9rem; }
.cr-admin .panel { margin: 0; }
.cr-admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.cr-admin-room { margin-top: .6rem; padding: .55rem .65rem; border-top: 1px solid #d9e3f5; }
.cr-admin :is(summary, button) { cursor: pointer; }
.cr-admin blockquote { overflow-wrap: anywhere; white-space: pre-wrap; }
