:root {
  --bg-app: #f3f4f6;
  --bg-sidebar: #ececed;
  --bg-chat: #bacee0;
  --bg-header: rgba(255, 255, 255, 0.92);
  --bg-composer: #ffffff;
  --bg-bubble-mine: #fee500;
  --text-bubble-mine: #191919;
  --bg-bubble-other: #ffffff;
  --text-bubble-other: #191919;
  --bg-system: rgba(0, 0, 0, 0.14);
  --text-system: #ffffff;
  --text-primary: #191919;
  --text-secondary: #5e6673;
  --border-color: rgba(0, 0, 0, 0.08);
  --chip-bg: #ffffff;
  --chip-hover: #fff8b8;
  --accent: #fee500;
  --accent-text: #2c2518;
  --danger: #dc2626;
  --success: #16a34a;
  --modal-bg: #ffffff;
  --input-bg: #f8fafc;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] {
  --bg-app: #111318;
  --bg-sidebar: #1b1f27;
  --bg-chat: #171a21;
  --bg-header: rgba(27, 31, 39, 0.96);
  --bg-composer: #1f242e;
  --bg-bubble-mine: #f7df48;
  --text-bubble-mine: #191919;
  --bg-bubble-other: #2a303c;
  --text-bubble-other: #f3f4f6;
  --bg-system: rgba(255, 255, 255, 0.12);
  --text-system: #e5e7eb;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --border-color: rgba(255, 255, 255, 0.09);
  --chip-bg: #262c37;
  --chip-hover: #333b49;
  --modal-bg: #1e232d;
  --input-bg: #131720;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, -apple-system, sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.app-root {
  height: 100%;
  width: 100%;
}

/* Auth Screen */
.auth-screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #bacee0 0%, #dbe7f2 100%);
  padding: 16px;
}

