/* TribeMeet — global call overlay + minimized bar */
html.tm-call-zoom-lock {
  touch-action: manipulation;
}

#tm-call-audio-sink {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}

.tm-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 650;
  background: #0b1020;
  display: none;
  flex-direction: column;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.tm-call-overlay.is-open {
  display: flex;
}

.tm-call-overlay.is-minimized {
  display: none;
}

.tm-call-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px 16px;
  background: rgba(6, 10, 24, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tm-call-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tm-call-label {
  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-call-status {
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--text-xs);
}

.tm-call-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.tm-call-timer {
  color: rgba(255, 255, 255, 0.86);
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-display);
}

.tm-call-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.85);
  padding: 16px;
}

.tm-call-dm-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
  width: min(360px, 100%);
  min-height: 180px;
}

.tm-call-avatar-wrap {
  position: relative;
  display: inline-flex;
}

.tm-call-hand-badge {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.95);
  color: #111;
  display: grid;
  place-items: center;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.tm-call-hand-badge.is-local {
  right: auto;
  left: -4px;
  background: rgba(129, 140, 248, 0.95);
  color: #fff;
}

.tm-call-hand-badge[hidden] {
  display: none !important;
}

.tm-call-live-stage {
  width: min(920px, 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  position: relative;
  min-height: 180px;
  z-index: 1;
}

.tm-call-live-stage[hidden],
.tm-call-dm-stage[hidden] {
  display: none !important;
}

.tm-call-tiles {
  display: grid;
  gap: 10px;
  width: 100%;
  max-height: min(62vh, 560px);
  overflow-y: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tm-call-tiles[data-count="1"] { grid-template-columns: minmax(0, 280px); justify-content: center; }
.tm-call-tiles[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tm-call-tiles[data-count="3"],
.tm-call-tiles[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tm-call-tile {
  position: relative;
  min-height: 140px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 10px 12px;
  overflow: hidden;
}

.tm-call-tile.is-hand-up {
  border-color: #f59e0b;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.45);
}

.tm-call-tile-face {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: auto;
  margin-top: 12px;
  background: rgba(99, 102, 241, 0.4);
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.tm-call-tile-meta {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tm-call-tile-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-call-tile-role {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.tm-call-screen-strip {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 64px;
  z-index: 4;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tm-call-screen-strip:empty { display: none; }

.tm-call-tile.is-compact {
  flex: 0 0 148px;
  min-height: 86px;
  padding: 8px;
  background: rgba(8, 10, 20, 0.82);
}

.tm-call-tile.is-compact .tm-call-tile-face {
  width: 36px;
  height: 36px;
  font-size: 14px;
  margin: 0 0 6px;
}

.tm-call-roster-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tm-call-roster-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.35);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.tm-call-roster-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-call-roster-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-call-roster-icons {
  display: inline-flex;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.tm-call-roster-icons .is-muted {
  color: #fbbf24;
}

.tm-call-roster-icons .is-hand {
  color: #f59e0b;
}

.tm-call-fx {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 6;
}

.tm-call-fx-burst {
  position: absolute;
  left: var(--fx-x, 50%);
  bottom: 10%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
  animation: tm-fx-rise 2.4s cubic-bezier(.18, .85, .22, 1) forwards;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .45));
}

.tm-call-fx-emoji {
  font-size: 72px;
  line-height: 1;
}

.tm-call-fx-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(8, 10, 22, .72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

@keyframes tm-fx-rise {
  0% { transform: translate(-50%, 28px) scale(.35) rotate(calc(var(--fx-spin, 0deg) * -1)); opacity: 0; }
  14% { transform: translate(-50%, -6px) scale(1.28) rotate(var(--fx-spin, 0deg)); opacity: 1; }
  26% { transform: translate(calc(-50% + var(--fx-drift, 0px)), -18px) scale(1) rotate(calc(var(--fx-spin, 0deg) * -.4)); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--fx-drift, 0px)), -62vh) scale(1.08) rotate(var(--fx-spin, 0deg)); opacity: 0; }
}

.tm-call-brand {
  position: absolute;
  left: 16px;
  bottom: 16px;
  opacity: 0.72;
  z-index: 1;
}

.tm-call-brand img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
}

.tm-call-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  animation: tm-call-pulse 1.6s ease-in-out infinite;
}

.tm-call-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes tm-call-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.45); }
  50% { box-shadow: 0 0 0 18px rgba(99, 102, 241, 0); }
}

.tm-call-hint {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.tm-call-mute-badge {
  font-size: var(--text-xs);
  color: var(--warning);
  margin: 0;
}

.tm-call-screen-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050814;
  padding: 12px;
}

.tm-call-screen-stage[hidden] {
  display: none !important;
}

