/* Traverse Connect user modal (tc-modal) — revamp 2026 */

#creator-modal-root.unique-user-modal {
  --tc-modal-width: 760px;
  --tc-modal-pad-x: 28px;
  --tc-modal-pad-bottom: 48px;
  --tc-modal-radius: 12px;
  --tc-modal-bg: #fff;
  --tc-modal-border: #E0DDD6;
  --tc-modal-shadow: 0 4px 6px rgba(0, 0, 0, 0.04), 0 20px 60px rgba(0, 0, 0, 0.12);
  --tc-hero-bg: #111318;
  --tc-hero-height: 120px;
  --tc-avatar-size: 140px;
  --tc-teal: #22C9A5;
  --tc-teal-border: #1DAF8F;
  --tc-teal-light: #E8FAF6;
  --tc-text-primary: #111;
  --tc-text-secondary: #555;
  --tc-text-muted: #AAA;
  --tc-text-faint: #CCC;
  --tc-element-radius: 0;
  --tc-btn-radius: 8px;
  --tc-card-radius: 10px;
  --tc-connected-fg: #166534;
  --tc-connected-bg: #f6fef9;
  --tc-connected-border: #bbf7d0;
  --tc-connected-icon: #22c55e;

  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: rgba(14, 17, 22, 0.52);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-sizing: border-box;
}

#creator-modal-root.unique-user-modal.is-open {
  display: flex;
}

#creator-modal-root.unique-user-modal .unique-modal-content.tc-modal {
  position: relative;
  width: min(var(--tc-modal-width), calc(100vw - 32px)) !important;
  max-width: var(--tc-modal-width) !important;
  margin: 0 auto 24px !important;
  padding: 0 !important;
  background: var(--tc-modal-bg);
  border: 1px solid var(--tc-modal-border);
  border-radius: var(--tc-modal-radius);
  box-shadow: var(--tc-modal-shadow);
  overflow: hidden;
  outline: none;
  text-align: left;
}

#creator-modal-root .unique-modal-body {
  padding: 0 !important;
  margin: 0;
}

#creator-modal-root .unique-modal-body > .tc-modal {
  width: 100%;
  position: relative;
  padding-bottom: var(--tc-modal-pad-bottom);
}

/* Header band + avatar overlap (avatar sits on hero/body seam) */
#creator-modal-root .tc-modal-header {
  position: relative;
  z-index: 2;
  margin-bottom: calc(var(--tc-avatar-size) / 2 + 6px);
}

#creator-modal-root .tc-modal-hero {
  position: relative;
  height: var(--tc-hero-height);
  background: var(--tc-hero-bg);
  overflow: hidden;
}

.tc-modal-hero-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  right: -40px;
  top: -60px;
  background: radial-gradient(circle, rgba(34, 201, 165, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.tc-modal-hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}


#creator-modal-root .tc-modal-header .tc-modal-close,
#creator-modal-root .tc-modal-header .unique-close,
.tc-modal-close,
#creator-modal-root .unique-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 12;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--tc-btn-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tc-modal-close:hover,
#creator-modal-root .unique-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

#creator-modal-root .tc-modal-avatar-zone {
  position: absolute !important;
  left: var(--tc-modal-pad-x);
  bottom: 0;
  transform: translateY(50%);
  z-index: 20;
  display: block;
  width: var(--tc-avatar-size);
  height: var(--tc-avatar-size);
  margin: 0;
  padding: 0;
  pointer-events: none;
}

#creator-modal-root .tc-modal-avatar-frame {
  position: relative;
  width: var(--tc-avatar-size) !important;
  height: var(--tc-avatar-size) !important;
  border: 3px solid var(--tc-modal-bg);
  border-radius: 50% !important;
  overflow: visible;
  background: #e8e6e1;
  box-shadow: none;
  pointer-events: auto;
  flex-shrink: 0;
}

#creator-modal-root .tc-modal-avatar-img,
#creator-modal-root .tc-modal-avatar-frame img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  object-fit: cover;
  display: block;
  border-radius: 50% !important;
}

#creator-modal-root .tc-modal-verified-dot {
  position: absolute;
  right: 4px;
  bottom: 8px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #22c55e;
  border: 3px solid var(--tc-modal-bg);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  pointer-events: none;
}