[data-theme="dark"] .auth-screen {
  background: linear-gradient(145deg, #12151c 0%, #1e2430 100%);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--modal-bg);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-logo img {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.auth-card h1 {
  margin: 12px 0 4px;
  font-size: 1.35rem;
}

.auth-subtitle {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: #eab308;
}

.security-note {
  background: rgba(254, 229, 0, 0.18);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.form-error {
  color: var(--danger);
  font-size: 0.84rem;
  margin: 2px 0;
}

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(0.96);
}

.btn-secondary {
  background: var(--chip-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.btn-danger {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

.full {
  width: 100%;
}

/* Main Shell */
.main-shell {
  display: flex;
  height: 100%;
  width: 100%;
  position: relative;
}

/* Sidebar */
.room-sidebar {
  width: 270px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.sidebar-top {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.brand-name {
  font-weight: 800;
  font-size: 0.98rem;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.btn-icon-pill {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.room-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.room-item {
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.15s;
}

.room-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .room-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.room-item.active {
  background: var(--modal-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.room-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.room-item-name {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-item-count {
  font-size: 0.72rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.room-item-preview {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-bottom {
  padding: 10px 14px;
  border-top: 1px solid var(--border-color);
  font-size: 0.76rem;
}

.tunnel-mini-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.dot.offline {
  background: #9ca3af;
}

/* Chat Pane */
.chat-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-chat);
  min-width: 0;
  position: relative;
}

.chat-header {
  background: var(--bg-header);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.room-switch-btn {
  display: none;
}

.header-title-wrap {
  min-width: 0;
}

.current-room-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.participants-trigger {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.76rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.orch-badge {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.2);
  color: var(--text-primary);
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chip-btn {
  background: var(--chip-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Sub-header Action Bar */
.action-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.action-chip {
  background: var(--chip-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.action-chip:hover {
  background: var(--chip-hover);
}

/* Participants Popover */
.participants-popover {
  position: absolute;
  top: 98px;
  left: 14px;
  right: 14px;
  max-width: 460px;
  background: var(--modal-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--input-bg);
  font-size: 0.83rem;
}

.participant-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.participant-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Messages */
.messages-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg-system {
  align-self: center;
  background: var(--bg-system);
  color: var(--text-system);
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 999px;
  max-width: 85%;
  text-align: center;
  line-height: 1.4;
}

.msg-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 86%;
}

.msg-row.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: #ffffff;
  color: #191919;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.msg-avatar.agent {
  background: #2c2518;
  color: #fee500;
}

.msg-avatar.guest {
  background: #e0f2fe;
  color: #0369a1;
}

.msg-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.msg-row.mine .msg-col {
  align-items: flex-end;
}

.msg-sender-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  color: var(--text-primary);
  font-weight: 700;
}

.badge-tag {
  font-size: 0.66rem;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.14);
  color: var(--text-primary);
  font-weight: 700;
}

[data-theme="dark"] .badge-tag {
  background: rgba(255, 255, 255, 0.16);
}

.badge-tag.leader {
  background: #fef08a;
  color: #713f12;
}

.msg-bubble-line {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.msg-row.mine .msg-bubble-line {
  flex-direction: row-reverse;
}

.msg-bubble {
  background: var(--bg-bubble-other);
  color: var(--text-bubble-other);
  padding: 9px 13px;
  border-radius: 14px;
  border-top-left-radius: 4px;
  font-size: 0.91rem;
  line-height: 1.48;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.msg-row.mine .msg-bubble {
  background: var(--bg-bubble-mine);
  color: var(--text-bubble-mine);
  border-top-left-radius: 14px;
  border-top-right-radius: 4px;
}

.msg-bubble a {
  color: #0284c7;
  text-decoration: underline;
}

.msg-row.mine .msg-bubble a {
  color: #1d4ed8;
}

.msg-time {
  font-size: 0.69rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-bottom: 2px;
}

.msg-att-img {
  display: block;
  max-width: 240px;
  max-height: 240px;
  border-radius: 10px;
  margin-top: 6px;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.msg-att-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.typing-bar {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.65);
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
}

[data-theme="dark"] .typing-bar {
  background: rgba(255, 255, 255, 0.12);
}

/* Pending Attachment */
.pending-attachment-bar {
  background: var(--bg-header);
  border-top: 1px solid var(--border-color);
  padding: 6px 14px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-clear-att {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--danger);
  font-weight: 700;
}

/* Mention Autocomplete */
.mention-popup {
  position: absolute;
  bottom: 66px;
  left: 14px;
  width: 240px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--modal-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 25;
}

.mention-item {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
}

.mention-item:hover {
  background: var(--chip-hover);
  color: #191919;
}

/* Composer */
.composer {
  background: var(--bg-composer);
  border-top: 1px solid var(--border-color);
  padding: 8px 10px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.composer-tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.message-input {
  flex: 1;
  min-height: 38px;
  max-height: 120px;
  resize: none;
  padding: 8px 11px;
  line-height: 1.4;
}

.btn-send {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 10px;
  height: 38px;
  padding: 0 15px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 60;
}

.modal-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  background: var(--modal-bg);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.02rem;
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tabs {
  display: flex;
  gap: 6px;
  background: var(--input-bg);
  padding: 4px;
  border-radius: 10px;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--modal-bg);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 6px;
}

.preset-btn {
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 8px 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.preset-btn.selected {
  border-color: #eab308;
  background: rgba(254, 229, 0, 0.25);
}

.card-box {
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
}

.warn-box {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.81rem;
  line-height: 1.45;
}

.code-box {
  width: 100%;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.79rem;
  background: var(--modal-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-all;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #ffffff;
  border-radius: 12px;
  align-self: center;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.file-card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px;
  background: var(--input-bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
}

.file-card img {
  width: 100%;
  height: 86px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
}

/* Lightbox & Toast */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 20px;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 95%;
  max-height: 92%;
  border-radius: 8px;
}

.toast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.9);
  color: #ffffff;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 600;
  z-index: 90;
}

/* Search Bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--modal-bg);
  border-bottom: 1px solid var(--border-color);
}

.search-bar input {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.85rem;
}

.search-count {
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.tunnel-pill.online {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.14);
  color: var(--success);
}

/* Quick Mention Chips */
.quick-mention-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-header);
  border-top: 1px solid var(--border-color);
  overflow-x: auto;
}

.quick-mention-chip {
  background: var(--chip-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.quick-mention-chip:hover {
  background: var(--chip-hover);
  color: #191919;
}

/* Prompt Presets & Rich Markdown */
.prompt-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prompt-preset-btn {
  background: var(--chip-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.prompt-preset-btn:hover {
  background: var(--chip-hover);
  color: #191919;
}

.md-code-wrap {
  margin: 6px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #1e293b;
  color: #f8fafc;
  white-space: normal;
}

.md-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.28);
  color: #cbd5e1;
}

.md-copy-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  border: none;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 0.7rem;
  cursor: pointer;
}

.md-code-wrap pre {
  margin: 0;
  padding: 8px 10px;
  overflow-x: auto;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre;
}

.md-inline {
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 5px;
  border-radius: 5px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.84em;
}

[data-theme="dark"] .md-inline {
  background: rgba(255, 255, 255, 0.14);
}

/* Mobile / Mini-Window Drawer Mode (<= 760px, covers 420px PC KakaoTalk popup too!) */
@media (max-width: 760px) {
  .room-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }

  .room-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    z-index: 28;
  }

  .room-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .msg-row {
    max-width: 92%;
  }
}
