/* ==========================================================================
   OpenSlack — a free, 100% frontend Slack replica
   ========================================================================== */

:root {
  --sb-bg: #1a1d21;
  --sb-bg2: #1f2327;
  --sb-text: #d1d2d3;
  --sb-dim: #969aa0;
  --sb-hover: rgba(255, 255, 255, 0.08);
  --sb-active: rgba(255, 255, 255, 0.16);
  --accent: #1264a3;
  --accent-dark: #0b4c8c;
  --border: #e0e0e0;
  --text: #1d1c1d;
  --text-dim: #616061;
  --msg-hover: #f8f8f8;
  --chip-bg: #f8f8f8;
  --chip-border: #e8e8e8;
  --own-chip-bg: #d8ecfa;
  --own-chip-border: #1264a3;
  --danger: #d92f2f;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  font-size: 15px;
  line-height: 1.46668;
  overflow: hidden;
  background: #fff;
}

button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea { font-family: inherit; font-size: 15px; color: var(--text); }
::placeholder { color: #9c9b9d; }

.hidden { display: none !important; }

/* ==========================================================================
   App layout
   ========================================================================== */
#app {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 100vh;
  height: 100vh;
  width: 100%;
}
#app.thread-open { grid-template-columns: 260px 1fr 340px; }

#sidebar {
  background: var(--sb-bg);
  color: var(--sb-text);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---------- workspace header ---------- */
#ws-header {
  position: relative;
  background: var(--sb-bg2);
  border-bottom: 1px solid #2b2f33;
  padding: 0 12px;
  height: 49px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
#ws-name-btn {
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  width: 100%;
  text-align: left;
}
#ws-name-btn:hover { background: var(--sb-hover); }
#ws-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ws-caret { font-size: 12px; color: var(--sb-dim); }

/* ---------- fake search ---------- */
.fake-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px;
  padding: 7px 10px;
  background: var(--sb-bg2);
  border: 1px solid #3a3f44;
  border-radius: 6px;
  color: var(--sb-dim);
  font-size: 14px;
  flex-shrink: 0;
  text-align: left;
}
.fake-search:hover { border-color: #565d63; color: var(--sb-text); }
.fake-search .fs-icon { font-size: 13px; }
.fake-search span { flex: 1; }
.fake-search kbd {
  background: rgba(255,255,255,0.08);
  border: 1px solid #3a3f44;
  border-radius: 3px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--sb-dim);
}

/* ---------- sidebar scroll area ---------- */
#sidebar-scroll { flex: 1; overflow-y: auto; padding-bottom: 8px; }

#sidebar-scroll::-webkit-scrollbar { width: 8px; }
#sidebar-scroll::-webkit-scrollbar-thumb { background: #3a3f44; border-radius: 4px; }