#creator-modal-root .tc-modal-verified-dot i {
  font-size: 12px;
  font-weight: 900;
}

#creator-modal-root .tc-modal-identity {
  position: relative;
  z-index: 1;
  padding: 16px var(--tc-modal-pad-x) 20px;
}

.tc-modal-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--tc-text-primary);
  line-height: 1.25;
}

#creator-modal-root .tc-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 400;
  color: #888;
  line-height: 1.35;
}

#creator-modal-root .tc-modal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #888;
}

#creator-modal-root .tc-modal-meta-item i {
  font-size: 11px;
  color: #9ca3af;
}

#creator-modal-root .tc-modal-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6dd4b8;
  flex-shrink: 0;
}

.tc-modal-bio-wrap {
  padding: 0 var(--tc-modal-pad-x) 16px;
}

.tc-modal-bio-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--tc-text-secondary);
}

/* Reset global button {} from base-styles.css — plain text link */
.tc-modal-bio-toggle,
#creator-modal-root .tc-modal-bio-toggle {
  display: inline !important;
  margin-top: 8px;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: var(--tc-text-secondary) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.tc-modal-bio-toggle:hover,
#creator-modal-root .tc-modal-bio-toggle:hover {
  background: none !important;
  background-color: transparent !important;
  color: var(--tc-text-primary) !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

.tc-modal-bio-toggle:focus-visible {
  outline: 2px solid var(--tc-teal);
  outline-offset: 2px;
  border-radius: 2px;
}

.tc-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 var(--tc-modal-pad-x) 16px;
}

.tc-modal-tag {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tc-text-secondary);
  background: #f3f2ef;
  border: 1px solid var(--tc-modal-border);
  padding: 4px 8px;
  border-radius: var(--tc-element-radius);
}

.tc-modal-own-actions,
.tc-modal-other-actions {
  padding: 0 var(--tc-modal-pad-x) 8px;
  margin-top: 0;
}

.tc-modal-viewers-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--tc-modal-border);
  background: #fafaf8;
  cursor: pointer;
  border-radius: var(--tc-btn-radius);
}

.tc-modal-viewers-strip:hover {
  background: #f3f2ef;
}

.tc-modal-av-stack {
  display: flex;
  flex-shrink: 0;
}

.tc-modal-av-pip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fafaf8;
  margin-left: -8px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tc-modal-av-stack .tc-modal-av-pip:first-child {
  margin-left: 0;
}

.tc-modal-vs-text {
  flex: 1;
  min-width: 0;
}

.tc-modal-vs-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--tc-text-primary);
}

.tc-modal-vs-sub {
  font-size: 12px;
  color: var(--tc-text-muted);
  margin-top: 2px;
}

.tc-modal-vs-arrow {
  color: var(--tc-text-muted);
  font-size: 12px;
}

.tc-modal-btn-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--tc-modal-border);
  background: #fff;
  color: var(--tc-text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--tc-btn-radius);
  text-decoration: none;
}

.tc-modal-btn-edit:hover {
  background: #f8f8f6;
}

.tc-modal-btn-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

/* Action buttons — layout only; appearance matches creators.css shared modal CTAs */
#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions {
  display: block !important;
  margin-top: 0 !important;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .tc-modal-btn-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 0;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .tc-modal-btn-row--three > * {
  flex: 1 1 0;
  min-width: 0;
  width: auto !important;
  white-space: nowrap;
}

/* Restore creators.css button look (loaded before this file) */
#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .message-user-btn,
#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .trigger-collaboration-modal,
#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .collaborator-status-btn,
#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .tc-modal-btn-outline,
#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .tc-modal-btn-outline-wide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 8px 14px;
  min-height: 34px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .message-user-btn:hover,
#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .trigger-collaboration-modal:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #111827;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .message-user-btn i,
#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .trigger-collaboration-modal i {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .message-user-btn:hover i,
#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .trigger-collaboration-modal:hover i {
  color: #03a5ff;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .remove-connection-trigger,