.tm-call-screen-stage .tm-call-fx {
  z-index: 5;
}

.tm-call-screen-video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  background: #000;
}

.tm-call-sharing-banner {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  z-index: 3;
}

.tm-call-sharing-banner[hidden] {
  display: none !important;
}

.tm-call-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(6, 10, 24, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  touch-action: manipulation;
}

.tm-call-dock {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  max-width: 100%;
}

.tm-call-dock-primary,
.tm-call-dock-reactions,
.tm-call-reactions-cluster {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tm-call-reactions-cluster {
  position: relative;
}

.tm-call-react-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: min(380px, calc(100vw - 32px));
  padding: 8px;
  border-radius: 16px;
  background: rgba(11, 16, 32, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.tm-call-rx-emoji {
  font-size: 18px;
  line-height: 1;
}

.tm-call-react-popover[hidden] {
  display: none !important;
}

.tm-call-react-popover .tm-call-dock-btn {
  width: auto;
  min-width: 56px;
  height: auto;
  border-radius: 14px;
  padding: 8px 10px;
}

.tm-call-react-popover .tm-call-dock-label {
  display: block;
}

.tm-call-dock-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}

.tm-call-dock-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
  padding: 0;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tm-call-dock-btn[hidden] {
  display: none;
}

.tm-call-topbar button,
.tm-call-minibar button,
.tm-call-incoming button,
.tm-call-confirm button,
.tm-call-sharing-banner button {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tm-call-volume-popover input[type="range"] {
  touch-action: pan-x;
}

.tm-call-dock-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.tm-call-dock-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.tm-call-dock-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tm-call-dock-btn-sm {
  width: 42px;
  height: 42px;
}

.tm-call-dock-btn.is-muted,
.tm-call-dock-btn.is-active {
  background: rgba(255, 93, 93, 0.22);
  border-color: rgba(255, 93, 93, 0.55);
}

.tm-call-dock-btn.is-hand-up {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.6);
}

.tm-call-dock-btn.is-sharing {
  background: rgba(99, 102, 241, 0.28);
  border-color: rgba(129, 140, 248, 0.7);
}

.tm-call-dock-label {
  display: none;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-top: 2px;
}

.tm-call-volume-cluster {
  position: relative;
}

.tm-call-volume-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  min-width: 200px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(11, 16, 32, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tm-call-volume-popover[hidden] {
  display: none !important;
}

.tm-call-volume-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
  width: 100%;
}

.tm-call-volume-wrap input[type="range"] {
  flex: 1;
  width: auto;
  min-width: 0;
  accent-color: #818cf8;
}

.tm-call-output-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  width: 100%;
}

.tm-call-output-wrap[hidden] {
  display: none !important;
}

.tm-call-output-wrap select {
  width: 100%;
  max-width: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
}

.tm-call-end-btn {
  color: #fff;
  border-color: rgba(255, 93, 93, 0.7);
  background: rgba(255, 93, 93, 0.24);
}

.tm-call-confirm {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 6, 16, 0.72);
  backdrop-filter: blur(4px);
}

.tm-call-confirm[hidden] {
  display: none !important;
}

.tm-call-confirm-card {
  width: min(360px, 100%);
  padding: 24px 20px 18px;
  border-radius: 18px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  text-align: center;
  color: #fff;
}

.tm-call-confirm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  font-size: 18px;
}

.tm-call-confirm-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.tm-call-confirm-message {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.45;
}

.tm-call-confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.tm-call-confirm-actions .btn {
  flex: 1;
}

.tm-call-stage.is-showing-screen .tm-call-dm-stage,
.tm-call-stage.is-showing-screen .tm-call-live-stage {
  opacity: 0;
  pointer-events: none;
}

.tm-call-stage.is-showing-screen .tm-call-screen-strip {
  pointer-events: auto;
}

@media (max-width: 767px) {
  #tm-call-share-btn {
    display: none !important;
  }

  .tm-call-react-popover {
    left: auto;
    right: 0;
    transform: none;
  }
}

@media (max-width: 1023px) and (pointer: coarse) {
  #tm-call-share-btn {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .tm-call-dock {
    gap: 12px;
    padding: 10px 14px;
  }

  .tm-call-dock-btn {
    width: auto;
    min-width: 64px;
    height: auto;
    border-radius: 16px;
    padding: 10px 12px;
    flex-direction: column;
  }

  .tm-call-dock-btn-sm {
    width: auto;
    min-width: 56px;
    height: auto;
  }

  .tm-call-dock-label {
    display: block;
  }

  .tm-call-volume-popover {
    min-width: 240px;
  }
}

