/* ==========================================================================
   跨平台远程协作 App · Web 参考客户端
   视觉基调：白 + 浅灰底 + 华为红点缀；圆角 8px；不用重阴影
   ========================================================================== */

:root {
  --red: #c7000b;
  --red-hover: #a80009;
  --red-soft: #fdeced;
  --ink: #1a1a1a;
  --ink-2: #5c5c5c;
  --ink-3: #8c8c8c;
  --line: #e6e8eb;
  --line-soft: #eef0f2;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --hover: #f0f1f3;
  --green: #1f9d55;
  --amber: #d98600;
  --blue: #1f6fd0;
  --radius: 8px;
  --radius-sm: 6px;
  --header-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* 统一 hidden 语义：避免 .btn{display:inline-flex} 之类的规则把 hidden 覆盖掉 */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--red-soft); }

/* 滚动条：细、克制 */
* { scrollbar-width: thin; scrollbar-color: #d4d7db transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #d4d7db; border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: #bfc3c8; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- 启动 / 加载 ---------- */
.app { height: 100%; }

.boot {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
}
.boot__spinner {
  width: 26px; height: 26px;
  border: 2px solid var(--line);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.boot__text { margin: 0; color: var(--ink-2); }
.boot__hint { margin: 0; color: var(--ink-3); font-size: 13px; max-width: 460px; }

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--hover); }
.btn:active { background: #e9eaec; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid rgba(199,0,11,.35); outline-offset: 1px; }

.btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn--primary:hover { background: var(--red-hover); border-color: var(--red-hover); }
.btn--primary:active { background: #920008; }

.btn--ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--hover); color: var(--ink); }

