/* 星河引力 · 基础团队协作独立资产。所有选择器带 xh-collab 前缀，避免污染现有 bundle。 */
:root {
  --xh-c-bg: #060b16;
  --xh-c-bg-soft: #0b1322;
  --xh-c-card: rgba(16, 27, 46, 0.86);
  --xh-c-card-strong: #111d31;
  --xh-c-card-hover: #16253d;
  --xh-c-line: rgba(143, 175, 220, 0.15);
  --xh-c-line-strong: rgba(143, 175, 220, 0.28);
  --xh-c-text: #f0f5ff;
  --xh-c-text-soft: #9cadc8;
  --xh-c-text-muted: #71839f;
  --xh-c-cyan: #6ce9ff;
  --xh-c-cyan-strong: #31c8e7;
  --xh-c-purple: #a78bfa;
  --xh-c-green: #58e6ae;
  --xh-c-amber: #f4c66d;
  --xh-c-red: #ff829b;
  --xh-c-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --xh-c-radius: 20px;
  --xh-c-font: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html.xh-collaboration-active,
html.xh-collaboration-active body {
  min-height: 100%;
  background: var(--xh-c-bg);
}

html.xh-collaboration-active body {
  margin: 0;
  color: var(--xh-c-text);
  font-family: var(--xh-c-font);
}

html.xh-collaboration-active #root {
  display: none !important;
}

#xh-collaboration-root,
#xh-collaboration-root * {
  box-sizing: border-box;
}

#xh-collaboration-root {
  min-height: 100vh;
  color: var(--xh-c-text);
  font-family: var(--xh-c-font);
  background:
    radial-gradient(ellipse 85% 70% at 86% -8%, rgba(74, 127, 255, 0.16), transparent 63%),
    radial-gradient(ellipse 70% 60% at 4% 6%, rgba(39, 203, 221, 0.09), transparent 66%),
    linear-gradient(145deg, #050914 0%, #091221 48%, #060b16 100%);
  isolation: isolate;
}

#xh-collaboration-root::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background-image: radial-gradient(rgba(151, 184, 228, 0.25) 0.7px, transparent 0.7px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.xh-collab-app {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px clamp(16px, 3vw, 42px) 48px;
}

.xh-collab-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 46px;
  margin-bottom: clamp(26px, 4vw, 54px);
}

.xh-collab-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--xh-c-text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.xh-collab-brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(108, 233, 255, 0.45);
  border-radius: 10px;
  color: #dbfbff;
  font-size: 14px;
  background: linear-gradient(145deg, rgba(80, 219, 238, 0.24), rgba(147, 106, 255, 0.32));
  box-shadow: 0 0 24px rgba(70, 215, 242, 0.18);
}