#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .tc-modal-btn-connected {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 8px 14px;
  min-height: 34px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--tc-connected-fg);
  background: var(--tc-connected-bg);
  border: 1px solid var(--tc-connected-border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .remove-connection-trigger i,
#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .tc-modal-btn-connected i {
  color: var(--tc-connected-icon);
  font-size: 13px;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .remove-connection-trigger:hover {
  background: #fff;
  border-color: #fca5a5;
  color: #b91c1c;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .remove-connection-trigger:hover i {
  color: #ef4444;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .collaborator-status-btn:disabled {
  opacity: 1;
  cursor: default;
  box-shadow: none;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .collaborator-status-btn.confirmed:disabled {
  color: var(--tc-connected-fg);
  background: var(--tc-connected-bg);
  border-color: var(--tc-connected-border);
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .collaborator-status-btn.confirmed:disabled i {
  color: var(--tc-connected-icon);
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .collaborator-status-btn.pending:disabled {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .collaborator-status-btn.pending:disabled i {
  color: #d97706;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .collaborator-status-btn.declined:disabled {
  color: #9f1239;
  background: #fff1f2;
  border-color: #fecdd3;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .collaborator-status-btn.declined:disabled i {
  color: #f43f5e;
}

/* Connect / pending / accept — connect-action-wrapper (dashboard loads this file, not creators.css) */
#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper .modal-connect-button,
#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper .modal-connect-actions {
  width: 100%;
  box-sizing: border-box;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper .modal-connect-button,
#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper a.modal-connect-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 10px 16px;
  min-height: 40px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper .modal-connect-button i {
  font-size: 13px;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper .modal-connect-button.connect-request:hover,
#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper a.modal-connect-button.connect-request:hover {
  background: #f0f9ff;
  border-color: #7dd3fc;
  color: #0369a1;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper .modal-connect-button.pending,
#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper span.modal-connect-button.pending {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper .modal-connect-button.pending i {
  color: #d97706;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper .modal-connect-actions {
  display: flex;
  gap: 8px;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper .modal-connect-button.accept-request {
  flex: 1;
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper .modal-connect-button.accept-request:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper .modal-connect-button.accept-request i {
  color: #22c55e;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper .modal-connect-button.reject-request {
  flex: 1;
  color: #6b7280;
  background: #fff;
}

#creator-modal-root.unique-user-modal .tc-modal-other-actions .connect-action-wrapper .modal-connect-button.reject-request:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
}

.tc-modal-other-actions .modal-connected-button,
.tc-modal-other-actions .modal-connected-button > * {
  width: 100%;
}

.tc-modal-other-actions .connect-action-wrapper {
  margin-top: 10px;
}

/* Post-connection / recent-views nudge */
#creator-modal-root .tc-modal-connected-nudge {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  box-sizing: border-box;
}

#creator-modal-root .tc-modal-connected-nudge__text {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #0f172a;
}

#creator-modal-root .tc-modal-connected-nudge__dismiss {
  flex-shrink: 0;
  margin: 0;
  padding: 4px 0 4px 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

#creator-modal-root .tc-modal-connected-nudge__dismiss:hover {
  color: #334155;
}

.tc-modal-profiles-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 32px var(--tc-modal-pad-x) 32px;
}

.tc-modal-profiles-line {
  flex: 1;
  height: 1px;
  background: var(--tc-modal-border);
}

.tc-modal-profiles-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tc-text-muted);
}

.tc-modal-profiles-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 0 var(--tc-modal-pad-x) 24px;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--tc-modal-pad-x);
  -webkit-overflow-scrolling: touch;
}

.tc-modal-p-card {
  flex: 0 0 240px;
  min-height: 220px;
  scroll-snap-align: start;
  border: 1px solid var(--tc-modal-border);
  border-radius: var(--tc-card-radius);
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.tc-modal-p-card:not(.tc-modal-p-card--locked):hover {
  border-color: #d5d2cb;
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.08);
  transform: translateY(-1px);
}

