/* Dark is the base theme; theme.js sets data-theme on <html> before paint. */
:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #111e22;
  --surface: #192b2f;
  --surface-2: #23383c;
  --border: #385054;
  --text: #f2f3e9;
  --muted: #afc1bd;
  --accent: #a8dbc5;
  --accent-strong: #c5efdc;
  --danger: #ff8f8f;
  --success: #8fe0ae;
  --warning: #f2c14e;
  --shadow: 0 12px 36px rgb(0 0 0 / 0.14);
  --on-accent: #142f28;
  --mention-bg: #2e5047;
  --mention-text: #d3f4e4;
  --reaction-active-bg: #2e5047;
  --reaction-active-text: #d3f4e4;
  --broadcast-bg: #433e3b;
  --broadcast-text: #ffe0b2;
  --option-active-bg: #36564e;
  --canvas: #152428;
  --warm: #e4c59b;
  --display-font: Georgia, "Times New Roman", serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f1eee5;
  --surface: #fffdf7;
  --surface-2: #e9eee5;
  --border: #ccd5c9;
  --text: #213d38;
  --muted: #4f6259;
  --accent: #286454;
  --accent-strong: #1b5344;
  --danger: #c0392b;
  --success: #1c7c47;
  --warning: #8a5d00;
  --shadow: 0 12px 36px rgb(46 65 46 / 0.07);
  --on-accent: #ffffff;
  --mention-bg: #dbeade;
  --mention-text: #204f40;
  --reaction-active-bg: #dbeade;
  --reaction-active-text: #204f40;
  --broadcast-bg: #fff0d4;
  --broadcast-text: #7a4a00;
  --option-active-bg: #dbeade;
  --canvas: #f8f7f0;
  --warm: #795531;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

a { color: var(--accent-strong); }

button, a, input, textarea, select {
  -webkit-tap-highlight-color: transparent;
}

button, .secondary-button, input, textarea, select {
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

button:not(:disabled):active { transform: translateY(1px); }

input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.hidden {
  display: none !important;
}

.app-loading {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--muted);
}