.section { margin-top: 4px; }
.section-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 16px 4px 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--sb-dim);
  cursor: pointer;
  user-select: none;
}
.section-header:hover { color: var(--sb-text); }
.section-header .chev { font-size: 10px; transition: transform 0.1s; }
.section.collapsed .chev { transform: rotate(-90deg); }
.section.collapsed .section-list { display: none; }
.section-add {
  margin-left: auto;
  font-size: 16px;
  color: var(--sb-dim);
  border-radius: 4px;
  width: 20px; height: 20px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.section-add:hover { background: var(--sb-hover); color: #fff; }

.section-list { padding: 0 8px; }

/* ---------- sidebar items ---------- */
.sb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--sb-text);
  font-size: 15px;
  text-align: left;
  margin-bottom: 1px;
}
.sb-item:hover { background: var(--sb-hover); }
.sb-item.active { background: var(--sb-active); color: #fff; font-weight: 700; }
.sb-item .hash { color: var(--sb-dim); font-weight: 400; }
.sb-item.active .hash { color: #fff; }
.sb-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-item.unread { font-weight: 700; color: #fff; }
.sb-item.unread .hash { color: var(--sb-text); }

.presence-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #565d63;
  flex-shrink: 0;
}
.presence-dot.on { background: #2bac76; }

.badge {
  background: #d92f2f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sb-item:not(.unread) .badge { display: none; }

/* ---------- sidebar footer ---------- */
#sidebar-footer {
  border-top: 1px solid #2b2f33;
  padding: 8px;
  flex-shrink: 0;
}
#online-note { color: var(--sb-dim); font-size: 11px; padding: 0 6px 6px; }
#me-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px;
  border-radius: 6px;
  text-align: left;
}
#me-chip:hover { background: var(--sb-hover); }
.me-text { display: flex; flex-direction: column; min-width: 0; }
#me-name { font-weight: 700; color: #fff; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#me-status { color: var(--sb-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- avatars ---------- */
.avatar {
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  user-select: none;
}
.avatar .em { font-size: 16px; }
.avatar .initials { color: #fff; font-size: 12px; }

/* ==========================================================================
   Main column
   ========================================================================== */
#main { display: flex; flex-direction: column; min-width: 0; background: #fff; }

#topbar {
  height: 49px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  background: #fff;
}
#channel-head { flex: 1; min-width: 0; }
#chan-name { font-size: 18px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 6px; }
#chan-name .hash { color: var(--text-dim); font-weight: 400; }
#chan-sub {
  font-size: 13px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#chan-sub.typing { color: var(--accent); }
#topbar-right { display: flex; gap: 6px; align-items: center; }
#topbar-right button {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 13px;
  border: 1px solid transparent;
}
#topbar-right button:hover { background: #f0f0f0; color: var(--text); }
#top-search { border: 1px solid var(--border) !important; background: #fff; min-width: 180px; text-align: left; }
#top-search:hover { border-color: var(--accent) !important; color: var(--text) !important; }
#top-help { font-weight: 700; }

/* ---------- messages ---------- */
#messages-wrap { flex: 1; overflow-y: auto; position: relative; }
#messages-wrap::-webkit-scrollbar { width: 8px; }
#messages-wrap::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 4px; }
#messages { padding: 16px 20px 24px; max-width: 820px; }

.date-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 12px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
}
.date-sep::before, .date-sep::after { content: ""; flex: 1; border-top: 1px solid #e8e8e8; }

.msg { position: relative; padding: 6px 0 6px 12px; border-radius: 6px; }
.msg:hover { background: var(--msg-hover); }
.msg.flash { animation: flash 2s ease-out; }
@keyframes flash { 0% { background: #fde7a9; } 100% { background: transparent; } }

.msg-row { display: flex; gap: 8px; }
.msg-avatar { margin-top: 2px; }
.msg-body { min-width: 0; flex: 1; }
.msg-meta { display: flex; align-items: baseline; gap: 8px; }
.msg-name { font-weight: 800; color: var(--text); }
.msg-time { font-size: 12px; color: var(--text-dim); }
.msg-text { word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg-text.deleted { font-style: italic; color: var(--text-dim); }
.msg-text .edited { font-size: 12px; color: var(--text-dim); font-style: italic; margin-left: 6px; }
.msg.grouped { padding-top: 1px; padding-bottom: 1px; }
.msg.grouped .msg-avatar, .msg.grouped .msg-meta { display: none; }

/* hover action bar */
.msg-hover {
  position: absolute;
  top: -13px;
  right: 16px;
  display: flex;
  background: #fff;
  border: 1px solid var(--chip-border);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}
.msg:hover .msg-hover { opacity: 1; pointer-events: auto; }
.hb {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--text-dim);
  border-right: 1px solid var(--chip-border);
}
.hb:last-child { border-right: none; }
.hb:hover { background: #f0f0f0; color: var(--text); }
.hb:first-child:hover { border-radius: 6px 0 0 6px; }
.hb:last-child:hover { border-radius: 0 6px 6px 0; }

/* reactions */
.msg-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip {
  display: flex; align-items: center; gap: 4px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
.chip:hover { border-color: #cfcfcf; }
.chip.own { background: var(--own-chip-bg); border-color: var(--own-chip-border); }
.chip .cnt { color: var(--text-dim); font-size: 12px; }

/* thread footer */
.msg-thread {
  margin-top: 6px;
  display: flex; align-items: center; gap: 8px;
  color: var(--accent);
  font-size: 13px;
  padding: 2px 0;
  border-radius: 4px;
}
.msg-thread:hover { text-decoration: underline; }
.msg-thread .tl { display: flex; align-items: center; gap: 4px; font-weight: 700; }
.msg-thread .last { color: var(--text-dim); font-weight: 400; }

/* inline edit */
.edit-box { width: 100%; padding: 8px; border: 1px solid var(--accent); border-radius: 6px; resize: none; }
.edit-hint { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* ---------- composer ---------- */
#composer-wrap { padding: 0 20px 20px; max-width: 860px; width: 100%; flex-shrink: 0; }
#composer, .composer {
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.1s;
}
#composer:focus-within, .composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.c-left, .c-right { display: flex; align-items: center; padding: 6px 4px; }
.c-btn, .c-send {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  color: var(--text-dim);
}
.c-btn:hover { background: #f0f0f0; }
.c-right { padding-left: 4px; }
#c-send, .c-send {
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-size: 15px;
}
#c-send:hover, .c-send:hover { background: var(--accent-dark); }
#c-input, #t-input {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  padding: 8px 4px;
  max-height: 200px;
  background: transparent;
  line-height: 1.4;
}
.composer.mini { border-radius: 6px; }

/* ==========================================================================
   Thread pane
   ========================================================================== */
#thread-pane {
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: #fff;
  min-width: 0;
}
#thread-header {
  height: 49px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}
#thread-header h3 { font-size: 18px; font-weight: 800; }
#thread-chan { font-size: 13px; color: var(--text-dim); }
#thread-close { color: var(--text-dim); font-size: 16px; padding: 4px 8px; border-radius: 6px; }
#thread-close:hover { background: #f0f0f0; }

#thread-parent { padding: 16px 16px 0; }
#thread-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px;
  color: var(--text-dim); font-size: 13px; font-weight: 700;
}
#thread-divider::after { content: ""; flex: 1; border-top: 1px solid #e8e8e8; }
#thread-replies { flex: 1; overflow-y: auto; padding: 0 16px 16px; }
#thread-replies::-webkit-scrollbar { width: 8px; }
#thread-replies::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 4px; }
#thread-replies .msg { padding-left: 0; }
#thread-composer-wrap { padding: 0 16px 16px; flex-shrink: 0; }

/* ==========================================================================
   Overlays / modals
   ========================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 20px 20px;
  z-index: 100;
  overflow-y: auto;
}
.modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  animation: pop 0.12s ease-out;
}
@keyframes pop { from { transform: scale(0.97); opacity: 0.6; } to { transform: scale(1); opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 0;
}
.modal-head h3 { font-size: 22px; font-weight: 800; }
.modal-close { color: var(--text-dim); font-size: 18px; padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: #f0f0f0; }
.modal-body { padding: 12px 24px 24px; }
.modal-body p.hint { color: var(--text-dim); font-size: 13px; margin-bottom: 12px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field input[type="text"], .field input[type="password"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.field .sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
}
.btn:hover { background: var(--accent-dark); }
.btn.ghost { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.btn.ghost:hover { background: #f3f8fc; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #b42a2a; }
.btn-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

.code-box {
  display: flex; align-items: center; gap: 8px;
  background: #f6f6f6;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.code-box button { margin-left: auto; font-size: 12px; color: var(--accent); font-weight: 700; }

/* color swatches */
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 2px solid transparent;
}
.swatch:hover { border-color: #999; }
.swatch.sel { border-color: var(--text); box-shadow: inset 0 0 0 2px #fff; }
.avatar-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar-opt { font-size: 20px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: #f6f6f6; }
.avatar-opt:hover { background: #e8e8e8; }
.avatar-opt.sel { outline: 2px solid var(--accent); }

/* member list (for DMs) */
.member-list { max-height: 300px; overflow-y: auto; }
.member-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  text-align: left;
}
.member-row:hover { background: var(--msg-hover); }
.member-row .name { font-weight: 700; }
.member-row .status { color: var(--text-dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* welcome */
.welcome-logo { font-size: 44px; text-align: center; margin-bottom: 8px; }
.welcome-title { text-align: center; font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.welcome-sub { text-align: center; color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }
.tabs { display: flex; gap: 4px; background: #f0f0f0; border-radius: 8px; padding: 4px; margin-bottom: 16px; }
.tab {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-weight: 700;
  color: var(--text-dim);
}
.tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.banner { background: #fdf3dc; border: 1px solid #eed9a8; color: #5f4a1e; border-radius: 6px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }
.banner a { color: var(--accent); }

/* ==========================================================================
   Command palette
   ========================================================================== */
#palette-root { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.35); pointer-events: auto; }
.palette { pointer-events: auto; }
.palette {
  position: relative;
  margin: 12vh auto 0;
  width: min(640px, calc(100vw - 32px));
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.3);
  overflow: hidden;
}
.palette input {
  width: 100%;
  border: none;
  outline: none;
  padding: 16px 20px;
  font-size: 18px;
  border-bottom: 1px solid var(--border);
}
.palette-results { max-height: 380px; overflow-y: auto; padding: 8px; }
.palette-sec { padding: 8px 12px 4px; font-size: 12px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; }
.pal-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: left;
}
.pal-item.sel { background: var(--accent); color: #fff; }
.pal-item .icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.pal-item .pl { min-width: 0; }
.pal-item .pl-main { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item .pl-sub { font-size: 12px; opacity: 0.75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item .pl-jump { margin-left: auto; font-size: 11px; opacity: 0.7; }

/* ==========================================================================
   Emoji picker
   ========================================================================== */
#picker-root { position: fixed; z-index: 300; }
.picker {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  width: 340px;
  display: flex;
  flex-direction: column;
  max-height: 380px;
}
.picker input {
  margin: 10px 10px 6px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  font-size: 14px;
}
.picker input:focus { border-color: var(--accent); }
.picker-scroll { overflow-y: auto; padding: 4px 10px 10px; }
.picker-scroll::-webkit-scrollbar { width: 8px; }
.picker-scroll::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 4px; }
.picker-sec { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; padding: 8px 2px 4px; }
.picker-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.picker-grid button {
  font-size: 20px;
  padding: 4px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.picker-grid button:hover { background: #f0f0f0; }
.picker-quick { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 10px 2px; border-bottom: 1px solid #f0f0f0; }
.picker-quick button { font-size: 18px; padding: 3px; border-radius: 6px; }
.picker-quick button:hover { background: #f0f0f0; }

/* ==========================================================================
   Dropdown menus
   ========================================================================== */
.menu {
  position: absolute;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  min-width: 220px;
  padding: 6px;
  z-index: 150;
}
.menu-item { padding: 8px 12px; border-radius: 6px; font-size: 14px; color: var(--text); cursor: pointer; }
.menu-item:hover { background: var(--accent); color: #fff; }
.menu-sep { border-top: 1px solid var(--border); margin: 6px 4px; }

/* more-actions menu attached to a message */
.more-menu {
  position: absolute;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  min-width: 160px;
  padding: 6px;
  z-index: 60;
}
.more-menu .menu-item { display: flex; align-items: center; gap: 8px; }
.more-menu .menu-item.danger:hover { background: var(--danger); }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1d1c1d;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 400;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  animation: toast-in 0.2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  #app.thread-open { grid-template-columns: 260px 1fr; }
  #thread-pane {
    position: fixed;
    right: 0; top: 0; bottom: 0;
    width: min(340px, 90vw);
    z-index: 90;
    box-shadow: -4px 0 24px rgba(0,0,0,0.2);
  }
  #top-search { display: none; }
}
@media (max-width: 640px) {
  #app, #app.thread-open { grid-template-columns: 1fr; }
  #sidebar { display: none; }
}