/* Desktop: grid when 2–4 profiles fit comfortably in the modal */
@media (min-width: 769px) {
  .tc-modal-profiles-scroll[data-profile-count="1"] {
    display: grid;
    grid-template-columns: minmax(0, 272px);
    justify-content: center;
    overflow: visible;
    gap: 0;
  }

  .tc-modal-profiles-scroll[data-profile-count="2"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    overflow: visible;
  }

  .tc-modal-profiles-scroll[data-profile-count="3"] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    overflow: visible;
  }

  .tc-modal-profiles-scroll[data-profile-count="4"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    overflow: visible;
  }

  .tc-modal-profiles-scroll[data-profile-count="1"] .tc-modal-p-card,
  .tc-modal-profiles-scroll[data-profile-count="2"] .tc-modal-p-card,
  .tc-modal-profiles-scroll[data-profile-count="3"] .tc-modal-p-card,
  .tc-modal-profiles-scroll[data-profile-count="4"] .tc-modal-p-card {
    flex: none;
    width: 100%;
    min-width: 0;
    scroll-snap-align: none;
  }

  .tc-modal-profiles-scroll[data-profile-count="5"],
  .tc-modal-profiles-scroll[data-profile-count="6"],
  .tc-modal-profiles-scroll[data-profile-count="7"],
  .tc-modal-profiles-scroll[data-profile-count="8"] {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 28px;
  }

  .tc-modal-profiles-scroll[data-profile-count="5"] .tc-modal-p-card,
  .tc-modal-profiles-scroll[data-profile-count="6"] .tc-modal-p-card,
  .tc-modal-profiles-scroll[data-profile-count="7"] .tc-modal-p-card,
  .tc-modal-profiles-scroll[data-profile-count="8"] .tc-modal-p-card {
    flex: 0 0 clamp(200px, 36vw, 248px);
    scroll-snap-align: center;
  }
}

/* Locked until viewer is connected (matches unique-profile-card-wrapper) */
.tc-modal-p-card--locked {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.tc-modal-p-card--locked::after {
  content: "\f023";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  font-size: 14px;
  color: #000;
  background: #fff;
  border: 1px solid #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.tc-modal-p-cover {
  position: relative;
  height: 110px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.tc-modal-p-avatar-wrap {
  position: absolute;
  left: 12px;
  bottom: -18px;
}

.tc-modal-p-avatar-inner {
  width: 44px;
  height: 44px;
  border: 2px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  background: #e8e6e1;
}

.tc-modal-p-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.tc-modal-p-body {
  flex: 1;
  padding: 30px 16px 18px;
}

.tc-modal-p-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--tc-text-primary);
  line-height: 1.3;
}

#creator-modal-root .tc-modal-p-name {
  font-size: 15px !important;
}

.tc-modal-p-niche {
  font-size: 12px;
  color: var(--tc-text-muted);
  margin-top: 2px;
}

.tc-modal-p-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--tc-text-secondary);
}