.btn--danger { color: var(--red); border-color: #f0cdd0; background: #fff; }
.btn--danger:hover { background: var(--red-soft); }
.btn.is-active { background: var(--red-soft); border-color: #f3d4d6; color: var(--red); }

.btn--sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn--block { width: 100%; }
.btn__icon { display: inline-flex; width: 16px; height: 16px; }
.btn__icon svg { width: 100%; height: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field__label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.field__hint { font-size: 12px; color: var(--ink-3); }

.input, .textarea, .select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(199, 0, 11, .08);
}
.input::placeholder, .textarea::placeholder { color: #b3b7bc; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238c8c8c' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }

.alert {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.alert--error { background: var(--red-soft); color: #8d0409; border: 1px solid #f6d3d5; }
.alert--info { background: #eef4fd; color: #17457f; border: 1px solid #d8e5f8; }
.alert--warn { background: #fdf6e7; color: #7a4d00; border: 1px solid #f4e4c1; }
.alert[hidden] { display: none; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  background: var(--hover);
  color: var(--ink-2);
}
.tag--host { background: var(--red-soft); color: var(--red); }
.tag--guest { background: #eef4fd; color: var(--blue); }
.tag--live { background: #e8f6ee; color: var(--green); }
.tag--closed { background: #f0f1f3; color: var(--ink-3); }
.tag--type { background: #f2f0fb; color: #5a44c2; }

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #c9cdd2;
  flex: none;
}
.dot--on { background: var(--green); }
.dot--live { background: var(--red); box-shadow: 0 0 0 3px rgba(199,0,11,.12); }

/* ---------- 登录页 ---------- */
.login {
  min-height: 100%;
  display: grid;
  grid-template-columns: 1fr 400px;
  background: var(--bg);
}
.login__aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 72px;
  background: var(--surface);
  border-right: 1px solid var(--line-soft);
}
.login__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2px;
  margin-bottom: 40px;
}
.login__logo {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}
.login__title {
  font-size: 30px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -.3px;
  margin: 0 0 14px;
}
.login__subtitle {
  margin: 0 0 32px;
  color: var(--ink-2);
  max-width: 420px;
  line-height: 1.7;
}
.login__features { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 440px; }
.login__features li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.login__features svg { width: 16px; height: 16px; margin-top: 3px; color: var(--red); flex: none; }

.login__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 44px;
}
.login__form-title { font-size: 19px; font-weight: 600; margin: 0 0 4px; }
.login__form-sub { font-size: 13px; color: var(--ink-3); margin: 0 0 22px; }
.login__tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.login__tab {
  position: relative;
  border: 0;
  background: none;
  padding: 0 0 10px;
  font-size: 14px;
  color: var(--ink-3);
  cursor: pointer;
}
.login__tab[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.login__tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--red);
  border-radius: 1px;
}
.login__submit { height: 40px; margin-top: 4px; }
.login__footer { margin-top: 20px; font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.login__endpoint { font-family: var(--mono); font-size: 11px; color: var(--ink-2); background: var(--hover); padding: 2px 6px; border-radius: 4px; }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login__aside { display: none; }
  .login__panel { padding: 40px 24px; }
}

/* ---------- 房间列表 ---------- */
.shell { height: 100%; display: flex; flex-direction: column; }

.topbar {
  height: var(--header-h);
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}
.topbar__logo {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.topbar__spacer { flex: 1; }
.topbar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
}
.topbar__user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  flex: none;
  user-select: none;
}
.avatar--sm { width: 22px; height: 22px; font-size: 10px; }
.avatar--lg { width: 36px; height: 36px; font-size: 13px; }

.rooms {
  flex: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 0;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 16px 0;
  overflow-y: auto;
}
.sidebar__section {
  padding: 0 16px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--ink-3);
}
.sidebar__item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 16px;
  border: 0;
  border-left: 2px solid transparent;
  background: none;
  text-align: left;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.sidebar__item:hover { background: var(--hover); color: var(--ink); }
.sidebar__item.is-active {
  background: var(--red-soft);
  border-left-color: var(--red);
  color: var(--red);
  font-weight: 600;
}
.sidebar__item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__count { font-size: 11px; color: var(--ink-3); }
.sidebar__empty { padding: 8px 16px; font-size: 12px; color: var(--ink-3); }

.rooms__main { overflow-y: auto; padding: 24px 28px 40px; }
.rooms__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.rooms__title { font-size: 20px; font-weight: 600; margin: 0; letter-spacing: -.2px; }
.rooms__meta { font-size: 13px; color: var(--ink-3); margin: 3px 0 0; }
.rooms__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.rooms__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 14px;
}

.room-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.room-card:hover { border-color: #d6d9dd; background: #fcfcfd; }
.room-card:focus-visible { outline: 2px solid rgba(199,0,11,.3); outline-offset: 1px; }
.room-card__top { display: flex; align-items: center; gap: 8px; }
.room-card__name {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.room-card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.room-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}
.room-card__people { display: flex; align-items: center; gap: 5px; }

.empty {
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-3);
  background: #fbfbfc;
}
.empty__title { color: var(--ink); font-weight: 600; margin: 0 0 6px; font-size: 14px; }
.empty__text { margin: 0 0 16px; font-size: 13px; }

/* ---------- 房间页 ---------- */
.room {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.room__bar {
  height: var(--header-h);
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.room__back {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.room__back:hover { background: var(--hover); color: var(--ink); }
.room__back svg { width: 16px; height: 16px; }
.room__identity { display: flex; flex-direction: column; min-width: 0; }
.room__name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room__sub { font-size: 11px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.room__conn { display: inline-flex; align-items: center; gap: 4px; }
.room__spacer { flex: 1; }
.room__bar-actions { display: flex; align-items: center; gap: 8px; }

.room__body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 360px;
  gap: 0;
}
.room__body.is-narrow { grid-template-columns: minmax(0, 1fr) 360px; }
.room__body.is-narrow .members { display: none; }
.room__body.is-immersive { grid-template-columns: minmax(0, 1fr); }
.room__body.is-immersive .members,
.room__body.is-immersive .stage { display: none; }

/* 左：成员 */
.members {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.panel__head {
  height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-soft);
}
.panel__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: .3px;
  margin: 0;
}
.panel__count { font-size: 11px; color: var(--ink-3); }
.panel__spacer { flex: 1; }

.members__list { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
.member {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
}
.member:hover { background: var(--hover); }
.member__avatar-wrap { position: relative; flex: none; }
.member__dot {
  position: absolute;
  right: -1px; bottom: -1px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #c9cdd2;
  border: 1.5px solid #fff;
}
.member__dot.is-on { background: var(--green); }
.member__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.member__name {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}
.member__name-self { color: var(--ink-3); font-size: 11px; }
.member__sub { font-size: 11px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }

/* 中：编辑 + 聊天 */
.center {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(220px, 34%);
  background: var(--bg);
  border-right: 1px solid var(--line);
}

.editor {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px 14px 0;
}
.editor__card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.editor__head {
  height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-soft);
}
.editor__title {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor__status { font-size: 11px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.editor__status-text { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor__doc-select { height: 26px; font-size: 12px; max-width: 150px; padding: 0 24px 0 8px; }

.editor__body { flex: 1; min-height: 0; position: relative; }
.editor__textarea {
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  resize: none;
  padding: 16px 18px;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
  background: transparent;
}
.editor__textarea::placeholder { color: #b3b7bc; }
.editor__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  background: var(--surface);
}

.chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 14px 14px;
}
.chat__card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.chat__head {
  height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-soft);
}
.chat__list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat__typing {
  height: 20px;
  flex: none;
  padding: 0 14px;
  font-size: 11px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat__composer {
  flex: none;
  border-top: 1px solid var(--line-soft);
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.chat__input {
  flex: 1;
  min-height: 36px;
  max-height: 120px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  resize: none;
  font-size: 13px;
  line-height: 1.5;
  font-family: inherit;
}
.chat__input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(199,0,11,.08); }

.msg {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.msg--mine { flex-direction: row-reverse; }
.msg__body { min-width: 0; max-width: 78%; display: flex; flex-direction: column; gap: 3px; }
.msg--mine .msg__body { align-items: flex-end; }
.msg__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-3);
}
.msg__sender { color: var(--ink-2); font-weight: 500; }
.msg__bubble {
  padding: 7px 11px;
  border-radius: var(--radius);
  background: var(--hover);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg--mine .msg__bubble { background: var(--red); color: #fff; }
.msg--pending .msg__bubble { opacity: .65; }
.msg--failed .msg__bubble { background: #fbe9ea; color: #8d0409; }
.msg__state { font-size: 10px; color: var(--ink-3); }
.msg-sys {
  align-self: center;
  font-size: 11px;
  color: var(--ink-3);
  background: var(--hover);
  padding: 3px 10px;
  border-radius: 999px;
}

/* 右：屏幕共享 */
.stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
  border-left: 1px solid var(--line);
}
.stage__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stage__tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0f1114;
  display: flex;
  flex-direction: column;
}
.stage__video-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0f1114;
}
.stage__video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0f1114;
}
.stage__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(15, 17, 20, .72);
  color: #fff;
  font-size: 11px;
}
.stage__badge .dot { width: 6px; height: 6px; }
.stage__caption {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
}
.stage__caption-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 18px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.6;
  background: #fbfbfc;
}
.stage__empty svg { width: 28px; height: 28px; color: #c2c6cb; }
.stage__hint { font-size: 11px; color: var(--ink-3); }
.stage__note { font-size: 11.5px; color: var(--ink-3); line-height: 1.6; padding: 0 2px; }

/* ---------- 弹层 / Toast ---------- */
.modal-host {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 26, .32);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 60;
}
.modal-host[hidden] { display: none; }
.modal {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 12px;
  padding: 22px 22px 18px;
  box-shadow: 0 12px 40px rgba(15, 17, 20, .16);
}
.modal__title { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.modal__desc { font-size: 13px; color: var(--ink-3); margin: 0 0 18px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.code-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfc;
}
.code-box__value {
  flex: 1;
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 3px;
  font-weight: 600;
  color: var(--ink);
}

.toast-host {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  z-index: 80;
  pointer-events: none;
}
.toast {
  padding: 9px 15px;
  border-radius: 999px;
  background: #1f2226;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 6px 20px rgba(15, 17, 20, .18);
  animation: toast-in .18s ease-out;
  max-width: 70vw;
}
.toast--error { background: var(--red); }
.toast--ok { background: #14703c; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 窄屏退化 ---------- */
@media (max-width: 1180px) {
  .room__body { grid-template-columns: minmax(0, 1fr) 320px; }
  .room__body .members { display: none; }
  .rooms { grid-template-columns: 200px 1fr; }
}
@media (max-width: 860px) {
  .room__body { grid-template-columns: minmax(0, 1fr); }
  .room__body .stage { display: none; }
  .rooms { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .rooms__main { padding: 16px; }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
