/* Share publishing controls used inside the private workspace. */
.graph-publish { color:var(--ink); font-size:14px; line-height:1.65; }
.graph-publish fieldset { border:0; padding:0; margin:0; min-width:0; }
.graph-share-contact-preview { display:block; margin-top:4px; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.graph-publish fieldset>label { display:grid; gap:8px; margin:16px 0; font-weight:550; }
.graph-publish input:not([type=checkbox]),.graph-publish select { width:100%; min-width:0; min-height:44px; border:1px solid var(--silver-3); border-radius:8px; padding:10px 12px; background:#fff; color:var(--ink); font-size:14px; }
.graph-share-person { display:flex; gap:12px; align-items:center; padding:16px; border-radius:12px; background:var(--silver-1); }
.graph-share-person>span,.shared-avatar { flex:none; width:48px; height:48px; border-radius:50%; display:grid; place-items:center; background:var(--person-avatar-bg); color:var(--person-avatar-ink); border:1px solid var(--person-avatar-border); font-size:20px; }
.graph-share-person b,.graph-share-person small { display:block; }.graph-share-person small { color:var(--muted); font-size:12px; }
.graph-share-fields { display:flex; flex-wrap:wrap; gap:8px 20px; }.graph-share-fields>span,.graph-share-fields>p { flex-basis:100%; margin:0; }.graph-share-fields>p { color:var(--muted); font-size:12px; }.graph-share-fields label { display:flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; }.graph-share-fields input { width:18px; height:18px; accent-color:var(--tech-blue); }
.graph-share-safety { padding:12px 14px; background:var(--tech-blue-soft); color:var(--tech-blue-deep); border-radius:8px; font-size:13px; }
.graph-share-preview { border:1px solid var(--silver-3); border-radius:10px; padding:14px; }.graph-publish details { margin-top:10px; }.graph-publish summary { min-height:44px; display:flex; align-items:center; cursor:pointer; color:var(--tech-blue); }.graph-publish summary::before { content:'›'; padding-right:8px; }.graph-publish details[open]>summary::before { content:'⌄'; }.graph-publish details li { margin:6px 0; overflow-wrap:anywhere; }.graph-share-preview details { max-height:300px; overflow:auto; }.graph-publish [role=alert] { color:var(--silver-7); font-weight:550; }
.graph-share-success { color:var(--tech-blue); font-size:18px; font-weight:600; }.graph-share-link-card { min-width:0; padding:14px; border:1px solid var(--silver-3); border-radius:10px; background:#fff; }.graph-share-link-card>p { color:var(--muted); font-size:12px; }.graph-share-label { display:block; font-size:12px; margin-bottom:8px; }.graph-share-actions { display:flex; gap:8px; flex-wrap:wrap; }.graph-share-actions .button { min-height:44px; text-decoration:none; }.graph-share-managed { border-bottom:1px solid var(--silver-3); padding:16px 0; }.graph-share-managed-heading { display:flex; justify-content:space-between; gap:12px; }.graph-share-managed-heading span { color:var(--tech-blue); white-space:nowrap; }.graph-share-managed>p { color:var(--muted); font-size:12px; }.graph-share-empty { padding:20px 0; }.graph-share-revoke>button { min-height:44px; }
.graph-share-person>div { min-width:0; overflow-wrap:anywhere; }

/* Public share hierarchy: silver identity / white canvas / flat silver directory.
   Preserve the product's existing palette; this is product UI, not a landing page. */
body.graph-public {
  background:var(--silver-1);
  --shared-surface:#fff;
  --shared-canvas:#fff;
  --shared-directory:var(--silver-2);
  --shared-caption:#596267;
  --font:system-ui,-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  font-family:var(--font); font-size:15px; line-height:1.6;
}
.graph-public [hidden] { display:none!important; }
.graph-public .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.graph-public button { border:1px solid var(--silver-3); border-radius:8px; background:#fff; color:var(--ink-soft); padding:8px 12px; min-width:44px; min-height:44px; font:inherit; cursor:pointer; transition:background-color .15s,border-color .15s; }
.graph-public button:hover { background:var(--silver-1); border-color:var(--silver-4); }
.graph-public button:active { filter:brightness(.96); }
.graph-public button:disabled { cursor:default; opacity:.6; }
.graph-public button:focus-visible,.graph-public input:focus-visible,.shared-policy summary:focus-visible { outline:2px solid var(--tech-blue); outline-offset:3px; }
.graph-public button[aria-pressed=true],.graph-public button[aria-current=step] { color:var(--tech-blue-deep); background:var(--tech-blue-soft); border-color:var(--person-avatar-border); }
.graph-public .shared-primary { background:var(--tech-blue-deep); color:#fff; border-color:var(--tech-blue-deep); font-size:14px; font-weight:600; }
.graph-public .shared-primary:hover { background:var(--tech-blue); border-color:var(--tech-blue); }
.shared-brand { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px max(24px,calc((100% - 1200px)/2)); border-bottom:1px solid var(--silver-3); background:var(--shared-surface); }
.shared-brand img { width:152px; height:40px; object-fit:contain; }
.shared-brand>span { color:var(--muted); font-size:12px; }
.shared-main { max-width:1248px; margin:auto; padding:24px 24px max(32px,env(safe-area-inset-bottom)); }
.shared-hero { background:linear-gradient(115deg,var(--shared-surface),var(--silver-2)); border:1px solid var(--silver-3); border-radius:12px; margin-bottom:32px; min-width:0; overflow:hidden; }
.shared-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:16px 24px 0; }
.shared-heading h1 { min-width:0; font-size:13px; line-height:1.6; font-weight:500; margin:0; color:var(--shared-caption); overflow-wrap:anywhere; }
.shared-heading p { flex:none; margin:0; color:var(--tech-blue-deep); font-size:12px; }
.shared-root-profile { padding:16px 24px 24px; min-width:0; }
.shared-root-identity { display:flex; gap:14px; align-items:center; min-width:0; }
.shared-root-identity>div { flex:1; min-width:0; }
.shared-root-identity>.shared-avatar { width:60px; height:60px; border-radius:16px; font-size:24px; }
.shared-root-identity h2 { margin:2px 0 0; font-size:28px; font-weight:650; line-height:1.4; overflow-wrap:anywhere; }
.shared-profile-label { font-size:12px; color:var(--shared-caption); }
.shared-profile-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 24px; margin:20px 0 0; }
.shared-root-profile .shared-profile-fields { grid-template-columns:repeat(4,minmax(0,1fr)); }
.shared-profile-fields>div { min-width:0; }
.shared-profile-fields dt { font-size:12px; color:var(--shared-caption); margin-bottom:4px; }
.shared-profile-fields dd { margin:0; color:var(--ink); font-size:14px; line-height:1.65; overflow-wrap:anywhere; }
.shared-profile-fields [data-shared-field=phone] dd,.shared-profile-fields [data-shared-field=email] dd { font-variant-numeric:tabular-nums; user-select:text; }
.shared-profile-tags { grid-column:1/-1; display:flex; align-items:baseline; gap:14px; }
.shared-profile-tags dt { flex:none; }
.shared-profile-tags dd { display:flex; flex-wrap:wrap; gap:8px; }
.shared-profile-tags dd>span { background:var(--shared-surface); color:var(--ink-soft); border:1px solid var(--silver-3); padding:1px 8px; border-radius:4px; font-size:12px; }

/* Controls sit above the canvas, not inside another nested card. */
.shared-workspace { min-width:0; scroll-margin-top:16px; }
.shared-section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 0 16px; }
.shared-section-heading h2 { margin:0; font-size:22px; font-weight:650; letter-spacing:-.02em; }
.shared-section-heading p { margin:4px 0 0; color:var(--shared-caption); font-size:13px; }
.shared-switch { display:flex; flex:none; border:1px solid var(--silver-3); background:var(--silver-2); padding:3px; border-radius:10px; gap:4px; }
.shared-switch button { min-width:56px; border-color:transparent; background:transparent; font-size:13px; }
.shared-switch button[aria-pressed=true] { background:#fff; border-color:var(--silver-3); color:var(--tech-blue-deep); box-shadow:0 1px 2px #172b4510; }
.shared-toolbar { display:flex; align-items:flex-end; gap:12px; padding:0 0 20px; }
.shared-toolbar>label { flex:1; min-width:0; max-width:560px; display:grid; gap:6px; }
.shared-toolbar>label>span { color:var(--shared-caption); font-size:12px; }
.shared-toolbar input { width:100%; min-width:0; height:46px; border:1px solid var(--silver-4); border-radius:8px; padding:10px 12px; color:var(--ink); background:var(--shared-surface); font:inherit; font-size:16px; }
.shared-toolbar>button { color:var(--tech-blue-deep); font-size:13px; flex:none; max-width:40%; overflow-wrap:anywhere; border-color:transparent; background:transparent; }
.shared-explorer-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; align-items:start; gap:20px; }
.shared-map-panel { min-width:0; border:1px solid var(--silver-3); border-radius:12px; overflow:hidden; background:var(--shared-surface); }
.shared-trail { display:flex; gap:4px 12px; align-items:center; justify-content:space-between; flex-wrap:wrap; padding:8px 16px; min-height:64px; border-bottom:1px solid var(--silver-3); font-size:12px; }
.shared-path,.shared-scope-controls { display:flex; align-items:center; gap:4px; flex-wrap:wrap; min-width:0; }
.shared-path { flex:1 1 180px; }
.shared-path-label { color:var(--shared-caption); margin-right:4px; }
.shared-path strong { color:var(--ink-soft); font-weight:550; }
.shared-trail button { max-width:100%; overflow-wrap:anywhere; font-size:12px; }
.shared-path button { border-color:transparent; background:transparent; padding:8px; }
.shared-path button[aria-current=step] { color:var(--tech-blue-deep); background:var(--tech-blue-soft); border-color:transparent; font-weight:600; }
.shared-scope-controls button { border-color:transparent; background:var(--silver-1); }
.shared-scope-controls [data-shared-resume] { color:var(--tech-blue-deep); border-color:var(--person-avatar-border); background:var(--tech-blue-soft); }
.shared-canvas { background:var(--shared-canvas); min-height:300px; overflow:hidden; }
.shared-canvas { position:relative; height:620px; }
.shared-sphere-controls { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; padding:10px 16px; border-top:1px solid var(--silver-3); background:var(--shared-surface); }
.shared-sphere-controls>p { flex:1 1 180px; margin:0; color:var(--shared-caption); font-size:12px; line-height:1.6; }
.shared-sphere-actions { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.graph-public .shared-sphere-actions button { min-width:44px; min-height:44px; padding:8px; font-size:12px; }
.shared-sphere-actions output { min-width:34px; text-align:center; color:var(--shared-caption); font-size:12px; font-variant-numeric:tabular-nums; }
.shared-scene-options { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.graph-public .shared-scene-options button { min-height:44px; padding:8px 10px; font-size:12px; }
.shared-scene-options #sharedSphereTheme { color:var(--tech-blue-deep); }
.shared-world { position:relative; width:100%; }
.shared-world svg { position:absolute; top:0; left:0; }
.shared-lines path { fill:none; stroke:var(--person-avatar-border); stroke-width:1.5; }
.shared-lines path.strong { stroke:var(--tech-blue-bright); stroke-width:1.8; }
.shared-lines path.general { stroke-dasharray:5 5; }
.shared-captions rect { fill:#fff; stroke:var(--silver-3); stroke-width:.7; }
.shared-captions text { font-size:11px; fill:var(--ink-soft); }
.graph-public .shared-node { position:absolute; transform:translate(-50%,-50%); width:108px; height:100px; border:0; border-radius:12px; padding:6px 0 0; display:flex; flex-direction:column; align-items:center; background:transparent; line-height:1.4; }
.shared-node>span { width:48px; height:48px; position:relative; display:grid; place-items:center; border-radius:50%; background:var(--person-avatar-bg); border:1px solid var(--person-avatar-border); color:var(--person-avatar-ink); font-size:20px; }
.shared-node.is-focus>span { box-shadow:0 0 0 4px var(--tech-blue-soft); border-color:var(--tech-blue); }
.shared-node>span small { position:absolute; right:-5px; bottom:-3px; border:1px solid var(--silver-3); background:#fff; border-radius:20px; min-width:20px; line-height:18px; font-size:10px; }
.graph-public .shared-node>span small.has-downstream { background:var(--tech-blue-deep); border-color:var(--tech-blue-deep); color:#fff; min-width:26px; padding:0 3px; }
.shared-node>b { display:block; max-width:104px; margin-top:5px; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:550; }
.shared-node>em { font-size:11px; max-width:104px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-style:normal; }
.shared-list { padding:0 20px; min-height:300px; }
.graph-public .shared-list-person { display:flex; align-items:center; gap:12px; width:100%; border:0; border-bottom:1px solid var(--silver-3); border-radius:0; padding:16px 0; text-align:left; }
.shared-list-person>span:nth-child(2) { min-width:0; flex:1; }
.shared-list-person b,.shared-list-person small { display:block; overflow-wrap:anywhere; }
.shared-list-person small { font-size:13px; color:var(--muted); margin-top:4px; }
.shared-list-person em { font-size:12px; font-style:normal; color:var(--tech-blue-deep); white-space:nowrap; }
.shared-pagination { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:12px 16px; border-top:1px solid var(--silver-3); font-size:12px; color:var(--shared-caption); }
.shared-pagination small { display:block; margin-top:6px; font-size:12px; }
.shared-count-divider { margin:0 8px; color:var(--silver-4); }
.shared-pagination>div { display:flex; gap:8px; }

/* A flat directory, not a stack of competing cards. Selected profiles stay contextual. */
.shared-person { background:var(--shared-directory); border-radius:12px; padding:22px 20px 12px; min-width:0; scroll-margin-top:16px; }
.shared-person h2 { margin:0; font-size:18px; font-weight:650; overflow-wrap:anywhere; }
.shared-person h2:focus-visible { outline:2px solid var(--tech-blue); outline-offset:4px; }
.shared-person h3 { margin:0; font-size:16px; font-weight:650; }
.shared-person-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.shared-person-heading button { font-size:12px; border-color:transparent; background:transparent; padding:8px 0 8px 8px; color:var(--tech-blue-deep); }
.shared-selected-identity { display:flex; align-items:center; gap:12px; margin-top:12px; }
.shared-selected-profile { padding-bottom:20px; margin-bottom:20px; border-bottom:1px solid var(--silver-4); }
.shared-selected-identity h2 { font-size:22px; }
.shared-selected-profile .shared-profile-tags { display:block; }
.shared-selected-profile .shared-profile-tags dt { margin-bottom:8px; }
.shared-connections-heading h2,.shared-connections-heading h3 { display:flex; align-items:center; gap:8px; }
.shared-connections-heading h2>span,.shared-connections-heading h3>span { color:var(--shared-caption); font-size:14px; font-weight:500; }
.shared-expand-help { font-size:12px; color:var(--shared-caption); margin:4px 0 12px; overflow-wrap:anywhere; }
.shared-neighbors { display:grid; grid-template-columns:minmax(0,1fr); gap:0; }
.graph-public .shared-neighbors button { display:flex; align-items:center; gap:10px; text-align:left; padding:16px 0; min-width:0; border:0; border-bottom:1px solid var(--silver-3); border-radius:0; box-shadow:none; background:transparent; }
.graph-public .shared-neighbors button:last-child { border-bottom:0; }
.graph-public .shared-neighbors button:hover { background:var(--silver-1); }
.shared-neighbor-avatar { flex:none; display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:var(--person-avatar-bg); color:var(--person-avatar-ink); border:1px solid var(--person-avatar-border); font-size:16px; }
.shared-neighbor-info { min-width:0; flex:1; }
.shared-neighbor-info b { display:block; color:var(--ink); font-size:14px; font-weight:600; overflow-wrap:anywhere; }
.shared-neighbor-info small { display:block; font-size:12px; color:var(--shared-caption); overflow-wrap:anywhere; }
.shared-neighbor-info .shared-relation-type { color:var(--ink-soft); margin-top:4px; }
.shared-neighbor-action { color:var(--tech-blue-deep); font-size:12px; flex:none; white-space:nowrap; }
.shared-neighbor-action i { font-style:normal; font-size:18px; margin-left:6px; }

/* Secondary grant details stay available without competing with exploration. */
.shared-footer { margin-top:24px; color:var(--shared-caption); font-size:12px; }
.shared-validity { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.shared-validity button { font-size:12px; background:transparent; border-color:transparent; color:var(--shared-caption); padding:8px 0 8px 12px; }
.shared-policy { border-top:1px solid var(--silver-3); margin-top:16px; padding-top:4px; }
.shared-policy summary { min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; list-style:none; }
.shared-policy summary::-webkit-details-marker { display:none; }
.shared-policy summary::after { content:'＋'; font-size:16px; }
.shared-policy[open] summary::after { content:'−'; }
.shared-policy p { margin:6px 0 12px; line-height:1.8; overflow-wrap:anywhere; }
.shared-state { background:#fff; border:1px solid var(--silver-3); border-radius:14px; padding:40px 24px; text-align:center; }
.shared-state h1 { font-size:22px; overflow-wrap:anywhere; }
.shared-state p,.shared-empty { color:var(--muted); line-height:1.8; }
.shared-empty { padding:32px 20px; text-align:center; }
.shared-link-recovery { max-width:560px; margin:24px auto 16px; text-align:left; }
.shared-link-recovery label { display:block; font-size:14px; font-weight:600; margin-bottom:8px; }
.shared-link-recovery textarea { display:block; resize:vertical; min-height:96px; font:inherit; font-size:16px; background:var(--silver-1); overflow-wrap:anywhere; }
.shared-link-recovery p { font-size:13px; margin:8px 0; }
.shared-link-recovery #sharedLinkError { color:var(--ink); font-weight:600; }
.shared-link-recovery #sharedLinkError:empty { display:none; }
.shared-link-recovery button { margin-top:8px; width:100%; }
.shared-link-recovery~#sharedRetry { background:transparent; border-color:transparent; color:var(--tech-blue-deep); }
.shared-link-recovery textarea:focus-visible { outline:2px solid var(--tech-blue); outline-offset:3px; }

@media(max-width:1000px) {
  .shared-explorer-grid { grid-template-columns:minmax(0,1fr); }
  .shared-person { padding:24px 24px 12px; }
  .shared-neighbors { grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:24px; }
  .graph-public .shared-neighbors button:nth-last-child(2):nth-child(odd) { border-bottom:0; }
  .shared-root-profile .shared-profile-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
  .shared-canvas { height:440px; }
  .shared-sphere-controls { padding:10px 12px; }
  .shared-sphere-actions { width:100%; justify-content:space-between; gap:4px; }
  .shared-main { padding:16px 12px max(28px,env(safe-area-inset-bottom)); }
  .shared-brand { padding:12px max(16px,env(safe-area-inset-left)); gap:12px; }
  .shared-brand img { width:120px; height:32px; }
  .shared-brand>span { font-size:11px; }
  .shared-hero { margin-bottom:24px; }
  .shared-heading { padding:14px 16px 0; gap:8px; }
  .shared-heading h1 { font-size:12px; }
  .shared-heading p { font-size:12px; }
  .shared-root-profile { padding:16px; }
  .shared-root-identity { gap:10px; }
  .shared-root-identity>.shared-avatar { width:48px; height:48px; border-radius:12px; font-size:20px; }
  .shared-root-identity h2 { font-size:24px; }
  .shared-root-identity>button { font-size:13px; max-width:42%; padding:8px 10px; }
  .shared-profile-fields { gap:16px; }
  .shared-profile-fields dd { font-size:13px; }
  .shared-profile-tags { gap:12px; }
  .shared-section-heading { gap:12px; }
  .shared-section-heading h2 { font-size:20px; }
  .shared-section-heading p { font-size:12px; max-width:16em; }
  .shared-switch { gap:2px; padding:2px; }
  .shared-switch button { min-width:48px; padding:8px; }
  .shared-toolbar { gap:8px; padding-bottom:16px; }
  .shared-toolbar>button { padding:8px 4px; font-size:12px; max-width:38%; }
  .shared-toolbar input { padding:10px; }
  .shared-explorer-grid { gap:16px; }
  .shared-trail { padding:8px 12px; }
  .shared-path { flex-basis:100%; }
  .shared-person { padding:20px 16px 8px; }
  .shared-neighbors { grid-template-columns:minmax(0,1fr); }
  .graph-public .shared-neighbors button:nth-last-child(2):nth-child(odd) { border-bottom:1px solid var(--silver-3); }
  .shared-pagination { padding:12px; }
  .shared-count-divider { margin:0 4px; }
  .shared-list { padding:0 16px; }
  .graph-share-actions { display:grid; grid-template-columns:1fr 1fr; }
  .graph-share-actions>a { grid-column:1/-1; }
  .graph-publish input:not([type=checkbox]),.graph-publish select { font-size:16px; }
}
@media(prefers-reduced-motion:reduce) { .graph-public button { transition:none; } }
