/* =====================================================================
   火火会议 · 样式表
   深色玻璃质感 + 火焰橙主色，移动端优先，桌面自适应
   ===================================================================== */

:root {
  --bg: #08080c;
  --bg-soft: #101018;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-2: rgba(255, 255, 255, 0.085);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f4f7;
  --text-dim: rgba(244, 244, 247, 0.62);
  --text-mute: rgba(244, 244, 247, 0.38);
  --flame: #ff5a1f;
  --flame-2: #ff8a3d;
  --flame-3: #ffb347;
  --danger: #ff3b4e;
  --ok: #2fd07a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'HarmonyOS Sans SC', 'PingFang SC',
    'Microsoft YaHei', 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
  overscroll-behavior: none;
}

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

button {
  cursor: pointer;
  border: 0;
  background: none;
}

svg {
  display: block;
}

/* ---------------------------- 视图切换 ---------------------------- */

.view {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
}

.view.is-active {
  display: flex;
}

/* =====================================================================
   大厅
   ===================================================================== */

.view-lobby {
  overflow-y: auto;
  padding: calc(20px + var(--safe-t)) 18px calc(24px + var(--safe-b));
  gap: 18px;
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.glow-a {
  width: 380px;
  height: 380px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(255, 90, 31, 0.55), transparent 70%);
}

.glow-b {
  width: 320px;
  height: 320px;
  bottom: -150px;
  left: -120px;
  background: radial-gradient(circle, rgba(255, 179, 71, 0.28), transparent 70%);
}

.lobby-head,
.lobby-main,
.lobby-foot {
  position: relative;
  z-index: 1;
}

.lobby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
  color: #1a0c04;
  background: linear-gradient(140deg, var(--flame-3), var(--flame) 60%, #e03d00);
  box-shadow: 0 10px 30px rgba(255, 90, 31, 0.42);
}

.brand-copy h1 {
  margin: 0;
  font-size: 19px;
  letter-spacing: 0.5px;
}

.brand-copy p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-main {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 16px;
}

.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--flame-3);
  background: rgba(255, 138, 61, 0.14);
  border: 1px solid rgba(255, 138, 61, 0.28);
}

.field-label {
  display: block;
  font-size: 12px;
  color: var(--text-mute);
  margin: 0 0 7px 2px;
  letter-spacing: 0.3px;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 8px 4px 4px;
  margin-bottom: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-row:focus-within {
  border-color: rgba(255, 138, 61, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.12);
}

.avatar-dot {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: #170a03;
  background: linear-gradient(140deg, var(--flame-3), var(--flame));
}

input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  padding: 10px 6px;
  font-size: 15px;
}

input::placeholder {
  color: var(--text-mute);
}

#room-input {
  letter-spacing: 6px;
  font-size: 19px;
  font-weight: 650;
  text-align: center;
  padding: 12px 6px;
  letter-spacing: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  border: 1px solid transparent;
  transition: 0.18s;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-btn:active {
  transform: scale(0.94);
}

.primary-btn {
  width: 100%;
  border-radius: 15px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--flame-2), var(--flame) 55%, #e8430a);
  color: #fff;
  text-align: left;
  box-shadow: 0 14px 34px rgba(255, 80, 20, 0.34);
  transition: transform 0.16s, box-shadow 0.16s, filter 0.16s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.primary-btn-main {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.primary-btn small {
  font-size: 11.5px;
  opacity: 0.82;
  padding-left: 28px;
}

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

.primary-btn:active {
  transform: translateY(1px) scale(0.995);
}

.primary-btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--text-mute);
  font-size: 11.5px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.join-row {
  display: flex;
  gap: 10px;
}

.join-row input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.2s;
}

.join-row input:focus {
  border-color: rgba(255, 138, 61, 0.55);
}

.secondary-btn {
  flex: 0 0 96px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  font-weight: 650;
  transition: 0.18s;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.secondary-btn:active {
  transform: scale(0.98);
}

.secondary-btn.pulse {
  animation: joinPulse 1.6s ease-in-out infinite;
  border-color: rgba(255, 138, 61, 0.6);
  color: #ffd9c2;
}

@keyframes joinPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.35);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(255, 90, 31, 0);
  }
}

