/* Workspace module: chat-first layout, no permanent room sidebar. */
.chat-workspace {
  position: fixed;
  inset: var(--chat-top, 0px) 0 auto;
  height: var(--chat-height, 100dvh);
  display: flex;
  flex-direction: column;
  background: #0b1120;
  font-size: 16px;
  overflow: hidden;
}
.workspace-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 22px;
  min-height: 66px;
  border-bottom: 1px solid #34415b;
  background: #141d30;
}
.workspace-header .brand {
  font-size: 26px;
}
.room-picker {
  font-weight: 650;
  font-size: 17px;
  min-height: 44px;
  min-width: 180px;
  text-align: left;
  background: #263354;
  border-color: #4c608c;
}
.account-menu {
  margin-left: auto;
  font-size: 15px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 44px;
}
.chat-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  background: #10192a;
  border-bottom: 1px solid #2b3852;
}
.chat-toolbar button {
  font-size: 15px;
  min-height: 44px;
  padding: 8px 17px;
  background: #19253d;
  border-color: #344460;
  white-space: nowrap;
}
.chat-toolbar button:hover {
  background: #2c3959;
}
.chat-toolbar button span:not(:empty) {
  margin-left: 6px;
  color: #d8c5ff;
  font-weight: bold;
}
.room-banner {
  padding: 10px 23px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid #26364c;
}
.room-banner > div {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}
.room-banner strong {
  font-size: 16px;
  color: #d3c8ff;
  white-space: nowrap;
}
.room-banner #room-topic {
  font-size: 14px;
  color: #aab8d2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#connection {
  font-size: 12px;
  white-space: nowrap;
  color: #93cdbb;
}
.conversation-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 20px;
  overflow: auto;
  flex-shrink: 0;
  background: #0d1727;
  border-bottom: 1px solid #33405a;
  scrollbar-width: thin;
}
.conversation-tabs button {
  font-size: 15px;
  padding: 7px 15px;
  min-height: 42px;
  white-space: nowrap;
  background: #18243a;
  border-color: #34405a;
  border-radius: 6px;
}
.conversation-tabs .selected {
  background: #354469;
  border-color: #8198df;
  color: #fff;
}
.conversation-tabs .private-tab {
  color: #cbbaff;
}
.conversation-tabs .private-tab:before {
  content: "› ";
  color: #a897e6;
}
.chat-body {
  display: flex;
  flex: 1;
  min-height: 0;
}
.chat-workspace .conversation {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  background: #0b1321;
}
.conversation-context {
  padding: 8px 22px;
  font-size: 13px;
  color: #93a6c5;
  border-bottom: 1px solid #ffffff09;
}
.chat-workspace .messages {
  padding: 15px 23px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  font-size: 16px;
  scrollbar-width: thin;
  scrollbar-color: #435573 #0b1321;
}
.chat-start {
  font:
    14px/1.7 ui-monospace,
    Consolas,
    monospace;
  color: #899ab7;
  margin: 0;
}
.text-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 4px 0;
  line-height: 1.65;
  font-size: 16px;
}
.text-line-content {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.text-line .nick {
  display: inline;
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  min-height: 0;
  color: #a7bfff;
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
  text-align: left;
}
.text-line .nick:hover {
  text-decoration: underline;
}
.text-line .message-text {
  white-space: pre-wrap;
  color: #e0e6f5;
}
.text-line.system .message-text {
  color: #9faec9;
  font-style: italic;
}
.text-line.action .message-text {
  color: #c5b6ef;
  font-style: italic;
}
.text-line time {
  font:
    12px ui-monospace,
    Consolas,
    monospace;
  color: #7f92b2;
  margin-right: 9px;
}
.text-line .badge {
  margin-left: 6px;
}
.message-actions {
  background: transparent;
  border: 0;
  padding: 0 3px;
  color: #7d90b0;
  width: 32px;
  flex-shrink: 0;
  font-size: 19px;
  min-height: 28px;
}
.message-actions:hover {
  background: #22304b;
}
.participants {
  width: 260px;
  flex-shrink: 0;
  border-left: 1px solid #35415b;
  background: #111c2e;
  padding: 16px;
  overflow: auto;
}
.participants header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.participants header strong {
  font-size: 16px;
}
.participants header button {
  display: none;
  min-height: 44px;
  min-width: 44px;
  font-size: 23px;
}
.participants input {
  font-size: 16px;
  padding: 11px;
}
.participants > .small {
  font-size: 12px;
  line-height: 1.7;
  margin-top: 28px;
}
.text-person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #ffffff08;
  border-radius: 0;
  width: 100%;
  padding: 12px 3px;
  min-height: 48px;
  font-size: 17px;
  text-align: left;
}
.text-person .afk {
  color: #97a9c9;
  font-size: 14px;
}
.text-person .badge {
  font-size: 10px;
}
.chat-workspace .compose {
  padding: 12px 20px max(10px, env(safe-area-inset-bottom));
  background: #121e31;
  border-top: 1px solid #34425c;
  flex-shrink: 0;
}
.chat-workspace .compose-row {
  padding: 5px;
  gap: 7px;
  border: 1px solid #657aa2;
  border-radius: 8px;
  box-shadow: none;
  background: #0c1424;
  align-items: flex-end;
}
.chat-workspace .compose-row > button {
  min-width: 48px;
  min-height: 49px;
  padding: 8px;
}
.chat-workspace .compose-row > #emoji-button {
  font-size: 24px;
  border: 0;
  background: transparent;
}
.chat-workspace .compose textarea {
  font-size: 17px;
  line-height: 1.5;
  padding: 12px 7px;
  min-height: 49px;
  max-height: 140px;
  color: #edf1ff;
  border: 0;
  resize: none;
}
.chat-workspace .send-button {
  width: auto;
  min-width: 90px !important;
  font-size: 16px;
  border-radius: 6px;
  height: 49px;
}
.composer-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}
.composer-tools button {
  font-size: 12px;
  padding: 5px 3px;
  border: 0;
  background: transparent;
  color: #b8c7e4;
  min-height: 30px;
}
.composer-tools span {
  font-size: 11px;
  color: #91a2be;
  margin-left: auto;
}
.private-compose .compose-row {
  border-color: #a68aea;
}
.private-compose:before {
  content: "Privates Gespräch";
  font-size: 12px;
  color: #c5b1ff;
  display: block;
  margin-bottom: 7px;
}
.chat-workspace .suggestions {
  left: 20px;
  right: 20px;
  bottom: 100%;
  max-height: 260px;
}
.chat-workspace .suggestions button {
  padding: 13px;
  font-size: 15px;
  min-height: 47px;
  align-items: center;
}
.chat-workspace .suggestions button span {
  font-size: 13px;
  color: #b5c4df;
}
.chat-workspace .emoji-picker {
  bottom: 100%;
  left: 20px;
  right: auto;
}
.session-warning {
  padding: 12px 20px;
  background: #352d28;
  border-bottom: 1px solid #806643;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.session-warning button {
  flex-shrink: 0;
}
.jump-latest {
  position: absolute;
  bottom: 135px;
  left: 50%;
  transform: translateX(-50%);
  background: #374974;
  box-shadow: 0 8px 28px #0006;
  z-index: 3;
}
.large-chat-text .text-line {
  font-size: 20px;
}
.room-directory {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}
.room-directory-row {
  display: flex;
  gap: 8px;
}
.room-directory-row > button:first-child {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  text-align: left;
  padding: 16px;
  min-width: 0;
}
.room-directory-row strong {
  font-size: 18px;
}
.room-directory-row span {
  font-size: 14px;
  color: #b6c8ec;
}
.room-directory-row small {
  grid-column: 1/-1;
  white-space: normal;
  font-size: 13px;
}
.room-directory-row > button:last-child {
  width: 52px;
  font-size: 23px;
}
.room-directory-row .selected {
  border-color: #8d9fee;
  background: #2d3b60;
}
.thread-choice {
  display: block;
  width: 100%;
  text-align: left;
  min-height: 48px;
  margin: 8px 0;
  font-size: 17px;
}
.command-filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.command-filters button {
  font-size: 13px;
  min-height: 40px;
  padding: 8px 12px;
}
.command-filters .selected {
  background: #3d426a;
  border-color: #9a9bea;
}
.command-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.command-category {
  grid-column: 1/-1;
  font-size: 17px;
  margin: 20px 0 0;
  color: #c6b5f5;
  letter-spacing: 0;
}
.command-card {
  padding: 17px;
  border: 1px solid #3c4b68;
  background: #16223a;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.command-card code {
  font-size: 16px;
  color: #e0d8ff;
  overflow-wrap: anywhere;
}
.command-card p {
  font-size: 15px;
  margin: 0;
  line-height: 1.6;
  color: #c6d1e8;
}
.command-card small {
  font-size: 12px;
}
.command-card button {
  font-size: 14px;
  min-height: 40px;
  margin-top: auto;
}
.shortcut-row {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}
.shortcut-row button:first-child {
  flex: 1;
  text-align: left;
}
.chat-workspace ~ dialog {
  max-height: 94dvh;
}
.chat-workspace ~ dialog #modal-body > button {
  margin: 6px;
  min-height: 44px;
}
.chat-workspace ~ dialog #modal-body > form {
  margin-top: 18px;
}
#modal-body .command-directory p {
  white-space: normal;
}
@media (max-width: 1100px) {
  .participants {
    display: none;
  }
  .participants.open {
    display: block;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(340px, 92vw);
    z-index: 25;
    box-shadow: -30px 0 90px #000b;
  }
  .participants header button {
    display: block;
  }
  .chat-body {
    position: relative;
  }
  .chat-toolbar {
    gap: 7px;
  }
  .chat-toolbar button {
    flex: 1;
    padding: 9px 10px;
  }
  .chat-workspace .messages {
    font-size: 17px;
  }
  .text-line {
    font-size: 17px;
  }
  .room-banner #room-topic {
    font-size: 14px;
  }
  .chat-workspace ~ dialog input,
  .chat-workspace ~ dialog textarea,
  .chat-workspace ~ dialog select {
    font-size: 16px;
  }
}
@media (max-width: 600px) {
  .workspace-header {
    min-height: 60px;
    padding: 8px 12px;
    gap: 10px;
  }
  .workspace-header .brand {
    font-size: 22px;
  }
  .workspace-header .brand small {
    display: none;
  }
  .room-picker {
    font-size: 16px;
    min-width: 0;
    max-width: 48vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 9px 12px;
    flex: 1;
  }
  .account-menu {
    font-size: 14px;
    max-width: 95px;
    margin-left: 0;
    padding: 9px;
  }
  .chat-toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 6px 10px;
  }
  .chat-toolbar button {
    font-size: 14px;
    padding: 8px 5px;
    min-height: 43px;
  }
  .room-banner {
    padding: 8px 13px;
    gap: 8px;
  }
  .room-banner > div {
    display: block;
    overflow: hidden;
  }
  .room-banner strong {
    font-size: 14px;
    display: block;
  }
  .room-banner #room-topic {
    display: block;
    font-size: 12px;
    max-width: 75vw;
  }
  #connection {
    font-size: 10px;
    max-width: 95px;
    white-space: normal;
    text-align: right;
  }
  .conversation-tabs {
    padding: 6px 10px;
    gap: 5px;
    min-height: 51px;
  }
  .conversation-tabs button {
    min-height: 39px;
    font-size: 14px;
    padding: 7px 12px;
  }
  .conversation-context {
    padding: 6px 13px;
    font-size: 12px;
  }
  .chat-workspace .messages {
    padding: 10px 13px;
  }
  .text-line {
    font-size: 16px;
    padding: 4px 0;
    line-height: 1.6;
  }
  .text-line time {
    font-size: 10px;
    margin-right: 6px;
  }
  .message-actions {
    width: 25px;
    font-size: 19px;
  }
  .chat-start {
    font-size: 13px;
  }
  .chat-workspace .compose {
    padding: 8px 9px max(6px, env(safe-area-inset-bottom));
  }
  .chat-workspace .compose-row {
    gap: 2px;
    padding: 3px;
  }
  .chat-workspace .compose-row > button {
    min-width: 37px;
    min-height: 48px;
    padding: 6px;
  }
  .chat-workspace .compose-row > #emoji-button {
    font-size: 23px;
  }
  .chat-workspace .compose textarea {
    font-size: 17px;
    padding: 11px 5px;
    min-height: 48px;
  }
  .chat-workspace .send-button {
    min-width: 69px !important;
    font-size: 14px;
    height: 48px;
  }
  .composer-tools {
    gap: 8px;
    margin-top: 3px;
  }
  .composer-tools button {
    font-size: 11px;
    min-height: 31px;
  }
  .composer-tools span {
    display: none;
  }
  .composer-tools button:last-child {
    margin-left: auto;
  }
  .session-warning {
    padding: 9px 13px;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 7px;
  }
  .session-warning button {
    font-size: 13px;
  }
  .command-directory {
    grid-template-columns: 1fr;
  }
  .command-card {
    padding: 16px;
  }
  .command-filters {
    gap: 6px;
  }
  .command-filters button {
    min-height: 42px;
    font-size: 13px;
  }
  .room-directory-row strong {
    font-size: 16px;
  }
  .room-directory-row span {
    font-size: 12px;
  }
  .room-directory-row > button:first-child {
    padding: 12px;
    gap: 6px;
  }
  .chat-workspace .suggestions {
    left: 8px;
    right: 8px;
  }
  .chat-workspace .suggestions button {
    display: block;
    padding: 11px;
    font-size: 14px;
  }
  .chat-workspace .suggestions button span {
    display: block;
    font-size: 12px;
    margin-top: 3px;
  }
  .chat-workspace .emoji-picker {
    left: 8px;
  }
  .large-chat-text .text-line {
    font-size: 20px;
  }
  .jump-latest {
    font-size: 13px;
    bottom: 123px;
    white-space: nowrap;
  }
}
@media (max-height: 500px) and (pointer: coarse) {
  .chat-toolbar,
  .room-banner {
    display: none;
  }
  .workspace-header {
    min-height: 48px;
    padding-top: 3px;
    padding-bottom: 3px;
  }
  .conversation-context {
    display: none;
  }
  .conversation-tabs {
    min-height: 42px;
    padding-top: 3px;
    padding-bottom: 3px;
  }
  .composer-tools {
    display: none;
  }
}