/* Viewers drawer (appended to body — define tokens here, not only on #creator-modal-root) */
.tc-modal-drawer-overlay {
  --tc-modal-width: 760px;
  --tc-modal-bg: #fff;
  --tc-modal-border: #E0DDD6;
  --tc-text-primary: #111;
  --tc-text-secondary: #555;
  --tc-text-muted: #AAA;

  display: flex;
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(14, 17, 22, 0.45);
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

body.tc-viewers-drawer-open {
  overflow: hidden;
}

.tc-modal-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tc-modal-drawer {
  width: 100%;
  max-width: min(var(--tc-modal-width), calc(100vw - 32px));
  max-height: 85vh;
  background: var(--tc-modal-bg);
  border-radius: 12px 12px 0 0;
  padding: 16px 0 calc(32px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12);
  transform: translate3d(0, 100%, 0);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}

.tc-modal-drawer-overlay.is-open .tc-modal-drawer {
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .tc-modal-drawer-overlay,
  .tc-modal-drawer {
    transition: none !important;
  }
}

.tc-modal-drawer-notch {
  width: 40px;
  height: 4px;
  background: var(--tc-modal-border);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.tc-modal-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 12px;
}

.tc-modal-drawer-title {
  font-size: 18px;
  font-weight: 600;
}

.tc-modal-drawer-close {
  border: none;
  background: none !important;
  font-size: 13px;
  font-weight: 600;
  color: var(--tc-text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  text-decoration: none;
  transition: color 0.15s ease;
}

.tc-modal-drawer-close:hover,
.tc-modal-drawer-close:focus-visible {
  background: transparent !important;
  color: var(--tc-text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tc-modal-drawer-close:focus-visible {
  outline: none;
}

.tc-modal-drawer-sub {
  padding: 0 24px 20px;
  font-size: 13px;
  color: var(--tc-text-muted);
}

.tc-modal-drawer-list {
  overflow-y: auto;
  padding: 0 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tc-modal-d-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
}

.tc-modal-d-row--clickable {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.tc-modal-d-row--clickable:hover {
  background: #f3f2ef;
}

.tc-modal-d-row--clickable:focus-visible {
  outline: 2px solid var(--tc-teal);
  outline-offset: 2px;
}

.tc-modal-d-av-wrap {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.tc-modal-d-av-wrap .tc-modal-d-av {
  width: 40px;
  height: 40px;
}

.tc-modal-d-connected-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 2;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--tc-modal-bg);
  color: #fff;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.tc-modal-d-body {
  flex: 1;
  min-width: 0;
}

.tc-modal-d-time-wrap {
  flex-shrink: 0;
  text-align: right;
}

.tc-modal-d-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.tc-modal-d-av--photo,
.tc-modal-av-pip--photo {
  background: #e8e6e1;
  padding: 0;
}

.tc-modal-d-av img,
.tc-modal-av-pip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.tc-modal-av-pip--photo {
  border: 2px solid #fafaf8;
}

.tc-modal-d-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--tc-text-primary);
}

.tc-modal-d-niche {
  font-size: 12px;
  color: var(--tc-text-muted);
  margin-top: 2px;
}

.tc-modal-d-time {
  font-size: 12px;
  color: var(--tc-text-muted);
}

/* Beat base-styles.css (.unique-modal-content { width:90%; padding:34px }) */
#creator-modal-root.unique-user-modal > .unique-modal-content.tc-modal {
  width: min(760px, calc(100vw - 32px)) !important;
  max-width: 760px !important;
  padding: 0 !important;
}

#creator-modal-root .tc-modal-identity {
  padding: 16px 28px 20px !important;
}

#creator-modal-root .tc-modal-bio-wrap,
#creator-modal-root .tc-modal-tags {
  padding-left: 28px !important;
  padding-right: 28px !important;
}

#creator-modal-root .tc-modal-bio-wrap {
  padding-bottom: 16px !important;
}

#creator-modal-root .tc-modal-tags {
  padding-bottom: 16px !important;
}

#creator-modal-root .tc-modal-own-actions,
#creator-modal-root .tc-modal-other-actions {
  padding-left: 28px !important;
  padding-right: 28px !important;
  padding-bottom: 0 !important;
}

#creator-modal-root .tc-modal-profiles-head {
  padding: 32px 28px 32px !important;
}

#creator-modal-root .tc-modal-profiles-scroll {
  padding-left: 28px !important;
  padding-right: 28px !important;
  padding-bottom: 24px !important;
}

#creator-modal-root .unique-modal-body > .tc-modal {
  padding-bottom: 48px !important;
}

#creator-modal-root .tc-modal-avatar-zone {
  left: 28px !important;
}

#creator-modal-root .tc-modal-bio-text {
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: var(--tc-text-secondary) !important;
}

/* Loading state (shown while profile API fetch is in flight) */
#creator-modal-root.is-loading .unique-modal-content {
  cursor: wait;
}

body.tc-user-modal-opening {
  cursor: wait;
}

#creator-modal-root.is-loading .tc-modal-header {
  margin-bottom: 0;
}

.tc-modal--loading .tc-modal-hero {
  background: var(--tc-hero-bg);
}

.tc-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 48px var(--tc-modal-pad-x) 56px;
  min-height: 200px;
}

#creator-modal-root .tc-modal-loading .spinner {
  display: block;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  border: 3px solid #d9e8f3;
  border-top-color: #03a5ff;
  border-radius: 50%;
  animation: tc-modal-connect-spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes tc-modal-connect-spin {
  to { transform: rotate(360deg); }
}

.tc-modal-loading-text {
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--tc-text-muted);
  text-align: center;
}

