:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #e6eceb;
  background: #161c20;
  color-scheme: dark;
  font-synthesis: none;
  --muted: #9daead;
  --accent: #a7ddc8;
  --line: #2c383e;
  --surface: #1c252a;
}
select {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #415258;
  border-radius: 9px;
  background: #141e22;
  color: inherit;
  font: inherit;
}
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
main {
  display: flow-root;
  min-height: 100vh;
  min-height: 100dvh;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #2b383d;
  color: #e6eceb;
  padding: 10px 14px;
  line-height: 1.3;
  transition: background 0.15s;
}
button:hover:not(:disabled) {
  background: #37484e;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input,
textarea {
  min-width: 0;
  max-width: 100%;
  border: 1px solid #415258;
  border-radius: 9px;
  background: #141e22;
  color: inherit;
  padding: 12px;
  font-size: 16px;
}
label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 650;
}
p {
  line-height: 1.65;
  color: var(--muted);
}
a {
  color: #abdccc;
  text-underline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
.primary {
  background: var(--accent);
  color: #112d25;
  font-weight: 750;
}
.primary:hover:not(:disabled) {
  background: #c2ebdc;
}
.subtle-button {
  background: #29373c;
  border-color: #3a4a50;
}
.text-button {
  background: transparent;
  color: var(--accent);
}
.danger-subtle {
  color: #ffc4bf;
  background: #3a2c30;
}
.danger-subtle:hover:not(:disabled) {
  background: #50353a;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  padding: 0;
  background: transparent;
  font-size: 24px;
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 750;
  color: var(--accent);
}
.field-help {
  font-size: 12px;
  line-height: 1.55;
  margin: 8px 0 18px;
}
.field-help:empty {
  display: none;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
#notice {
  position: fixed;
  z-index: 50;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 28px));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 18px;
  border: 1px solid #597069;
  background: #293f39;
  box-shadow: 0 10px 40px #0006;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#notice[data-tone="error"] {
  background: #412f32;
  border-color: #80545b;
}
#noticeText {
  flex: 1;
}
#notice .icon-button {
  width: 32px;
  height: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.brand small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  margin-top: 5px;
}
.brand-mark {
  height: 38px;
  width: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #17382d;
  border-radius: 12px 12px 12px 3px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -4px;
  padding-right: 4px;
}
.brand-mark span {
  opacity: 0.65;
}
.auth-card {
  width: min(448px, calc(100% - 32px));
  margin: clamp(30px, 12vh, 120px) auto 30px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 20px 80px #0002;
}
.auth-card .brand {
  margin-bottom: 46px;
}
.auth-card h1 {
  font-size: 32px;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 12px 0 18px;
}
.auth-card #authText {
  font-size: 14px;
  margin-bottom: 28px;
}
.auth-card #primary,
.auth-card .text-button {
  width: 100%;
  min-height: 46px;
}
.auth-card input {
  width: 100%;
}
.auth-card .text-button {
  margin-top: 10px;
}
.auth-help {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 26px;
  font-size: 13px;
  color: var(--muted);
}
summary {
  cursor: pointer;
  line-height: 1.6;
}
.auth-help p {
  margin: 12px 0;
}
.auth-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 11px;
  color: var(--muted);
}
#chat {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  overflow: hidden;
}
#sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: #171f23;
  border-right: 1px solid var(--line);
  padding: 18px 14px 12px;
}
#sidebar .brand {
  padding: 0 4px 36px;
}
#sidebar nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: #91a29f;
  margin: 12px 10px 10px;
}
.voice-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  margin-bottom: 4px;
}
.voice-title .icon-button {
  width: 28px;
  height: 28px;
  font-size: 21px;
}
.channel {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  color: #bdc9c7;
  padding: 11px 12px;
  margin: 3px 0;
  min-height: 44px;
  font-size: 14px;
}
.channel span:not(.channel-symbol):not(.channel-hint) {
  overflow-wrap: anywhere;
  min-width: 0;
}
.channel:hover:not(:disabled) {
  background: #233138;
}
.channel.active {
  background: #294037;
  color: #ceebdf;
}
.channel-symbol {
  font-size: 21px;
  font-weight: 400;
  color: #8da49d;
  width: 20px;
  flex-shrink: 0;
  text-align: center;
}
.channel-hint {
  margin-left: auto;
  font-size: 10px;
  color: #a6c7b8;
}
.channel.voice.active .channel-hint {
  color: var(--accent);
}
.sidebar-hint {
  font-size: 11px;
  line-height: 1.65;
  margin: 12px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 12px;
}
.server-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #849b94;
  margin: 0 8px 10px;
}
.account {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #212d32;
  padding: 11px;
  text-align: left;
}
.account > span:nth-child(2) {
  min-width: 0;
}
.account strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.account small {
  font-size: 10px;
  color: var(--muted);
}
.account-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 24px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #344c48;
  color: #c3e1d5;
  font-size: 12px;
  font-weight: 700;
}
#content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #1c252a;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.header-hash {
  font-size: 29px;
  color: #6e8880;
  font-weight: 300;
}
.channel-heading {
  margin-right: auto;
  min-width: 0;
}
.channel-heading h1 {
  font-size: 16px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.channel-heading > span {
  font-size: 11px;
  color: var(--muted);
}
#connection {
  font-size: 11px;
  color: #9ab6a9;
  white-space: nowrap;
}
#connection::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  background: currentColor;
  border-radius: 50%;
}
#connection[data-state="offline"] {
  color: #e4b995;
}
#connection[data-state="connecting"] {
  color: var(--muted);
}
.chat-header > button:not(.icon-button) {
  font-size: 12px;
  min-height: 38px;
}
#history {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
#historyStatus {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
#reloadChat {
  align-self: center;
  margin: 8px;
}
#messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px 28px 22px;
  scrollbar-width: thin;
  scrollbar-color: #455650 transparent;
}
#emptyMessages {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 600px;
  margin: auto;
  padding: 36px 0;
}
.empty-symbol {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: #2d423c;
  color: var(--accent);
  font-size: 36px;
  font-weight: 300;
  margin-bottom: 22px;
}
#emptyMessages h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}
#emptyMessages p {
  font-size: 14px;
}
#emptyMessages button {
  font-size: 12px;
}
.day-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 10px;
  color: #98aca4;
  margin: 16px 0;
  font-weight: 600;
}
.day-divider::before,
.day-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.msg {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 12px;
  padding: 8px 0 4px;
  line-height: 1.6;
}
.msg + .msg {
  margin-top: 8px;
}
.msg.grouped {
  margin-top: 0;
  padding-top: 3px;
}
.msg .avatar {
  margin-top: 3px;
}
.msg.own .avatar {
  background: #354253;
  color: #cbdaee;
}
.meta {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.meta b {
  font-size: 13px;
  overflow-wrap: anywhere;
  font-weight: 650;
}
.meta .you {
  font-size: 10px;
  color: #a7bbb3;
}
.msg time {
  color: #8c9e98;
  font-size: 10px;
}
.messageBody {
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 80ch;
  color: #d0dbd7;
}
.grouped .message-content {
  grid-column: 2;
}
.grouped-time {
  grid-column: 1;
  grid-row: 1;
  text-align: center;
  align-self: start;
  padding-top: 3px;
  opacity: 0;
}
.grouped:hover .grouped-time,
.grouped:focus-within .grouped-time {
  opacity: 1;
}
.jump-latest {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: #b5dfca;
  color: #16332b;
  border: 1px solid #bed9cb;
  border-radius: 30px;
  box-shadow: 0 5px 18px #0004;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
#composer {
  flex-shrink: 0;
  padding: 14px 28px max(14px, env(safe-area-inset-bottom));
}
.compose-box {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  border: 1px solid #43574f;
  border-radius: 13px;
  background: #26332f;
  padding: 7px;
}
.compose-box:focus-within {
  border-color: #90b6a4;
  box-shadow: 0 0 0 2px #8cbea113;
}
#message {
  display: block;
  flex: 1;
  width: 0;
  border: 0;
  border-radius: 6px;
  resize: none;
  min-height: 40px;
  max-height: 160px;
  background: transparent;
  font-size: 14px;
  line-height: 22px;
  padding: 9px 10px;
  color: #ebf1ed;
  outline: none;
}
#message::placeholder {
  color: #95a89f;
}
#send {
  min-height: 40px;
  min-width: 84px;
  font-size: 12px;
  flex-shrink: 0;
}
#send span {
  margin-left: 7px;
}
.composer-meta {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 22px;
  padding: 8px 4px 0;
  font-size: 10px;
  color: #8c9e98;
}
.composer-meta #sendStatus {
  margin-left: auto;
  color: var(--accent);
}
#sendStatus[data-tone="error"] {
  color: #edb0a6;
}
#messageCount {
  font-variant-numeric: tabular-nums;
}
#voiceStatus {
  flex-shrink: 0;
  margin: 0 28px;
  border: 1px solid #426859;
  border-radius: 12px;
  background: #243b31;
  padding: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.voice-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 120px;
}
.voice-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px #acd8bd12;
}
.voice-summary strong {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
  color: #c2e7d4;
}
.voice-summary span:not(.voice-indicator) {
  display: block;
  font-size: 10px;
  color: #b2c8ba;
  margin-top: 3px;
}
.voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.voice-actions button {
  font-size: 11px;
  min-height: 36px;
}
.voice-actions [aria-pressed="true"] {
  color: #ffccc4;
  background: #553c3a;
}
#participants {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 0;
}
#participants li {
  font-size: 10px;
  color: #d1e5d8;
  background: #324b3e;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  overflow-wrap: anywhere;
  max-width: 100%;
}
#participants li.speaking {
  border-color: #b0dec3;
}
#enableAudio {
  font-size: 12px;
  width: 100%;
}
.screen-hint {
  width: 100%;
  margin: 0;
  color: #b2c8ba;
  font-size: 11px;
  line-height: 1.5;
}
#shareScreen[aria-pressed="true"] {
  background: #b5dfca;
  color: #16332b;
}
#screenShares {
  flex-shrink: 0;
  padding: 12px 28px;
  border-bottom: 1px solid #36483f;
  background: #182422;
  max-height: 38dvh;
  overflow: auto;
}
.screen-heading,
.screen-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.screen-heading {
  margin-bottom: 10px;
  font-size: 12px;
}
.screen-heading span {
  color: #9aafa6;
  font-size: 11px;
}
#screenGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}
.screen-card {
  min-width: 0;
  border: 1px solid #426859;
  border-radius: 10px;
  overflow: hidden;
  background: #101916;
}
.screen-toolbar {
  padding: 8px 10px;
}
.screen-toolbar strong {
  margin-right: auto;
  font-size: 12px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.screen-toolbar button {
  min-height: 36px;
  font-size: 11px;
}
.screen-card video {
  display: block;
  width: 100%;
  max-height: 24dvh;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #090e0c;
}
.screen-play {
  margin: 8px;
}
.screen-card.expanded {
  position: fixed;
  inset: max(12px, env(safe-area-inset-top)) 12px
    max(12px, env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 100vmax #091311e8;
}
.screen-card.expanded video {
  flex: 1;
  min-height: 0;
  max-height: none;
}
@media (max-width: 700px) {
  #screenShares {
    padding: 10px 12px;
    max-height: 38dvh;
  }
  .screen-heading span {
    display: none;
  }
  .screen-toolbar button {
    min-height: 40px;
  }
  #screenShares video {
    max-height: 24dvh;
  }
  #screenShares .expanded video {
    max-height: none;
  }
}
dialog {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 28px;
  border: 1px solid #45584f;
  border-radius: 18px;
  background: #1f2b2e;
  color: inherit;
  box-shadow: 0 24px 100px #0007;
  overflow: auto;
}
dialog::backdrop {
  background: #091311b8;
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.dialog-heading .icon-button {
  margin-right: -10px;
  margin-top: -10px;
}
dialog h2 {
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}
dialog p {
  font-size: 13px;
}
dialog input {
  width: 100%;
}
dialog .primary {
  min-height: 44px;
}
#inviteUrl {
  font-size: 13px;
}
.dialog-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.dialog-actions button {
  flex: 1;
}
.info-panel {
  padding: 16px;
  background: #25373a;
  border: 1px solid #3c514a;
  border-radius: 12px;
  margin: 22px 0;
}
.info-panel h3 {
  font-size: 14px;
  margin: 0 0 8px;
}
.info-panel p {
  font-size: 12px;
}
.info-panel .field-help {
  margin-bottom: 0;
}
.mobile-only {
  display: none;
}
@media (max-width: 900px) and (min-width: 701px) {
  #chat {
    grid-template-columns: 218px minmax(0, 1fr);
  }
  #sidebar {
    padding-inline: 12px;
  }
  .chat-header {
    padding-inline: 20px;
    gap: 10px;
  }
  .channel-heading > span {
    display: none;
  }
  #messages {
    padding-inline: 20px;
  }
  #composer {
    padding-inline: 20px;
  }
  #voiceStatus {
    margin-inline: 20px;
  }
  #connection {
    font-size: 10px;
  }
}
@media (max-width: 700px) {
  .mobile-only {
    display: grid;
  }
  #chat {
    display: block;
  }
  #content {
    height: 100%;
    padding-top: env(safe-area-inset-top);
  }
  #sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 31;
    width: min(300px, 85vw);
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateX(-100%);
    visibility: hidden;
    transition:
      transform 0.18s,
      visibility 0.18s;
  }
  #sidebar.open {
    transform: translateX(0);
    visibility: visible;
  }
  #sidebar .brand {
    gap: 10px;
  }
  #closeSidebar {
    margin-left: auto;
    width: 28px;
  }
  #sidebarBackdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    border: 0;
    border-radius: 0;
    background: #07100f99;
    width: 100%;
    height: 100%;
  }
  .chat-header {
    min-height: 70px;
    padding: 10px 14px 10px 8px;
    gap: 8px;
  }
  .header-hash {
    display: none;
  }
  .channel-heading h1 {
    font-size: 16px;
    margin: 0;
  }
  .channel-heading > span {
    display: none;
  }
  #connection {
    font-size: 0;
    width: 10px;
    min-width: 10px;
    margin-right: 6px;
  }
  #connection::before {
    width: 7px;
    height: 7px;
    margin: 0;
  }
  .chat-header > button:not(.icon-button) {
    font-size: 11px;
    min-height: 40px;
    padding: 8px 11px;
  }
  #messages {
    padding: 4px 16px 18px;
  }
  .msg {
    column-gap: 10px;
    grid-template-columns: 32px minmax(0, 1fr);
  }
  .msg .avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 11px;
  }
  .messageBody {
    font-size: 14px;
  }
  .day-divider {
    margin: 20px 0;
    gap: 12px;
  }
  .meta {
    gap: 7px;
  }
  .meta b {
    font-size: 13px;
  }
  #emptyMessages {
    padding: 24px 8px;
  }
  #emptyMessages h2 {
    font-size: 26px;
  }
  #emptyMessages p {
    font-size: 13px;
  }
  #composer {
    padding: 10px 12px max(8px, env(safe-area-inset-bottom));
  }
  .compose-box {
    gap: 4px;
    border-radius: 12px;
    padding: 5px;
  }
  #message {
    font-size: 16px;
    padding: 9px 8px;
    max-height: 120px;
  }
  #send {
    min-width: 64px;
    font-size: 12px;
    padding: 10px;
  }
  #send span {
    display: none;
  }
  .composer-meta {
    font-size: 10px;
    min-height: 20px;
    padding-top: 6px;
  }
  #composerHint {
    font-size: 10px;
  }
  #voiceStatus {
    margin: 0 12px;
    padding: 10px;
  }
  .voice-actions button {
    min-height: 40px;
  }
  #participants {
    max-height: 74px;
    overflow: auto;
  }
  #notice {
    top: max(12px, env(safe-area-inset-top));
    font-size: 13px;
  }
  dialog {
    padding: 22px;
  }
  .auth-card {
    margin-top: 36px;
    padding: 26px;
  }
  .auth-card .brand {
    margin-bottom: 36px;
  }
  .auth-card h1 {
    font-size: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
