.artifact-sharing-dialog {
  color: var(--text, #f4f4f5); background: var(--surface, #191c1a);
  border: 1px solid var(--stroke, #36453c); border-radius: 20px;
  padding: 24px; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  overflow: auto; box-shadow: 0 24px 90px #0008;
}
.artifact-sharing-dialog::backdrop { background: #0009; backdrop-filter: blur(3px); }
.artifact-sharing-dialog header { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.artifact-sharing-dialog h2 { font-size: 24px; font-weight: 650; margin: 3px 0 0; }
.artifact-sharing-eyebrow { color: var(--accent, #8aefb1); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.artifact-sharing-filename { overflow-wrap: anywhere; font-weight: 600; margin: 16px 0 8px; }
.artifact-sharing-dialog [data-share-status] { font-size: 13px; color: var(--text-soft, #a7b1aa); margin-bottom: 20px; }
.artifact-sharing-dialog [role="alert"] { color: var(--danger, #dc2626); }
.artifact-sharing-dialog label { display: block; font-size: 13px; font-weight: 600; margin: 16px 0 8px; }
.artifact-sharing-dialog .select, .artifact-sharing-dialog .input { width: 100%; min-width: 0; }
.artifact-sharing-link-row { display: flex; align-items: center; gap: 8px; }
.artifact-sharing-link-row button { flex-shrink: 0; }
.artifact-sharing-dialog [data-share-open] { display: inline-block; color: var(--accent, #8aefb1); font-size: 12px; margin-top: 10px; }
.artifact-sharing-help, .artifact-sharing-dialog [data-share-recipients] p { color: var(--text-soft, #a7b1aa); font-size: 12px; line-height: 1.6; margin-top: 12px; }
.artifact-sharing-dialog footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 20px; }

/* Storage folder shell: tree column, breadcrumb, picker cards. */
.storage-shell { display: grid; gap: 20px; grid-template-columns: minmax(200px, 264px) minmax(0, 1fr); align-items: start; }
.storage-folder-column { display: grid; gap: 12px; align-content: start; padding: 16px; border: 1px solid var(--stroke, #36453c); border-radius: 16px; background: var(--surface, #191c1a); position: sticky; top: 12px; }
.storage-folder-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.storage-folder-tree { display: grid; gap: 2px; }
.storage-folder-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.storage-folder-row { display: flex; align-items: center; gap: 4px; }
/* Nesting depth: the template emits data-depth on the node, so the indent
   lives here as classes instead of a style attribute, which the page CSP
   (style-src 'self' 'nonce-...') refuses. MAX_DEPTH is 8, so 1..8 covers
   every row the service can produce. */
.storage-folder-node[data-depth="1"] > .storage-folder-row { padding-left: 14px; }
.storage-folder-node[data-depth="2"] > .storage-folder-row { padding-left: 28px; }
.storage-folder-node[data-depth="3"] > .storage-folder-row { padding-left: 42px; }
.storage-folder-node[data-depth="4"] > .storage-folder-row { padding-left: 56px; }
.storage-folder-node[data-depth="5"] > .storage-folder-row { padding-left: 70px; }
.storage-folder-node[data-depth="6"] > .storage-folder-row { padding-left: 84px; }
.storage-folder-node[data-depth="7"] > .storage-folder-row { padding-left: 98px; }
.storage-folder-node[data-depth="8"] > .storage-folder-row { padding-left: 112px; }
.storage-folder-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 1; min-width: 0; padding: 6px 8px; border-radius: 10px; color: inherit; text-decoration: none; font-size: 13px; }
.storage-folder-link:hover, .storage-folder-link:focus-visible { background: var(--surface-strong, #232a26); }
.storage-folder-link.is-active { background: var(--surface-strong, #232a26); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent, #8aefb1); }
.storage-folder-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.storage-folder-count { color: var(--text-soft, #a7b1aa); font-size: 11px; font-variant-numeric: tabular-nums; }
.storage-folder-toggle, .storage-folder-grip { border: 0; background: transparent; color: var(--text-soft, #a7b1aa); cursor: pointer; padding: 2px 4px; border-radius: 6px; font-size: 12px; line-height: 1; }
.storage-folder-toggle:hover, .storage-folder-grip:hover, .storage-folder-toggle:focus-visible, .storage-folder-grip:focus-visible { color: var(--text, #f4f4f5); background: var(--surface-strong, #232a26); }
.storage-folder-grip { cursor: grab; opacity: .55; }
.storage-folder-blank { color: var(--text-soft, #a7b1aa); font-size: 12px; padding: 6px 8px; }
.storage-folder-form { display: grid; gap: 8px; margin-top: 10px; }
.storage-folder-manage { display: grid; gap: 6px; border-top: 1px solid var(--stroke, #36453c); padding-top: 12px; }
.storage-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; margin-bottom: 12px; }
.storage-breadcrumb-link { color: var(--text-soft, #a7b1aa); text-decoration: none; }
.storage-breadcrumb-link:hover, .storage-breadcrumb-link:focus-visible { color: var(--text, #f4f4f5); text-decoration: underline; }
.storage-breadcrumb-current { font-weight: 600; overflow-wrap: anywhere; }
.storage-breadcrumb-sep { color: var(--text-soft, #a7b1aa); }
.storage-folder-share { display: grid; gap: 10px; padding: 12px 16px; margin-bottom: 12px; border: 1px solid var(--stroke, #36453c); border-radius: 14px; background: var(--surface, #191c1a); }
.storage-folder-move { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.storage-folder-move select { max-width: min(320px, 100%); }
.storage-toast { position: sticky; top: 8px; z-index: 30; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--stroke, #36453c); background: var(--surface-strong, #232a26); font-size: 13px; }

/* Public folder share page. */
.shared-folder-card { display: grid; gap: 16px; }
.shared-folder-card > p { margin-bottom: 0; }
.shared-folder-card > h1 { margin-bottom: 0; }
.shared-folder-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 16px; }
.shared-folder-item { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--stroke, #36453c); border-radius: 16px; }
.shared-folder-preview img, .shared-folder-preview video { display: block; width: 100%; max-height: 46dvh; object-fit: contain; background: #000; border-radius: 12px; }
.shared-folder-preview audio { width: 100%; }
.shared-folder-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.shared-folder-meta h2 { font-size: 16px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.shared-folder-meta p { margin: 0; color: var(--text-soft, #a7b1aa); font-size: 13px; }
.shared-folder-owned { color: var(--text-soft, #a7b1aa); font-size: 13px; }
@media (max-width: 860px) { .storage-shell { grid-template-columns: minmax(0, 1fr); } .storage-folder-column { position: static; } }
.artifact-sharing-dialog [hidden] { display: none !important; }
.artifact-share-button { display: inline-flex; position: relative; z-index: 2; min-height: 32px; font-size: 12px; margin: 6px; flex-shrink: 0; cursor: pointer; }
.orch-node-artifact .artifact-share-button { font-size: 11px; padding: 4px 8px; }
.orch-artifact-share { color: var(--success); background: transparent; border: 0; font: inherit; font-size: 11px; cursor: pointer; padding: 2px 4px; }
.orch-artifact-share:hover, .orch-artifact-share:focus-visible { text-decoration: underline; }
.orch-input-media-preview > .artifact-share-button, [data-fireflea-clip-modal-preview-stage] > .artifact-share-button { position: absolute; right: 6px; top: 6px; margin: 0; z-index: 12; background: var(--surface-strong); }
.shared-artifact-page { min-height: 100dvh; margin: 0; padding: 32px 16px; background: var(--bg, #101411); color: var(--text, #f4f4f5); font-family: system-ui, sans-serif; }
.shared-artifact-card { width: min(860px, 100%); margin: 0 auto; padding: clamp(16px, 4vw, 32px); box-sizing: border-box; border: 1px solid var(--stroke, #36453c); border-radius: 20px; background: var(--surface, #191c1a); }
.shared-artifact-brand { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; font-weight: 650; }
.shared-artifact-card h1 { font-size: clamp(20px, 4vw, 30px); overflow-wrap: anywhere; margin: 28px 0 8px; }
.shared-artifact-card p { color: var(--text-soft, #a7b1aa); margin-bottom: 24px; }
.shared-artifact-card video, .shared-artifact-image { display: block; width: 100%; max-height: 70dvh; object-fit: contain; background: #000; border-radius: 12px; }
.shared-artifact-card audio { width: 100%; }
.shared-artifact-card > .button { margin-top: 24px; }
.shared-artifact-card form { display: inline-block; margin-top: 24px; }
.shared-artifact-watermark-note, .shared-artifact-checkout-note { font-size: 12px; color: var(--accent, #8aefb1) !important; margin: -12px 0 16px !important; }
.shared-artifact-checkout-note { color: var(--text-soft, #a7b1aa) !important; margin: 10px 0 0 !important; }
.shared-artifact-file { padding: 32px 16px; text-align: center; border: 1px dashed var(--stroke, #36453c); border-radius: 12px; }
@media (max-width: 480px) { .artifact-sharing-dialog { padding: 20px; } .artifact-sharing-link-row { flex-wrap: wrap; } }

/* "Report this content" on shared pages (partials/shared_report.html). */
.shared-report { margin-top: 12px; }
.shared-report-details { margin-top: 8px; font-size: 13px; color: var(--text-soft, #a7b1aa); }
.shared-report-details > summary { cursor: pointer; color: var(--text-soft, #a7b1aa); text-decoration: underline; width: fit-content; }
.shared-report-details[open] > summary { margin-bottom: 10px; color: var(--text, #e8efe9); }
.shared-report-form { display: grid; gap: 8px; text-align: left; padding: 14px; border: 1px solid var(--stroke, #36453c); border-radius: 14px; }
.shared-report-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.shared-report-form legend { font-weight: 600; margin-bottom: 6px; color: var(--text, #e8efe9); }
.shared-report-choice { display: flex; gap: 8px; align-items: center; }
.shared-report-form textarea, .shared-report-form input[type="email"] { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--stroke, #36453c); background: var(--surface, #0f1512); color: inherit; font: inherit; }
.shared-report-optional { font-weight: 400; color: var(--text-soft, #a7b1aa); }
.shared-report-note { font-size: 12px; margin: 4px 0; }
.shared-report-form .button { justify-self: start; }
.shared-report-sent { font-size: 13px; color: var(--accent, #8aefb1); margin: 8px 0 0; }
.artifact-sharing-public-note { font-size: 12px; color: var(--warning, #f3c969); margin: 6px 0 0; }