.xh-collab-brand-sub {
  display: block;
  margin-top: 2px;
  color: var(--xh-c-text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.xh-collab-top-actions,
.xh-collab-inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.xh-collab-btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--xh-c-line-strong);
  border-radius: 11px;
  color: var(--xh-c-text-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  background: rgba(20, 34, 56, 0.72);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.xh-collab-btn:hover:not(:disabled) {
  border-color: rgba(108, 233, 255, 0.52);
  color: var(--xh-c-text);
  background: rgba(28, 50, 80, 0.9);
  transform: translateY(-1px);
}

.xh-collab-btn:focus-visible,
.xh-collab-project-btn:focus-visible,
.xh-collab-tab:focus-visible,
.xh-collab-link:focus-visible,
.xh-collab-entry:focus-visible {
  outline: 2px solid var(--xh-c-cyan);
  outline-offset: 3px;
}

.xh-collab-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.xh-collab-btn-primary {
  border-color: rgba(108, 233, 255, 0.42);
  color: #06121d;
  background: linear-gradient(115deg, #6ce9ff, #a3c4ff 52%, #bea0ff);
  box-shadow: 0 8px 24px rgba(75, 199, 237, 0.17);
}

.xh-collab-btn-primary:hover:not(:disabled) {
  border-color: rgba(221, 249, 255, 0.92);
  color: #06121d;
  background: linear-gradient(115deg, #9cf1ff, #c2d8ff 52%, #d1baff);
}

.xh-collab-btn-danger {
  border-color: rgba(255, 130, 155, 0.24);
  color: #ffb0c0;
  background: rgba(107, 31, 58, 0.24);
}

.xh-collab-btn-quiet {
  min-height: 32px;
  padding: 6px 10px;
  border-color: transparent;
  background: transparent;
}

.xh-collab-btn-small {
  min-height: 31px;
  padding: 5px 10px;
  font-size: 12px;
}

.xh-collab-eyebrow {
  margin: 0 0 10px;
  color: var(--xh-cyan, var(--xh-c-cyan));
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.xh-collab-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.xh-collab-hero h1 {
  margin: 0;
  color: #f8fbff;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.xh-collab-hero p {
  max-width: 590px;
  margin: 14px 0 0;
  color: var(--xh-c-text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.xh-collab-hero-note {
  flex: 0 0 auto;
  max-width: 250px;
  padding: 13px 16px;
  border: 1px solid rgba(108, 233, 255, 0.16);
  border-radius: 14px;
  color: #bdeef7;
  font-size: 12px;
  line-height: 1.6;
  background: rgba(21, 57, 74, 0.28);
}

.xh-collab-layout {
  display: grid;
  grid-template-columns: minmax(230px, 286px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.xh-collab-sidebar,
.xh-collab-panel,
.xh-collab-stat,
.xh-collab-empty,
.xh-collab-login-card {
  border: 1px solid var(--xh-c-line);
  border-radius: var(--xh-c-radius);
  background: linear-gradient(145deg, rgba(17, 29, 49, 0.92), rgba(9, 17, 31, 0.88));
  box-shadow: var(--xh-c-shadow);
}

.xh-collab-sidebar {
  position: sticky;
  top: 16px;
  min-height: 520px;
  padding: 17px 12px 13px;
}

.xh-collab-sidebar-head,
.xh-collab-panel-head,
.xh-collab-section-head,
.xh-collab-list-row,
.xh-collab-share-line,
.xh-collab-member-line,
.xh-collab-audit-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.xh-collab-sidebar-head {
  padding: 2px 7px 14px;
}

.xh-collab-sidebar-head h2,
.xh-collab-panel-head h2,
.xh-collab-section-head h3 {
  margin: 0;
  color: var(--xh-c-text);
  font-size: 15px;
  font-weight: 720;
}

.xh-collab-muted {
  color: var(--xh-c-text-muted);
  font-size: 12px;
}

.xh-collab-project-list {
  display: grid;
  gap: 5px;
}

.xh-collab-project-btn {
  display: block;
  width: 100%;
  padding: 12px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--xh-c-text-soft);
  font: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.xh-collab-project-btn:hover {
  border-color: var(--xh-c-line);
  background: rgba(25, 45, 73, 0.58);
}

.xh-collab-project-btn[aria-current="true"] {
  border-color: rgba(108, 233, 255, 0.3);
  color: var(--xh-c-text);
  background: linear-gradient(105deg, rgba(38, 98, 117, 0.38), rgba(55, 49, 107, 0.32));
  box-shadow: inset 3px 0 0 var(--xh-c-cyan);
}

.xh-collab-project-name {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xh-collab-project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-top: 7px;
}

.xh-collab-role,
.xh-collab-status,
.xh-collab-count,
.xh-collab-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.xh-collab-role-owner { color: #d9c9ff; background: rgba(151, 107, 255, 0.19); }
.xh-collab-role-reviewer { color: #a9ecff; background: rgba(56, 181, 212, 0.17); }
.xh-collab-role-commenter { color: #c5f5d8; background: rgba(63, 194, 142, 0.17); }
.xh-collab-role-viewer { color: #bfccdf; background: rgba(140, 157, 184, 0.17); }

.xh-collab-status-draft { color: var(--xh-c-text-soft); background: rgba(130, 148, 177, 0.18); }
.xh-collab-status-pending { color: #b9efff; background: rgba(45, 187, 217, 0.19); }
.xh-collab-status-approved { color: #aef5d1; background: rgba(56, 199, 137, 0.2); }
.xh-collab-status-changes_requested { color: #ffdba0; background: rgba(231, 161, 55, 0.2); }
.xh-collab-status-open { color: #b9efff; background: rgba(45, 187, 217, 0.19); }
.xh-collab-status-resolved { color: #afc4bc; background: rgba(85, 135, 113, 0.18); }

.xh-collab-content {
  min-width: 0;
}

.xh-collab-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.xh-collab-stat {
  min-height: 102px;
  padding: 16px;
}

.xh-collab-stat-label {
  display: block;
  color: var(--xh-c-text-muted);
  font-size: 12px;
}

.xh-collab-stat-value {
  display: block;
  margin-top: 9px;
  color: #f5fbff;
  font-size: 28px;
  font-weight: 760;
  letter-spacing: -0.04em;
}

.xh-collab-panel {
  overflow: hidden;
}

.xh-collab-panel-head {
  padding: 22px 24px 18px;
}

.xh-collab-panel-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.xh-collab-panel-head h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
}

.xh-collab-panel-subtitle {
  margin: 6px 0 0;
  color: var(--xh-c-text-muted);
  font-size: 12px;
}

.xh-collab-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 16px;
  border-top: 1px solid var(--xh-c-line);
  border-bottom: 1px solid var(--xh-c-line);
  scrollbar-width: thin;
}

.xh-collab-tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 12px 12px 10px;
  border: 0;
  color: var(--xh-c-text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
}

.xh-collab-tab::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  content: "";
  background: transparent;
}

.xh-collab-tab:hover,
.xh-collab-tab[aria-selected="true"] {
  color: var(--xh-c-text);
}

.xh-collab-tab[aria-selected="true"]::after {
  background: linear-gradient(90deg, var(--xh-c-cyan), var(--xh-c-purple));
}

.xh-collab-panel-body {
  min-height: 380px;
  padding: 22px 24px 26px;
}

.xh-collab-section {
  display: grid;
  gap: 16px;
}

.xh-collab-section-head {
  align-items: flex-start;
}

.xh-collab-section-head p {
  margin: 5px 0 0;
  color: var(--xh-c-text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.xh-collab-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.xh-collab-quick-card {
  display: flex;
  min-height: 100px;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--xh-c-line);
  border-radius: 15px;
  background: rgba(9, 20, 36, 0.58);
}

.xh-collab-quick-card strong {
  color: var(--xh-c-text);
  font-size: 14px;
}

.xh-collab-quick-card span {
  color: var(--xh-c-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.xh-collab-form {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--xh-c-line);
  border-radius: 16px;
  background: rgba(8, 18, 32, 0.48);
}

.xh-collab-form-title {
  margin: 0;
  color: var(--xh-c-text);
  font-size: 13px;
  font-weight: 720;
}

.xh-collab-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.xh-collab-field {
  display: grid;
  gap: 7px;
}

.xh-collab-field-full {
  grid-column: 1 / -1;
}

.xh-collab-field label,
.xh-collab-label {
  color: var(--xh-c-text-soft);
  font-size: 12px;
  font-weight: 650;
}

.xh-collab-input,
.xh-collab-select,
.xh-collab-textarea {
  width: 100%;
  border: 1px solid var(--xh-c-line-strong);
  border-radius: 10px;
  outline: none;
  color: var(--xh-c-text);
  font: inherit;
  font-size: 13px;
  background: rgba(4, 12, 24, 0.7);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.xh-collab-input,
.xh-collab-select {
  height: 40px;
  padding: 8px 11px;
}

.xh-collab-textarea {
  min-height: 98px;
  padding: 10px 11px;
  resize: vertical;
}

.xh-collab-input::placeholder,
.xh-collab-textarea::placeholder {
  color: #5f718e;
}

.xh-collab-input:focus,
.xh-collab-select:focus,
.xh-collab-textarea:focus {
  border-color: rgba(108, 233, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(108, 233, 255, 0.12);
}

.xh-collab-select option {
  color: #f0f5ff;
  background: #101c2f;
}

.xh-collab-helper {
  margin: -5px 0 0;
  color: var(--xh-c-text-muted);
  font-size: 11px;
  line-height: 1.55;
}

.xh-collab-list {
  display: grid;
  gap: 8px;
}

.xh-collab-member-line,
.xh-collab-share-line,
.xh-collab-audit-line {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--xh-c-line);
  border-radius: 13px;
  background: rgba(9, 19, 34, 0.55);
}

.xh-collab-member-person,
.xh-collab-audit-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.xh-collab-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(108, 233, 255, 0.24);
  border-radius: 50%;
  color: #bff5ff;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(145deg, rgba(61, 184, 210, 0.34), rgba(126, 102, 220, 0.35));
}

.xh-collab-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.xh-collab-person-copy {
  min-width: 0;
}

.xh-collab-person-copy strong {
  display: block;
  overflow: hidden;
  color: var(--xh-c-text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xh-collab-person-copy span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--xh-c-text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xh-collab-member-tools,
.xh-collab-share-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.xh-collab-member-tools .xh-collab-select {
  width: 118px;
  height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

.xh-collab-comment {
  padding: 15px;
  border: 1px solid var(--xh-c-line);
  border-radius: 15px;
  background: rgba(9, 19, 34, 0.55);
}

.xh-collab-comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.xh-collab-comment-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--xh-c-text-soft);
  font-size: 12px;
  font-weight: 650;
}

.xh-collab-comment-author .xh-collab-avatar {
  width: 26px;
  height: 26px;
  font-size: 10px;
}

.xh-collab-comment-body {
  margin: 12px 0 10px;
  color: #d7e2f1;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.xh-collab-comment-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 9px;
  color: var(--xh-c-text-muted);
  font-size: 11px;
}

.xh-collab-anchor {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 7px;
  color: #b8eaf2;
  background: rgba(50, 174, 199, 0.12);
}

.xh-collab-review-card {
  display: grid;
  gap: 16px;
  padding: 19px;
  border: 1px solid var(--xh-c-line);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(19, 40, 62, 0.68), rgba(30, 22, 59, 0.5));
}

.xh-collab-review-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.xh-collab-review-status strong {
  color: var(--xh-c-text);
  font-size: 16px;
}

.xh-collab-note {
  margin: 0;
  padding: 12px 13px;
  border-left: 2px solid var(--xh-c-cyan);
  color: var(--xh-c-text-soft);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  background: rgba(7, 20, 33, 0.48);
}

.xh-collab-binding {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.xh-collab-binding-item {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--xh-c-line);
  border-radius: 10px;
  background: rgba(5, 14, 26, 0.44);
}

.xh-collab-binding-item span,
.xh-collab-binding-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xh-collab-binding-item span {
  color: var(--xh-c-text-muted);
  font-size: 10px;
}

.xh-collab-binding-item strong {
  margin-top: 5px;
  color: var(--xh-c-text-soft);
  font-size: 12px;
}

.xh-collab-share-secret {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(108, 233, 255, 0.28);
  border-radius: 13px;
  background: rgba(19, 66, 83, 0.24);
}

.xh-collab-share-secret p {
  margin: 0;
  color: #c5f5fc;
  font-size: 12px;
  line-height: 1.6;
}

.xh-collab-share-url {
  display: flex;
  align-items: center;
  gap: 8px;
}

.xh-collab-share-url code {
  display: block;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  padding: 9px 10px;
  border: 1px solid rgba(108, 233, 255, 0.18);
  border-radius: 9px;
  color: #e0fbff;
  font: 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(5, 20, 31, 0.6);
}

.xh-collab-audit-line {
  align-items: flex-start;
}

.xh-collab-audit-copy {
  min-width: 0;
  flex: 1;
}

.xh-collab-audit-copy strong,
.xh-collab-audit-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xh-collab-audit-copy strong {
  color: var(--xh-c-text-soft);
  font-size: 12px;
}

.xh-collab-audit-copy span {
  margin-top: 5px;
  color: var(--xh-c-text-muted);
  font-size: 11px;
}

.xh-collab-audit-details {
  max-width: 45%;
  overflow: hidden;
  color: var(--xh-c-text-muted);
  font: 10px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xh-collab-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 22px;
  color: var(--xh-c-text-muted);
  font-size: 13px;
  text-align: center;
  background: rgba(8, 18, 32, 0.42);
  box-shadow: none;
}

.xh-collab-error,
.xh-collab-success {
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.55;
}

.xh-collab-error {
  border: 1px solid rgba(255, 130, 155, 0.28);
  color: #ffc0cb;
  background: rgba(111, 34, 58, 0.26);
}

.xh-collab-success {
  border: 1px solid rgba(88, 230, 174, 0.25);
  color: #bcf4d7;
  background: rgba(35, 110, 83, 0.24);
}

.xh-collab-spinner {
  width: 19px;
  height: 19px;
  border: 2px solid rgba(188, 230, 241, 0.18);
  border-top-color: var(--xh-c-cyan);
  border-radius: 50%;
  animation: xh-collab-spin 760ms linear infinite;
}

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

.xh-collab-loading {
  display: flex;
  min-height: 240px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: var(--xh-c-text-muted);
  font-size: 13px;
}

.xh-collab-login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.xh-collab-login-card {
  width: min(500px, 100%);
  padding: 35px;
  text-align: center;
}

.xh-collab-login-card h1 {
  margin: 18px 0 10px;
  font-size: 27px;
  letter-spacing: -0.035em;
}

.xh-collab-login-card p {
  margin: 0 0 24px;
  color: var(--xh-c-text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.xh-collab-login-card .xh-collab-btn {
  width: 100%;
}

.xh-collab-share-page {
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 52px) 56px;
}

.xh-collab-share-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(22px, 5vw, 64px);
  align-items: center;
  min-height: 62vh;
}

.xh-collab-share-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--xh-c-cyan);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.xh-collab-share-kicker::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
  background: var(--xh-c-cyan);
  box-shadow: 0 0 16px var(--xh-c-cyan);
}

.xh-collab-share-hero h1 {
  max-width: 640px;
  margin: 17px 0 13px;
  color: #f7fbff;
  font-size: clamp(32px, 6vw, 67px);
  letter-spacing: -0.065em;
  line-height: 1.02;
}

.xh-collab-share-hero p {
  max-width: 560px;
  margin: 0;
  color: var(--xh-c-text-soft);
  font-size: 14px;
  line-height: 1.75;
}

.xh-collab-share-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 19px;
}

.xh-collab-share-preview {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(127, 200, 255, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(100, 214, 237, 0.16), transparent 25%),
    radial-gradient(circle at 80% 70%, rgba(155, 115, 254, 0.22), transparent 34%),
    linear-gradient(145deg, #101d32, #0a1222);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.xh-collab-share-preview::before,
.xh-collab-share-preview::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(147, 213, 255, 0.22);
  border-radius: 14px;
  transform: rotate(-7deg);
}

.xh-collab-share-preview::before {
  width: 56%;
  height: 43%;
  top: 17%;
  left: 12%;
}

.xh-collab-share-preview::after {
  width: 48%;
  height: 39%;
  right: 10%;
  bottom: 12%;
  border-color: rgba(197, 157, 255, 0.26);
  transform: rotate(8deg);
}

.xh-collab-share-preview-has-scene::before,
.xh-collab-share-preview-has-scene::after,
.xh-collab-share-preview-empty::before,
.xh-collab-share-preview-empty::after {
  display: none;
}

.xh-collab-share-preview-has-scene {
  background:
    linear-gradient(rgba(127, 167, 216, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 167, 216, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 18% 12%, rgba(58, 206, 233, 0.13), transparent 30%),
    radial-gradient(circle at 85% 82%, rgba(150, 109, 253, 0.17), transparent 36%),
    linear-gradient(145deg, #0c1728, #07101e);
  background-size: 26px 26px, 26px 26px, auto, auto, auto;
}

.xh-collab-share-preview > img {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
}

.xh-collab-share-preview-label {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 15px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #d4e9ff;
  font-size: 11px;
}

.xh-collab-preview-host {
  min-width: 0;
}

.xh-collab-canvas-svg {
  position: absolute;
  z-index: 1;
  inset: 14px 14px 38px;
  width: calc(100% - 28px);
  height: calc(100% - 52px);
  overflow: visible;
}

.xh-collab-canvas-group {
  fill: rgba(114, 164, 225, 0.045);
  stroke: rgba(137, 190, 251, 0.3);
  stroke-dasharray: 8 7;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.xh-collab-canvas-group-label {
  fill: rgba(194, 218, 247, 0.72);
  font: 650 30px/1 var(--xh-c-font);
  letter-spacing: 0.025em;
}

.xh-collab-canvas-connection {
  fill: none;
  stroke: rgba(111, 224, 244, 0.48);
  stroke-linecap: round;
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
}

.xh-collab-canvas-node {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: max(2px, calc(var(--xh-c-node-font) * 0.07)) solid rgba(156, 196, 245, 0.4);
  border-radius: max(12px, calc(var(--xh-c-node-font) * 0.72));
  color: #f7fbff;
  background: linear-gradient(145deg, rgba(24, 43, 69, 0.98), rgba(12, 24, 43, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045), 0 14px 28px rgba(0, 0, 0, 0.26);
}

.xh-collab-canvas-node-image {
  border-color: rgba(95, 226, 245, 0.52);
}

.xh-collab-canvas-node-video {
  border-color: rgba(178, 139, 255, 0.58);
}

.xh-collab-canvas-node-text {
  border-color: rgba(119, 170, 237, 0.46);
}

.xh-collab-canvas-node-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: calc(var(--xh-c-node-font) * 0.35);
  padding: calc(var(--xh-c-node-font) * 0.7);
  text-align: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(105, 226, 245, 0.13), transparent 38%),
    linear-gradient(145deg, rgba(24, 44, 71, 0.96), rgba(11, 21, 38, 0.98));
}

.xh-collab-canvas-node-fallback strong {
  color: rgba(114, 231, 250, 0.84);
  font-size: calc(var(--xh-c-node-font) * 1.15);
  letter-spacing: 0.11em;
}

.xh-collab-canvas-node-fallback span {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(218, 232, 251, 0.72);
  font-size: calc(var(--xh-c-node-font) * 0.72);
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.xh-collab-share-preview .xh-collab-canvas-node-media {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

.xh-collab-canvas-node-title {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: calc(var(--xh-c-node-font) * 0.12);
  padding: calc(var(--xh-c-node-font) * 0.5) calc(var(--xh-c-node-font) * 0.62);
  background: linear-gradient(transparent, rgba(3, 9, 18, 0.9) 44%);
}

.xh-collab-canvas-node-title span {
  color: #76e8fb;
  font-size: calc(var(--xh-c-node-font) * 0.48);
  font-weight: 750;
  letter-spacing: 0.12em;
}

.xh-collab-canvas-node-title strong {
  overflow: hidden;
  color: #f3f8ff;
  font-size: var(--xh-c-node-font);
  font-weight: 680;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xh-collab-canvas-version {
  position: absolute;
  z-index: 3;
  top: 13px;
  right: 13px;
  padding: 5px 8px;
  border: 1px solid rgba(153, 196, 244, 0.25);
  border-radius: 8px;
  color: #bdd8f6;
  font: 700 10px/1 var(--xh-c-font);
  background: rgba(4, 12, 23, 0.72);
  backdrop-filter: blur(8px);
}

.xh-collab-canvas-empty {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 7px;
  padding: 24px;
  color: var(--xh-c-text-muted);
  text-align: center;
}

.xh-collab-canvas-empty strong {
  color: var(--xh-c-text-soft);
  font-size: 14px;
}

.xh-collab-canvas-empty span {
  font-size: 11px;
}

.xh-collab-canvas-tabs {
  display: flex;
  max-width: 100%;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 6px;
  scrollbar-width: thin;
}

.xh-collab-canvas-tab {
  display: grid;
  min-width: 132px;
  max-width: 210px;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--xh-c-line);
  border-radius: 11px;
  outline: none;
  color: var(--xh-c-text-muted);
  font: inherit;
  text-align: left;
  background: rgba(8, 20, 36, 0.62);
  cursor: pointer;
}

.xh-collab-canvas-tab:hover,
.xh-collab-canvas-tab.is-selected {
  border-color: rgba(108, 233, 255, 0.42);
  color: var(--xh-c-text);
  background: rgba(20, 46, 69, 0.74);
}

.xh-collab-canvas-tab strong,
.xh-collab-canvas-tab span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xh-collab-canvas-tab strong {
  font-size: 12px;
}

.xh-collab-canvas-tab span {
  font-size: 10px;
}

.xh-collab-share-body {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.xh-collab-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.xh-collab-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 82px;
  padding: 13px;
  border: 1px solid var(--xh-c-line);
  border-radius: 13px;
  background: rgba(11, 24, 42, 0.64);
}

.xh-collab-node > div {
  min-width: 0;
}

.xh-collab-node-thumb {
  position: relative;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border: 1px solid rgba(153, 196, 244, 0.2);
  border-radius: 10px;
  object-fit: cover;
}

.xh-collab-node-more {
  align-items: center;
  justify-content: center;
  color: var(--xh-c-text-muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.xh-collab-node span,
.xh-collab-node strong {
  display: block;
}

.xh-collab-node span {
  color: var(--xh-c-cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.xh-collab-node strong {
  margin-top: 9px;
  color: var(--xh-c-text-soft);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.xh-collab-gate {
  display: grid;
  width: min(440px, 100%);
  gap: 15px;
  margin: 10vh auto 0;
  padding: 26px;
  border: 1px solid var(--xh-c-line);
  border-radius: 19px;
  background: rgba(14, 26, 45, 0.84);
  box-shadow: var(--xh-c-shadow);
}

.xh-collab-gate h1 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.xh-collab-gate p {
  margin: 0;
  color: var(--xh-c-text-soft);
  font-size: 13px;
  line-height: 1.65;
}

.xh-collab-screen-reader {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Entry shown on logged-in pages; it remains a small, reversible affordance. */
#xh-collaboration-entry {
  position: fixed;
  z-index: 2147483000;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid rgba(108, 233, 255, 0.3);
  border-radius: 13px;
  color: #d5f8ff;
  font: 650 12px/1.2 var(--xh-c-font);
  background: rgba(9, 22, 38, 0.86);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28), 0 0 24px rgba(76, 201, 233, 0.08);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

#xh-collaboration-entry:hover {
  border-color: rgba(108, 233, 255, 0.68);
  background: rgba(18, 47, 68, 0.94);
  transform: translateY(-2px);
}

.xh-collab-entry-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--xh-c-cyan);
  box-shadow: 0 0 12px var(--xh-c-cyan);
}

@media (max-width: 960px) {
  .xh-collab-layout { grid-template-columns: 1fr; }
  .xh-collab-sidebar { position: static; min-height: auto; }
  .xh-collab-project-list { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .xh-collab-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xh-collab-share-hero { grid-template-columns: 1fr; min-height: auto; padding-top: 50px; }
  .xh-collab-share-preview { min-height: 270px; }
}

@media (max-width: 640px) {
  .xh-collab-app { padding: 16px 12px 32px; }
  .xh-collab-topbar { align-items: flex-start; margin-bottom: 33px; }
  .xh-collab-top-actions .xh-collab-btn:not(.xh-collab-btn-primary) { display: none; }
  .xh-collab-hero { display: block; }
  .xh-collab-hero h1 { font-size: 36px; }
  .xh-collab-hero-note { max-width: none; margin-top: 18px; }
  .xh-collab-stats { gap: 7px; }
  .xh-collab-stat { min-height: 88px; padding: 12px; }
  .xh-collab-stat-value { margin-top: 7px; font-size: 23px; }
  .xh-collab-panel-head { padding: 18px 16px 15px; }
  .xh-collab-panel-body { padding: 18px 14px 22px; }
  .xh-collab-section-grid,
  .xh-collab-form-grid,
  .xh-collab-binding { grid-template-columns: 1fr; }
  .xh-collab-field-full { grid-column: auto; }
  .xh-collab-member-line,
  .xh-collab-share-line { align-items: flex-start; flex-direction: column; }
  .xh-collab-member-tools,
  .xh-collab-share-tools { justify-content: flex-start; width: 100%; }
  .xh-collab-member-tools .xh-collab-select { flex: 1; width: auto; }
  .xh-collab-audit-line { flex-direction: column; }
  .xh-collab-audit-details { max-width: none; width: 100%; }
  .xh-collab-share-page { padding: 18px 14px 38px; }
  .xh-collab-share-hero { padding-top: 31px; }
  .xh-collab-share-hero h1 { font-size: 40px; }
  .xh-collab-share-preview { min-height: 220px; }
  #xh-collaboration-entry { right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  #xh-collaboration-root *,
  #xh-collaboration-root *::before,
  #xh-collaboration-root *::after,
  #xh-collaboration-entry {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
