/* SOGpt UI v2 · Workspace › Shared, and the share dialogs opened from Artifacts. */
:root[data-ui=v2] #view-shared.active { display:block; height:100%; overflow:auto; padding:0; background:var(--surface-0); }
.sh-view:not(.active) { display:none; }
.sh-page { max-width:980px; margin:0 auto; padding:32px 48px 56px; box-sizing:border-box; display:flex; flex-direction:column; gap:20px; color:var(--text-1); font-family:var(--font-ui); }
.sh-ic { flex:none; }
.sh-head { display:flex; flex-direction:column; gap:10px; }
.sh-eyebrow { color:var(--text-3); font:500 11.5px/1 var(--font-mono); letter-spacing:.08em; text-transform:uppercase; }
.sh-head h1 { margin:0; font:500 40px/1 var(--font-ui); letter-spacing:-.03em; }
.sh-head p { margin:0; color:var(--text-2); font:400 14.5px/1.5 var(--font-ui); }
.sh-tabs { display:flex; gap:4px; padding:3px; align-self:flex-start; border-radius:10px; background:var(--v2-fill); }
.sh-tabs button { display:inline-flex; align-items:center; gap:7px; height:30px; padding:0 12px; border:0; border-radius:8px; background:transparent; color:var(--text-2); font:500 13px/1 var(--font-ui); cursor:pointer; }
.sh-tabs button[aria-pressed=true] { background:var(--v2-raised); color:var(--text-1); }
.sh-tabs button span { min-width:18px; height:18px; padding:0 5px; box-sizing:border-box; border-radius:9px; background:var(--v2-fill-strong); color:var(--text-1); font:600 11px/18px var(--font-ui); text-align:center; }
.sh-list { display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--v2-edge); border-radius:14px; background:var(--v2-card); }
.sh-row { display:grid; grid-template-columns:36px minmax(0, 1fr) auto; align-items:center; gap:14px; padding:14px 16px; border-top:1px solid var(--v2-edge); }
.sh-row:first-child { border-top:0; }
.sh-row.is-focus { box-shadow:inset 3px 0 0 var(--gold); }
.sh-row.is-off { opacity:.6; }
.sh-tag { width:36px; height:36px; display:grid; place-items:center; border:1px solid var(--v2-edge-strong); border-radius:9px; background:var(--v2-fill); color:var(--text-2); font:600 10px/1 var(--font-mono); font-style:normal; letter-spacing:.04em; }
.sh-main { min-width:0; display:flex; flex-direction:column; gap:4px; }
.sh-main strong { overflow:hidden; font:500 14px/1.3 var(--font-ui); white-space:nowrap; text-overflow:ellipsis; }
.sh-meta { display:flex; align-items:center; gap:6px; flex-wrap:wrap; color:var(--text-3); font-size:12.5px; }
.sh-new { padding:2px 6px; border-radius:5px; background:var(--v2-accent-soft); color:var(--v2-accent-text); font:600 11px/1 var(--font-ui); }
.sh-note { margin:2px 0 0; color:var(--text-2); font-size:13px; line-height:1.45; }
.sh-acts { display:flex; align-items:center; gap:6px; }
.sh-btn { display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 12px; border:1px solid var(--v2-edge-strong); border-radius:8px; background:transparent; color:var(--text-1); font:500 12.5px/1 var(--font-ui); text-decoration:none; cursor:pointer; }
.sh-btn:hover { background:var(--v2-fill); }
.sh-btn.sh-quiet { border-color:transparent; color:var(--text-2); }
.sh-btn[data-confirm=yes] { border-color:rgba(239,107,99,.5); color:#f59d97; }
:root[data-theme=light] .sh-btn[data-confirm=yes] { color:#a8322a; }
.sh-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:8px; color:var(--text-2); }
.sh-icon:hover { background:var(--v2-fill); color:var(--text-1); }
.sh-state { margin:0; color:var(--text-2); font-size:13.5px; }
.sh-empty { display:flex; flex-direction:column; align-items:center; gap:10px; padding:44px 28px; border:1px solid var(--v2-edge); border-radius:14px; background:var(--v2-card); text-align:center; }
.sh-empty > .sh-ic { color:var(--text-3); }
.sh-empty strong { font:500 16px/1.3 var(--font-ui); }
.sh-empty p { max-width:440px; margin:0; color:var(--text-2); font-size:13.5px; line-height:1.55; }
.sh-alert { display:flex; gap:12px; padding:18px; border:1px solid rgba(239,107,99,.4); border-radius:14px; background:var(--v2-card); }
.sh-alert > .sh-ic { color:#ef6b63; }
.sh-alert p { margin:6px 0 10px; color:var(--text-2); font-size:13.5px; }
:is(.sh-view, .v2-share-dialog) :is(button, a, input, select, textarea):focus-visible { outline:2px solid var(--gold-ring); outline-offset:2px; }

/* Share dialogs */
.v2-share-dialog { width:min(460px, calc(100vw - 32px)); max-height:min(640px, calc(100vh - 48px)); padding:0; border:1px solid var(--v2-edge-strong); border-radius:16px; background:var(--v2-panel); color:var(--text-1); font-family:var(--font-ui); box-shadow:0 30px 80px rgba(0,0,0,.5); }
.v2-share-dialog[open] { display:flex; flex-direction:column; }
.v2-share-dialog::backdrop { background:rgba(4,5,6,.55); }
:root[data-theme=light] .v2-share-dialog::backdrop { background:rgba(23,64,78,.25); }
.v2-share-dialog > form { display:flex; flex-direction:column; min-height:0; }
.sd-head { display:flex; align-items:center; gap:10px; padding:14px 10px 12px 20px; border-bottom:1px solid var(--v2-edge); }
.sd-head h2 { flex:1; min-width:0; margin:0; overflow:hidden; font:500 16px/1.3 var(--font-ui); white-space:nowrap; text-overflow:ellipsis; }
.sd-body { flex:1; min-height:0; overflow:auto; display:flex; flex-direction:column; gap:14px; padding:16px 20px; }
.sd-body > * { flex-shrink:0; }
.sd-field { display:flex; flex-direction:column; gap:7px; color:var(--text-2); font-size:12.5px; }
.sd-field input, .sd-field select, .sd-field textarea { box-sizing:border-box; width:100%; border:1px solid var(--v2-edge-strong); border-radius:9px; background:var(--v2-card); color:var(--text-1); font:400 13.5px/1.4 var(--font-ui); }
.sd-field input, .sd-field select { height:38px; padding:0 11px; }
.sd-field textarea { min-height:64px; padding:9px 11px; resize:vertical; }
.sd-field select option { background:var(--surface-2); color:var(--text-1); }
.sd-files { display:flex; flex-direction:column; gap:2px; margin:0; padding:0; border:0; }
.sd-files legend { margin-bottom:6px; padding:0; color:var(--text-2); font-size:12.5px; }
.sd-check { display:flex; align-items:center; gap:9px; min-height:30px; color:var(--text-1); font-size:13px; cursor:pointer; }
.sd-check input { width:15px; height:15px; margin:0; accent-color:var(--gold); }
.sd-results { display:flex; flex-direction:column; max-height:188px; overflow:auto; border:1px solid var(--v2-edge); border-radius:9px; }
.sd-results:empty { display:none; }
.sd-person { display:flex; align-items:center; gap:10px; min-height:40px; padding:0 10px; border:0; border-top:1px solid var(--v2-edge); background:transparent; color:var(--text-1); font:400 13px/1.2 var(--font-ui); text-align:left; cursor:pointer; }
.sd-person:first-child { border-top:0; }
.sd-person:hover, .sd-person:focus-visible { background:var(--v2-fill); outline:none; }
.sd-person[aria-pressed=true] { background:var(--v2-accent-soft); }
.sd-av { width:26px; height:26px; flex:none; display:grid; place-items:center; border-radius:50%; background:var(--v2-raised); color:var(--text-1); font:600 11px/1 var(--font-ui); }
.sd-person small { margin-left:auto; color:var(--text-3); font-size:12px; }
.sd-chips { display:flex; flex-wrap:wrap; gap:6px; }
.sd-chips:empty { display:none; }
.sd-chip { display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 8px 0 11px; border:1px solid var(--v2-edge-strong); border-radius:14px; background:var(--v2-fill); color:var(--text-1); font:400 12.5px/1 var(--font-ui); cursor:pointer; }
.sd-note { margin:0; color:var(--text-3); font-size:12.5px; line-height:1.5; }
.sd-note.sd-warn { color:var(--text-2); }
.sd-err { margin:0; color:#f59d97; font-size:13px; }
:root[data-theme=light] .sd-err { color:#a8322a; }
.sd-err[hidden] { display:none; }
.sd-foot { display:flex; justify-content:flex-end; gap:10px; padding:12px 20px 16px; border-top:1px solid var(--v2-edge); }
.sd-btn { height:36px; padding:0 16px; border:1px solid var(--v2-edge-strong); border-radius:9px; background:transparent; color:var(--text-1); font:500 13px/1 var(--font-ui); cursor:pointer; }
.sd-btn-primary { border-color:var(--v2-action); background:var(--v2-action); color:var(--v2-on-action); }
.sd-btn:disabled { opacity:.5; cursor:default; }

@media (max-width:760px) {
  .sh-page { padding:20px 16px 40px; }
  .sh-head h1 { font-size:30px; }
  .sh-row { grid-template-columns:36px minmax(0, 1fr); }
  .sh-acts { grid-column:2; }
}
/* The dialog sits in <dialog>/<form>; keep global form and label styles out of it. */
.v2-share-dialog :is(label, fieldset, header, footer, p) { margin:0; }
.v2-share-dialog label.sd-check { flex-direction:row; align-items:center; justify-content:flex-start; gap:9px; font-weight:400; text-align:left; }
.v2-share-dialog label.sd-field { font-weight:400; }
.v2-share-dialog .sd-head { min-height:0; height:auto; }

/* A catalogue sent from its Download card: the file, and its format under the title */
.sd-fmt { display:flex; align-items:center; gap:12px; padding:10px 10px 10px 12px; border:1px solid var(--v2-edge); border-radius:12px; background:var(--v2-card); }
.sd-fmt-t { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.sd-fmt-t strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font:500 13px/1.3 var(--font-ui); }
.sd-fmt-t small { color:var(--text-3); font-size:12px; }
.sd-seg { flex:none; display:flex; gap:2px; padding:3px; border:1px solid var(--v2-edge); border-radius:10px; background:var(--v2-fill); }
.sd-seg button { height:28px; padding:0 10px; border:0; border-radius:7px; background:transparent; color:var(--text-2); font:500 12.5px/1 var(--font-ui); cursor:pointer; }
.sd-seg button[aria-checked=true] { background:var(--v2-action); color:var(--v2-on-action); font-weight:600; }
@media (max-width: 480px) { .sd-fmt { flex-wrap:wrap; } }