.hint {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--flame-3);
  background: rgba(255, 138, 61, 0.1);
  border: 1px solid rgba(255, 138, 61, 0.2);
  border-radius: 10px;
  padding: 9px 11px;
}

.quick-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.link-btn {
  font-size: 12.5px;
  color: var(--text-dim);
  padding: 4px 2px;
}

.link-btn:hover {
  color: var(--flame-3);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.feature {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.feature-ico {
  font-size: 20px;
  margin-bottom: 4px;
}

.feature b {
  font-size: 13.5px;
}

.feature span {
  font-size: 11.5px;
  color: var(--text-mute);
  line-height: 1.45;
}

.lobby-foot {
  max-width: 720px;
  width: 100%;
  margin: 4px auto 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-mute);
  justify-content: center;
}

.dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.foot-link {
  color: var(--flame-3);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 179, 71, 0.45);
}

.foot-link:hover {
  color: var(--flame-2);
}

/* =====================================================================
   会议室
   ===================================================================== */

.view-room {
  background: radial-gradient(120% 90% at 50% -10%, #14141f 0%, #08080c 60%);
}

.room-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--safe-t)) 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 20;
}

.room-id {
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.room-id b {
  font-size: 16px;
  letter-spacing: 2px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(47, 208, 122, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 208, 122, 0.55);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(47, 208, 122, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(47, 208, 122, 0);
  }
}

.member-count,
.room-meta > span:first-child {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}

.room-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 2px;
  flex: 1;
  min-width: 0;
}

.badge {
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.badge.good {
  color: var(--ok);
  border-color: rgba(47, 208, 122, 0.3);
  background: rgba(47, 208, 122, 0.1);
}

.badge.warn {
  color: var(--flame-3);
  border-color: rgba(255, 179, 71, 0.3);
  background: rgba(255, 179, 71, 0.1);
}

.badge.bad {
  color: var(--danger);
  border-color: rgba(255, 59, 78, 0.32);
  background: rgba(255, 59, 78, 0.1);
}

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

.mini-btn {
  font-size: 11.5px;
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-dim);
  transition: 0.18s;
  white-space: nowrap;
}

.mini-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}

.mini-btn.accent {
  color: #1a0c04;
  background: linear-gradient(135deg, var(--flame-3), var(--flame));
  border-color: transparent;
  font-weight: 700;
}

.mini-btn.accent:hover {
  filter: brightness(1.08);
}

/* ---------------------------- 舞台 ---------------------------- */

.stage {
  flex: 1;
  min-height: 0;
  position: relative;
  padding: 10px;
  overflow: hidden;
}

.grid {
  height: 100%;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(0, 1fr);
  align-content: stretch;
}

.grid[data-count='1'] {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
}

.grid[data-count='2'] {
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 720px) {
  .grid[data-count='2'] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
  }
}

.grid[data-count='3'],
.grid[data-count='4'] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