/* Mobile: near full-screen sheet, scrollable body, stacked action buttons */
@media (max-width: 768px) {
  #creator-modal-root.unique-user-modal {
    --tc-modal-pad-x: 20px;
    --tc-avatar-size: 112px;
    --tc-hero-height: 108px;
    --tc-modal-pad-bottom: 28px;
    padding: 0;
    align-items: flex-end;
    justify-content: flex-end;
  }

  #creator-modal-root.unique-user-modal > .unique-modal-content.tc-modal,
  #creator-modal-root.unique-user-modal .unique-modal-content.tc-modal {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: min(96svh, 96dvh) !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-radius: 14px 14px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
  }

  #creator-modal-root .unique-modal-body {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    flex: 1 1 auto;
    min-height: 0;
    max-height: inherit;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  #creator-modal-root .tc-modal-header {
    margin-bottom: calc(var(--tc-avatar-size) / 2 + 4px);
  }

  #creator-modal-root .tc-modal-name {
    font-size: 20px;
  }

  #creator-modal-root .tc-modal-header .tc-modal-close,
  #creator-modal-root .tc-modal-header .unique-close {
    top: max(10px, env(safe-area-inset-top, 0px));
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  #creator-modal-root .tc-modal-avatar-zone {
    left: var(--tc-modal-pad-x) !important;
  }

  #creator-modal-root .tc-modal-verified-dot {
    width: 28px;
    height: 28px;
    font-size: 11px;
    right: 2px;
    bottom: 6px;
  }

  #creator-modal-root .tc-modal-other-actions .tc-modal-btn-row,
  #creator-modal-root .tc-modal-other-actions .tc-modal-btn-row--three {
    flex-direction: column;
    gap: 8px;
  }

  #creator-modal-root.unique-user-modal .tc-modal-other-actions .tc-modal-btn-row--three > *,
  #creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .tc-modal-btn-row > * {
    flex: none !important;
    width: 100% !important;
    min-height: 44px;
    padding: 12px 16px !important;
    font-size: 13px !important;
    white-space: nowrap;
    justify-content: center;
  }

  #creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .message-user-btn i,
  #creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .trigger-collaboration-modal i,
  #creator-modal-root.unique-user-modal .tc-modal-other-actions .modal-connected-actions .remove-connection-trigger i {
    font-size: 13px !important;
  }

  #creator-modal-root .tc-modal-other-actions .connect-action-wrapper .modal-connect-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  #creator-modal-root .tc-modal-other-actions .connect-action-wrapper .modal-connect-button,
  #creator-modal-root .tc-modal-other-actions .connect-action-wrapper a {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    box-sizing: border-box;
  }

  #creator-modal-root .tc-modal-btn-edit {
    min-height: 44px;
  }

  #creator-modal-root .tc-modal-viewers-strip {
    min-height: 44px;
  }

  #creator-modal-root .tc-modal-profiles-scroll {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: visible;
    scroll-snap-type: none;
    gap: 16px;
    padding-left: var(--tc-modal-pad-x);
    padding-right: var(--tc-modal-pad-x);
    padding-bottom: 20px;
  }

  #creator-modal-root .tc-modal-p-card {
    flex: none;
    width: 100%;
    max-width: 100%;
    scroll-snap-align: none;
    transform: none;
  }

  #creator-modal-root .tc-modal-p-card:not(.tc-modal-p-card--locked):hover {
    transform: none;
  }

  #creator-modal-root .tc-modal-profiles-head {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  #creator-modal-root .unique-modal-body > .tc-modal {
    padding-bottom: calc(var(--tc-modal-pad-bottom) + env(safe-area-inset-bottom, 0px)) !important;
  }

  .tc-modal-drawer {
    max-height: 90svh;
    border-radius: 14px 14px 0 0;
  }
}

@media (max-width: 380px) {
  #creator-modal-root.unique-user-modal {
    --tc-avatar-size: 100px;
  }

  #creator-modal-root.unique-user-modal .tc-modal-other-actions .tc-modal-btn-row--three > * {
    font-size: 12px !important;
    padding: 11px 12px !important;
  }
}