.tm-call-minibar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav-h, 0px) + 12px);
  transform: translateX(-50%);
  z-index: 651;
  display: none;
  align-items: center;
  gap: 10px;
  width: min(420px, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(11, 16, 32, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  color: #fff;
}

.tm-call-minibar.is-visible {
  display: flex;
}

.tm-call-minibar.is-positioned {
  bottom: auto;
  transform: none;
}

.tm-call-minibar.is-dragging {
  cursor: grabbing;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  user-select: none;
}

.tm-call-minibar-handle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: grab;
  touch-action: none;
}

.tm-call-minibar.is-dragging .tm-call-minibar-handle {
  cursor: grabbing;
}

.tm-call-minibar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.35);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
}

.tm-call-minibar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-call-minibar-copy {
  flex: 1;
  min-width: 0;
}

.tm-call-minibar-label {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-call-minibar-status {
  font-size: 10px;
  opacity: 0.75;
}

.tm-call-incoming {
  position: fixed;
  right: 16px;
  bottom: calc(var(--bottom-nav-h, 0px) + 16px);
  z-index: 652;
  display: none;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.tm-call-incoming.is-open {
  display: flex;
}

.tm-call-incoming-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tm-call-incoming-actions {
  display: flex;
  gap: 8px;
}

.tm-call-incoming-actions .btn {
  flex: 1;
}

@media (min-width: 1024px) {
  .tm-call-minibar {
    bottom: 16px;
  }
  .tm-call-incoming {
    bottom: 16px;
  }
}

.tm-call-rec-pill {
  display: none;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tm-call-rec-pill.is-on {
  display: inline-flex !important;
}
.tm-call-rec-pill i { font-size: 8px; }
.tm-call-dock-btn.is-recording {
  color: #fecaca;
}
.tm-call-notes {
  position: absolute;
  top: 52px;
  right: 12px;
  bottom: 88px;
  width: min(360px, calc(100% - 24px));
  z-index: 4;
  display: none;
  flex-direction: column;
  background: rgba(10, 16, 32, 0.96);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  overflow: hidden;
}
.tm-call-notes.is-open { display: flex; }
.tm-call-notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.tm-call-notes-head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tm-call-notes-head-actions .btn[hidden] { display: none; }
.tm-call-notes-status {
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(99, 102, 241, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tm-call-notes-status[hidden] {
  display: none !important;
}
.tm-call-notes-preview {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
}
.tm-call-notes-preview[hidden] {
  display: none !important;
}
.tm-call-notes-preview :where(h1, h2, h3) {
  font-size: 15px;
  margin: 10px 0 6px;
}
.tm-call-notes-preview :where(h1, h2, h3):first-child {
  margin-top: 0;
}
.tm-call-notes-preview ul,
.tm-call-notes-preview ol {
  margin: 0 0 10px;
  padding-left: 1.2em;
}
.tm-call-notes-preview p {
  margin: 0 0 8px;
}
.tm-call-notes-preview strong {
  font-weight: 700;
}
.tm-call-notes.is-preview textarea {
  display: none;
}
.tm-call-notes:not(.is-preview) .tm-call-notes-preview {
  display: none !important;
}
.tm-call-notes textarea {
  flex: 1;
  resize: none;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
}
.tm-call-notes-actions {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.tm-rec-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  font-size: 13px;
  color: var(--text);
}
.tm-rec-block.is-live { display: flex; align-items: center; gap: 8px; color: #b91c1c; font-weight: 700; }
.tm-rec-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239,68,68,.18);
}
.tm-rec-audio { width: 100%; margin: 4px 0 6px; }
.tm-rec-expiry { margin: 0 0 8px; font-size: 12px; color: var(--text-muted); }
.tm-rec-expiry.is-past { color: var(--text-muted); }
.tm-rec-tabs { display: flex; gap: 6px; margin: 8px 0; }
.tm-rec-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.tm-rec-tab.is-active { color: var(--primary); border-color: var(--primary); background: var(--primary-muted); }
.tm-rec-pane { display: none; max-height: 240px; overflow: auto; line-height: 1.5; }
.tm-rec-pane.is-active { display: block; }
.tm-rec-transcript { white-space: pre-wrap; font-size: 12px; color: var(--text-muted); }
.tm-rec-summary :where(h1,h2,h3) { font-size: 13px; margin: 8px 0 4px; }
.tm-rec-summary ul, .tm-rec-summary ol { margin: 0 0 8px; padding-left: 1.2em; }

.comm-call-card, .forum-call-card {
  width: 100%;
  max-width: 420px;
  margin: 4px 0 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
  background: var(--surface);
}
.comm-call-card-kicker, .forum-call-card-kicker {
  display: inline-flex;
  margin: 0 0 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-muted);
}
.comm-call-card-title, .forum-call-card-title {
  margin: 0 0 4px;
  font-size: var(--text-sm);
  font-weight: 800;
}
.comm-call-card-body, .forum-call-card-body {
  margin: 0 0 12px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.tm-rec-status { margin: 0 0 8px; font-size: 12px; color: var(--text-muted); }
.tm-rec-note { margin: 8px 0 0; font-size: 12px; color: var(--text-muted); }
.tm-rec-subscribe {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid var(--primary);
  background: var(--primary-muted);
  color: var(--primary);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
}
.tm-rec-subscribe:disabled { opacity: .6; cursor: progress; }
.tm-rec-error { margin: 0 0 8px; font-size: 12px; color: #b91c1c; }
.comm-call-card-actions, .forum-call-card-actions { margin: 0 0 10px; }

/* ── TribeSpace: confirm with a third choice ─────────────────── */
.tm-call-confirm-actions .btn[hidden] { display: none; }
.tm-call-confirm.has-alt .tm-call-confirm-actions { flex-wrap: wrap; }
.tm-call-confirm.has-alt .tm-call-confirm-actions .btn { flex: 1 1 calc(50% - 4px); }
.tm-call-confirm.has-alt #tm-call-confirm-cancel { order: 3; flex-basis: 100%; }

/* ── TribeSpace: mute from the roster ────────────────────────── */
.tm-call-roster-mute {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.tm-call-roster-mute:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); }
.tm-call-roster-mute:disabled { opacity: .55; cursor: progress; }
.tm-call-roster-role {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, 0.6);
}

/* ── TribeSpace: live chat ───────────────────────────────────── */
.tm-call-chat-btn { position: relative; }
.tm-call-chat-btn.is-active { background: rgba(99, 102, 241, 0.35); border-color: rgba(129, 140, 248, 0.6); }
.tm-call-chat-unread {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.tm-call-chat-unread[hidden] { display: none; }

.tm-call-chat {
  position: absolute;
  top: 52px;
  right: 12px;
  bottom: 88px;
  width: min(380px, calc(100% - 24px));
  z-index: 5;
  display: none;
  flex-direction: column;
  background: rgba(10, 16, 32, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
}
.tm-call-chat.is-open { display: flex; }
.tm-call-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.tm-call-chat-title { display: block; font-weight: 800; font-size: 14px; font-family: var(--font-display); }
.tm-call-chat-sub { display: block; font-size: 11px; color: rgba(255, 255, 255, 0.6); margin-top: 1px; }
.tm-call-chat-head .btn { color: #fff; }

.tm-call-chat-list {
  list-style: none;
  margin: 0;
  padding: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overscroll-behavior: contain;
}
.tm-call-chat-empty {
  margin: 0;
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}
.tm-call-chat-empty[hidden] { display: none; }

.tm-call-chat-msg { display: flex; gap: 10px; align-items: flex-start; }
.tm-call-chat-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, 0.35);
  font-size: 12px;
  font-weight: 700;
}
.tm-call-chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tm-call-chat-main { flex: 1; min-width: 0; }
.tm-call-chat-meta { display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
.tm-call-chat-author { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-call-chat-time { color: rgba(255, 255, 255, 0.5); font-size: 11px; flex-shrink: 0; }
.tm-call-chat-quote {
  margin: 4px 0 2px;
  padding: 4px 8px;
  border-left: 3px solid rgba(129, 140, 248, 0.8);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  overflow-wrap: anywhere;
}
.tm-call-chat-quote strong { display: block; font-size: 11px; color: rgba(255, 255, 255, 0.85); }
.tm-call-chat-body {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tm-call-chat-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.tm-call-chat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  touch-action: manipulation;
}
.tm-call-chat-chip.is-mine { border-color: rgba(129, 140, 248, 0.8); background: rgba(99, 102, 241, 0.25); }
.tm-call-chat-chip.is-action { color: rgba(255, 255, 255, 0.7); }
.tm-call-chat-chip:hover { background: rgba(255, 255, 255, 0.1); }
.tm-call-chat-picker { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tm-call-chat-picker[hidden] { display: none; }

.tm-call-chat-form { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 8px 10px 10px; }
.tm-call-chat-replying {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.16);
  font-size: 12px;
}
.tm-call-chat-replying[hidden] { display: none; }
.tm-call-chat-replying-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-call-chat-replying-cancel {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 4px;
}
.tm-call-chat-compose { display: flex; align-items: flex-end; gap: 8px; }
.tm-call-chat-compose textarea {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  resize: none;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
}
.tm-call-chat-compose textarea:focus { outline: none; border-color: rgba(129, 140, 248, 0.9); }
.tm-call-chat-send {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 0;
  background: var(--primary, #5850ec);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
}
.tm-call-chat-send:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 600px) {
  .tm-call-chat {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(78vh, calc(100% - 56px));
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 12;
  }
}