/* A decoy field that people never see or reach; only form-filling bots fill it. */
.registration-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Attribution line at the end of each page. */
.powered-by {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.powered-by a {
  color: inherit;
}

.sidebar-footer .powered-by {
  margin-top: 0.25rem;
}

/* A labelled theme selector, compact enough for the sidebar footer. */
.theme-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.theme-select select {
  width: auto;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-rows: 1fr auto;
  gap: 2rem;
  padding: clamp(1.25rem, 5vw, 4rem);
  place-items: center;
  background: radial-gradient(ellipse at 10% 30%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 65%);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  width: min(100%, 72rem);
}

.welcome-eyebrow {
  margin: 0 0 1.5rem;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.welcome-title {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(2.7rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.welcome-copy {
  max-width: 31rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.welcome-art { display: block; width: min(100%, 24rem); margin-top: 2rem; }
.art-orbit { stroke: var(--border); stroke-dasharray: 3 8; }
.art-bubble-back { fill: var(--surface-2); stroke: var(--border); }
.art-bubble-front { fill: var(--accent); }
.art-lines { stroke: var(--muted); stroke-width: 5; stroke-linecap: round; }
.art-dots { fill: var(--on-accent); }
.art-spark { stroke: var(--warm); stroke-width: 2; stroke-linecap: round; }

.auth-card {
  width: min(100%, 30rem);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: 1.75rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.4rem);
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.tagline {
  margin: 0.4rem 0 1.75rem;
  color: var(--muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: 0.9rem;
  background: var(--bg);
  margin-bottom: 1.5rem;
}

.auth-tabs button,
.secondary-button,
.room-button,
.join-button {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-2);
  color: var(--text);
}

.auth-tabs button {
  padding: 0.7rem;
  border-color: transparent;
  background: transparent;
}

.auth-tabs button[aria-selected="true"] {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: 0 2px 5px rgb(0 0 0 / 0.06);
  color: var(--accent-strong);
}

.form-stack {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* A checkbox sits on the first line of its text; the label grid above would
   stack it on a line of its own. */
label:has(> input[type="checkbox"]) {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

input[type="checkbox"] {
  width: auto;
  flex: none;
  padding: 0;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--bg);
  color: var(--text);
  padding: 0.8rem 0.9rem;
}

input:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.primary-button {
  border: 0;
  border-radius: 0.75rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  padding: 0.85rem 1rem;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 60%, var(--bg));
}

.primary-button:hover:not(:disabled) { background: var(--accent-strong); }

.secondary-button:hover:not(:disabled), .join-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

a.secondary-button { display: inline-block; text-decoration: none; text-align: center; }

.secondary-button,
.join-button {
  padding: 0.7rem 0.9rem;
}

.error-text {
  min-height: 1.4rem;
  margin: 0;
  color: var(--danger);
}

/* The shell is exactly one viewport tall, so the message list scrolls inside
   it and the composer stays in view however long the conversation grows. */
.chat-shell {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  padding: 1rem;
  gap: 1rem;
}

.sidebar {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  background: transparent;
}

/* Keep each section at its natural size; the sidebar scrolls as a whole instead. */
.sidebar > * {
  flex-shrink: 0;
}

.sidebar-header,
.sidebar-footer {
  padding: 1rem;
}

.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.65rem;
  padding-bottom: 1.5rem;
}

.menu-toggle {
  display: none;
  position: relative;
  padding: 0.45rem 0.8rem;
}

/* Unread privacy notifications are behind the menu on narrow screens. */
.sidebar:has(#privacy-notification-badge:not(.hidden)) .menu-toggle::after {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.sidebar-header h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.sidebar-header > div { min-width: 0; }

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.connection-status::before {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--muted);
  content: "";
}

.connection-status[data-state="connected"]::before {
  background: var(--success);
}

.connection-status[data-state="error"]::before {
  background: var(--danger);
}

.rooms-heading {
  margin: 1rem 1rem 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.room-list {
  display: grid;
  gap: 0.35rem;
  padding: 0 0.65rem 1rem;
  overflow-y: auto;
}

.room-button {
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem 1rem;
  border-color: transparent;
  background: transparent;
  text-align: left;
  overflow-wrap: anywhere;
}

.room-button:hover { background: var(--surface); }

.room-button.active {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  background: color-mix(in srgb, var(--accent) 13%, var(--bg));
  box-shadow: inset 3px 0 var(--accent);
}

.room-button.active .room-name { color: var(--accent-strong); }
.room-button.active .room-meta { color: var(--text); }

.room-name {
  font-weight: 650;
}

.room-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.sidebar-footer {
  display: grid;
  gap: 0.3rem;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.sidebar-footer .secondary-button {
  padding: 0.5rem 0.65rem;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: left;
}

.sidebar-footer .secondary-button:hover { background: var(--surface-2); color: var(--text); }
.sidebar-footer .theme-select { padding: 0.4rem 0.65rem; font-size: 0.8rem; }
.sidebar-footer .theme-select select { padding: 0.45rem; max-width: 65%; }
.sidebar-footer .powered-by { margin-top: 0.8rem; text-align: left; padding-left: 0.65rem; }

.current-user {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.6rem;
  padding: 0.65rem;
  border-radius: 0.65rem;
  background: var(--surface);
  font-size: 0.85rem;
}

.chat-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background: var(--canvas);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.room-header h2,
.room-header p {
  margin: 0;
}

.room-header h2 {
  font-family: var(--display-font);
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: -0.035em;
}
.room-header > div { min-width: 0; overflow-wrap: anywhere; }

.room-header p {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state {
  display: grid;
  padding: 2rem;
  place-items: center;
  color: var(--muted);
  text-align: center;
  align-content: center;
  gap: 1.5rem;
  font-family: var(--display-font);
  font-size: 1.65rem;
}

.empty-state::before {
  content: "";
  width: 4rem;
  height: 3rem;
  margin: auto;
  border: 2px solid var(--accent);
  border-radius: 1.25rem 1.25rem 1.25rem 0.25rem;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  box-shadow: 0.75rem -0.75rem 0 var(--surface-2);
}

.message-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem clamp(1rem, 3vw, 3rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.message {
  position: relative;
  display: grid;
  gap: 0.35rem;
  width: 100%;
  max-width: 56rem;
  padding-left: 3.25rem;
  margin-inline: auto;
  min-height: 2.5rem;
  flex-shrink: 0;
}

.message-avatar {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 0.9rem 0.9rem 0.35rem 0.9rem;
  background: var(--surface-2);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
}
.message-avatar[data-tone="1"] { color: var(--warm); background: color-mix(in srgb, var(--warm) 10%, var(--surface)); }
.message-avatar[data-tone="2"] { color: var(--text); background: color-mix(in srgb, var(--accent) 15%, var(--surface)); }
.message-avatar[data-tone="3"] { color: var(--muted); border-radius: 50%; }

.message-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.message-author {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.message-time {
  color: var(--muted);
  font-size: 0.75rem;
}

.message-body {
  margin: 0;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.message.emote .message-body {
  color: var(--accent-strong);
  font-style: italic;
}

.message.deleted .message-body {
  color: var(--muted);
  font-style: italic;
}

.message-reply-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  padding: 0.25rem 0.4rem;
  border-radius: 0.4rem;
  text-decoration: none;
  text-underline-offset: 0.15rem;
}

.message-reply-button:hover,
.message-reply-button:focus-visible {
  color: inherit;
  background: var(--surface-2);
}

.reply-preview {
  display: flex;
  width: 100%;
  gap: 0.4rem;
  align-items: baseline;
  max-width: 52rem;
  margin: 0 0 0.15rem;
  padding: 0.3rem 0.6rem;
  border: 0;
  border-left: 3px solid var(--border);
  border-radius: 0.3rem;
  background: var(--surface-2);
  color: inherit;
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.reply-preview:hover {
  border-left-color: var(--accent-strong);
}

.reply-preview-author {
  font-weight: 700;
  flex-shrink: 0;
}

.reply-preview-excerpt {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-preview-unavailable {
  color: var(--muted);
  font-style: italic;
  cursor: default;
}

.mention {
  border-radius: 0.25rem;
  padding: 0 0.2rem;
  background: var(--mention-bg);
  color: var(--mention-text);
  font-weight: 600;
}

.reaction-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.3rem;
}

.reaction-button {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  min-height: 1.8rem;
  padding: 0.15rem 0.6rem;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.reaction-button:hover,
.reaction-button:focus-visible {
  border-color: var(--accent-strong);
}

.reaction-button-active {
  border-color: var(--accent);
  background: var(--reaction-active-bg);
  color: var(--reaction-active-text);
}

.reaction-button-count {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.reaction-button-active .reaction-button-count {
  color: inherit;
}

.reaction-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.reaction-add-button:hover,
.reaction-add-button:focus-visible {
  color: var(--text);
  border-color: var(--accent-strong);
}

.reaction-picker {
  display: flex;
  flex-basis: 100%;
  gap: 0.25rem;
  margin-top: 0.2rem;
}

.reaction-picker[hidden] {
  display: none;
}

.reaction-picker-option {
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.1rem 0.4rem;
  background: var(--surface-2);
  cursor: pointer;
  font-size: 0.95rem;
}

.reaction-picker-option:hover,
.reaction-picker-option:focus-visible {
  border-color: var(--accent-strong);
}

.mention-broadcast {
  background: var(--broadcast-bg);
  color: var(--broadcast-text);
}

.reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  padding: 0.4rem 0.7rem;
  border-radius: 0.4rem;
  background: color-mix(in srgb, var(--accent-strong) 12%, var(--surface));
  font-size: 0.85rem;
  min-width: 0;
}

.reply-banner span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-banner-cancel {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 0.15rem;
}

.reply-banner-cancel:hover,
.reply-banner-cancel:focus-visible {
  color: inherit;
}

.mention-autocomplete {
  position: fixed;
  z-index: 20;
  max-height: 14rem;
  margin: 0 0 0.3rem;
  padding: 0.3rem;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.mention-autocomplete-option {
  padding: 0.4rem 0.6rem;
  border-radius: 0.4rem;
  cursor: pointer;
}

.mention-autocomplete-option.active {
  background: var(--option-active-bg);
}

.composer-wrap {
  min-width: 0;
  padding: 0.75rem clamp(1rem, 3vw, 3rem) 1.25rem;
  background: var(--canvas);
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  max-width: 56rem;
  margin-inline: auto;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: 0 5px 20px rgb(0 0 0 / 0.05);
}

.composer:focus-within { border-color: var(--accent); }
.composer .primary-button { min-height: 3rem; margin-right: 0.2rem; }

.composer textarea {
  min-height: 3rem;
  max-height: 10rem;
  resize: vertical;
  border-color: transparent;
  background: transparent;
}

.composer-help {
  max-width: 56rem;
  margin: 0.65rem auto 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.composer-wrap > .reply-banner { max-width: 56rem; margin-inline: auto; }

.toast-region {
  position: fixed;
  z-index: 10;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: min(24rem, calc(100vw - 2rem));
  gap: 0.6rem;
}

.toast {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.toast.error {
  border-color: var(--danger);
}

@media (max-width: 48rem) {
  .auth-layout { grid-template-columns: minmax(0, 28rem); justify-content: center; gap: 2rem; }
  .auth-intro { text-align: center; }
  .welcome-eyebrow { margin-bottom: 0.75rem; }
  .welcome-title { font-size: 2.7rem; }
  .welcome-copy, .welcome-art { display: none; }

  .chat-shell {
    grid-template-columns: 11rem minmax(0, 1fr);
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .sidebar-header, .sidebar-footer { padding-inline: 0.5rem; }
  .room-header { padding: 1rem; }
  .sidebar-footer .theme-select { flex-wrap: wrap; }
  .sidebar-footer .theme-select select { max-width: 100%; }

  .room-meta,
  .current-user-label {
    display: none;
  }

  .sidebar-header h1 {
    font-size: 1.05rem;
  }
}

@media (max-width: 34rem) {
  .auth-shell { padding: 1.25rem; gap: 1rem; }
  .welcome-title { font-size: 2.2rem; }
  .auth-card { padding: 1.35rem; border-radius: 1.25rem; }
  .chat-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0;
    padding: 0;
  }

  .sidebar {
    max-height: 45dvh;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-header { padding: 0.65rem 1rem 0.25rem; align-items: center; }
  .sidebar-header h1 { font-size: 1.15rem; }
  .connection-status { margin-top: 0.1rem; font-size: 0.72rem; }
  .rooms-heading-row .rooms-heading { margin-block: 0.35rem; font-size: 0.68rem; }
  .room-list { padding: 0.35rem 0.65rem 0.65rem; }
  .room-button { padding: 0.55rem 0.85rem; font-size: 0.85rem; }
  .room-button.active { box-shadow: inset 0 -2px var(--accent); }
  .sidebar-footer { padding: 0.75rem 1rem; }
  .sidebar-footer .secondary-button { min-height: 2.75rem; }
  .message-list { padding: 1.25rem 0.85rem; }
  .message { padding-left: 2.65rem; }
  .message-avatar { width: 2rem; height: 2rem; border-radius: 0.7rem; font-size: 0.65rem; }
  .message-header { gap: 0.3rem 0.5rem; }
  .message-time { font-size: 0.68rem; }
  .composer-wrap { padding: 0.5rem 0.65rem max(0.75rem, env(safe-area-inset-bottom)); }
  .composer { padding: 0.4rem; gap: 0.35rem; }
  .composer .primary-button { padding-inline: 0.8rem; }
  .composer-help { font-size: 0.65rem; }

  .room-list {
    display: flex;
    overflow-x: auto;
  }

  .room-button {
    min-width: 8rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  /* The sidebar is full width again here, so there is room for the label. */
  .current-user-label {
    display: inline;
  }

  .sidebar:not(.menu-open) .sidebar-footer {
    display: none;
  }

  /* While the menu is open the sidebar may take the height its links need. */
  .sidebar.menu-open {
    max-height: 65dvh;
  }

  .chat-main {
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}