@media (min-width: 900px) {
  .grid[data-count='3'] {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr;
  }
  .grid[data-count='5'],
  .grid[data-count='6'] {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .grid[data-count='7'],
  .grid[data-count='8'],
  .grid[data-count='9'] {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
}

.grid[data-count='5'],
.grid[data-count='6'],
.grid[data-count='7'],
.grid[data-count='8'],
.grid[data-count='9'] {
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
}

.grid[data-count='10'],
.grid[data-count='11'],
.grid[data-count='12'] {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
}

.tile {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(160deg, #16161f, #0d0d13);
  border: 1px solid var(--line);
  min-height: 88px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0b0b11;
}

.tile.is-local video {
  transform: scaleX(-1);
}

.tile.no-mirror video {
  transform: none;
}

.tile.is-sharing {
  border-color: rgba(255, 138, 61, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 138, 61, 0.28), 0 12px 40px rgba(255, 90, 31, 0.16);
  grid-column: span 1;
}

@media (min-width: 900px) {
  .tile.is-sharing {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.tile video.is-screen {
  object-fit: contain;
  transform: none;
  background: #000;
}

.tile-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  background: radial-gradient(circle at 50% 40%, rgba(255, 90, 31, 0.12), transparent 70%),
    linear-gradient(160deg, #15151e, #0c0c11);
}

.tile-ph .avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  color: #170a03;
  background: linear-gradient(140deg, var(--flame-3), var(--flame));
  box-shadow: 0 10px 26px rgba(255, 90, 31, 0.3);
}

.tile-bar {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.tile-name {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-flag {
  font-size: 10.5px;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(255, 59, 78, 0.85);
  font-weight: 600;
}

.tile-flag.share {
  background: rgba(255, 90, 31, 0.9);
  color: #fff;
}

.tile-state {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 5px;
}

.tile-state span {
  font-size: 11px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

.stage-empty {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  background: rgba(14, 14, 20, 0.78);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-mute);
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100% - 24px);
  z-index: 6;
}

.stage-empty[hidden] {
  display: none;
}

.stage-empty p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-dim);
}

.stage-empty span {
  font-size: 11.5px;
  color: var(--text-mute);
}

.empty-ring {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 138, 61, 0.7);
  animation: spin 8s linear infinite;
}

@media (max-width: 420px) {
  .stage-empty span {
    display: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 表情飘屏 */
.reaction-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 15;
}

.reaction-bubble {
  position: absolute;
  bottom: 18%;
  font-size: 30px;
  animation: floatUp 2.4s ease-out forwards;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.7);
  }
  15% {
    opacity: 1;
    transform: translateY(0) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translateY(-260px) scale(0.9);
  }
}

/* ---------------------------- 工具栏 ---------------------------- */

.toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 4px;
  padding: 10px 10px calc(10px + var(--safe-b));
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  z-index: 20;
}

.tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 12px;
  color: var(--text-dim);
  min-width: 58px;
  transition: 0.16s;
}

.tool-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 19px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: 0.18s;
}

.tool-label {
  font-size: 10.5px;
  white-space: nowrap;
}

.tool[data-on='0'] .tool-ico {
  background: rgba(255, 59, 78, 0.16);
  border-color: rgba(255, 59, 78, 0.4);
  color: #ff8b96;
}

.tool[data-on='1'].tool-share .tool-ico,
.tool.is-active .tool-ico {
  background: linear-gradient(140deg, var(--flame-2), var(--flame));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 90, 31, 0.35);
}

.tool:active .tool-ico {
  transform: scale(0.92);
}

.tool-danger .tool-ico {
  background: rgba(255, 59, 78, 0.92);
  border-color: transparent;
  color: #fff;
}

/* ---------------------------- 侧栏 ---------------------------- */

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 86vw);
  background: rgba(12, 12, 18, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 40;
  padding-top: var(--safe-t);
  animation: slideIn 0.22s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(20px);
    opacity: 0;
  }
}

.side-panel[hidden] {
  display: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 8px;
  border-bottom: 1px solid var(--line);
}

.panel-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px;
  border-radius: 10px;
}

.panel-tab {
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 8px;
  color: var(--text-dim);
  transition: 0.18s;
}

.panel-tab.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-weight: 600;
}

.panel-tab i {
  font-style: normal;
  opacity: 0.6;
}

.panel-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.panel-body[hidden] {
  display: none;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.msg-av {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #170a03;
  background: linear-gradient(140deg, var(--flame-3), var(--flame));
}

.msg-main {
  min-width: 0;
}

.msg-name {
  font-size: 11px;
  color: var(--text-mute);
  margin-bottom: 2px;
}

.msg-text {
  font-size: 13.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  word-break: break-word;
  white-space: pre-wrap;
}

.msg.is-self {
  flex-direction: row-reverse;
}

.msg.is-self .msg-name {
  text-align: right;
}

.msg.is-self .msg-text {
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.22), rgba(255, 90, 31, 0.16));
  border-color: rgba(255, 138, 61, 0.3);
}

.msg-system {
  font-size: 11.5px;
  color: var(--text-mute);
  text-align: center;
  padding: 2px 0;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + var(--safe-b));
  border-top: 1px solid var(--line);
}

.chat-form input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

.send-btn {
  width: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--flame-2), var(--flame));
  color: #fff;
}

.member-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.member .msg-av {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 10px;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-sub {
  font-size: 10.5px;
  color: var(--text-mute);
}

.member-icons {
  display: flex;
  gap: 4px;
  font-size: 12px;
  opacity: 0.85;
}

/* =====================================================================
   底板 / 弹窗 / Toast
   ===================================================================== */

.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  z-index: 60;
  animation: fade 0.18s;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 82vh;
  background: #12121a;
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--line);
  z-index: 61;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-b);
  animation: sheetUp 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
}

@media (min-width: 640px) {
  .sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: 420px;
    transform: translate(-50%, -50%);
    border-radius: 20px;
    border: 1px solid var(--line);
    animation: pop 0.2s ease-out;
  }
}

@keyframes sheetUp {
  from {
    transform: translateY(100%);
  }
}

@keyframes pop {
  from {
    transform: translate(-50%, -46%) scale(0.97);
    opacity: 0;
  }
}

.sheet[hidden],
.sheet-mask[hidden] {
  display: none;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
}

.sheet-head b {
  font-size: 16px;
}

.sheet-body {
  padding: 0 16px 18px;
  overflow-y: auto;
}

.sheet-body p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
}

.sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.sheet-row:last-child {
  border-bottom: 0;
}

.sheet-row select {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  max-width: 58%;
  outline: none;
}

.invite-box {
  display: flex;
  gap: 8px;
  margin: 10px 0 14px;
}

.invite-box input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.invite-code {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 8px;
  text-align: center;
  padding: 14px 0 6px;
  background: linear-gradient(135deg, var(--flame-3), var(--flame));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}

.qr-wrap {
  display: grid;
  place-items: center;
  padding: 10px 0 16px;
}

.qr-wrap img {
  width: 168px;
  height: 168px;
  border-radius: 14px;
  background: #fff;
  padding: 8px;
}

.sheet-actions {
  display: flex;
  gap: 10px;
}

.sheet-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 650;
}

.btn-primary {
  background: linear-gradient(135deg, var(--flame-2), var(--flame));
  color: #fff;
}

.btn-ghost {
  background: var(--surface-2);
  border: 1px solid var(--line);
}

/* 自检面板 */
.diag {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 2px;
}

.diag-row {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}

.diag-row b {
  font-size: 11.5px;
  color: var(--flame-3);
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
}

.diag-row pre {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-dim);
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
}

/* 会议内媒体提示条 */
.media-warn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 10px 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 179, 71, 0.12);
  border: 1px solid rgba(255, 179, 71, 0.32);
  color: #ffd7a8;
  font-size: 12px;
  flex: 0 0 auto;
}

.media-warn[hidden] {
  display: none;
}

.media-warn button {
  margin-left: auto;
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 179, 71, 0.22);
  border: 1px solid rgba(255, 179, 71, 0.45);
  color: #ffe6c8;
  white-space: nowrap;
}

.toast-root {  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-b));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 90;
  pointer-events: none;
  width: max-content;
  max-width: 88vw;
}

.toast {
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(24, 24, 32, 0.96);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.22s ease-out;
  text-align: center;
}

.toast.err {
  border-color: rgba(255, 59, 78, 0.45);
  color: #ffc9ce;
}

.toast.ok {
  border-color: rgba(47, 208, 122, 0.4);
  color: #c3f6d8;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 3px;
}

@media (max-width: 380px) {
  .tool {
    min-width: 50px;
  }
  .tool-ico {
    width: 40px;
    height: 40px;
  }
  .room-head {
    gap: 6px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .room-id b {
    font-size: 14px;
    letter-spacing: 1px;
  }
  .room-actions .icon-btn {
    width: 32px;
    flex-basis: 32px;
  }
}
