/* Compact pipeline cards: title and original creator stay visible. */
.shell .brain-card.brain-card-compact{padding:10px 12px;margin-bottom:8px;border-radius:14px}
.shell .brain-card-compact .brain-card-heading{gap:6px;align-items:center}
.brain-card-summary{flex:1;min-width:0}
.shell .brain-card-compact .brain-card-title{font-size:13px;line-height:1.4;font-weight:700;min-height:0;padding:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.shell .brain-card-compact .pipeline-creator{font-size:11px;line-height:1.4;margin-top:3px}
.shell .brain-card-compact .brain-card-disclosure{flex:none;display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--ink,#30382f);cursor:pointer}
.brain-card-disclosure svg{transition:transform .18s ease}
.brain-card-disclosure[aria-expanded=true] svg{transform:rotate(90deg)}
.shell .brain-card-compact:has(.brain-card-disclosure[aria-expanded=true]) .brain-card-title{-webkit-line-clamp:unset}
.shell .brain-card-compact .brain-card-disclosure:hover{background:var(--hm-line,#e7e7e2)}
.shell .brain-card-compact .brain-card-disclosure:focus-visible,.shell .brain-card-compact .brain-card-title:focus-visible{outline:2px solid var(--ink,#30382f);outline-offset:3px}
.brain-card-details[hidden]{display:none!important}
.brain-card-details{border-top:1px solid var(--hm-line,#e7e7e2);margin-top:9px;padding-top:10px}
.shell .brain-card-compact .hm-card-format{margin:0;font-size:11px}
.shell .brain-card-compact .brain-card-details p{display:block;overflow-wrap:anywhere;font-size:12px;line-height:1.55;margin:8px 0 0}
.shell .brain-card-compact .brain-card-meta{margin:8px 0 0;padding-top:0;border-top:0}
.shell .brain-card-compact .brain-card-meta>span:empty{display:none}
@media(pointer:coarse),(max-width:700px){.shell .brain-card-compact .brain-card-disclosure{width:44px;height:44px}.shell .brain-card-compact .brain-card-title{min-height:28px;padding-block:3px}}
@media(prefers-reduced-motion:reduce){.brain-card-disclosure svg{transition:none}}

/* Keep item management visible beside the title on wide and narrow screens. */
#modal .pipeline-title-actions{flex-wrap:wrap;justify-content:flex-end;max-width:100%}
#modal .pipeline-title-actions>.btn{min-height:44px}
#modal .pipeline-title-actions .pipeline-next{white-space:normal}
@media(max-width:700px){#modal .pipeline-title-actions{justify-content:space-between}}

/* Quick removal stays visible without expanding the card or opening review. */
.shell .pipeline-remove,#modal .pipeline-remove{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none;min-width:36px;min-height:36px;padding:8px;border:0;border-radius:10px;background:transparent;color:#9b3833;cursor:pointer}
.shell .pipeline-remove:hover,#modal .pipeline-remove:hover{color:#a52f29;background:#fbe8e5}
.shell .pipeline-remove:focus-visible,#modal .pipeline-remove:focus-visible{outline:2px solid currentColor;outline-offset:2px}
#modal .pipeline-remove-label{min-height:44px;padding:10px 14px;color:#a52f29;border:1px solid currentColor}
.pipeline-remove svg{flex:none;pointer-events:none}
.pipeline-list-actions{width:90px;text-align:right}
.pipeline-remove-confirm p{line-height:1.6;overflow-wrap:anywhere}
.pipeline-remove-confirm .modal-footer{flex-wrap:wrap;gap:10px}
.pipeline-remove-confirm .modal-footer>.btn{min-height:44px}
@media(pointer:coarse),(max-width:700px){.shell .pipeline-remove{min-width:44px;min-height:44px}.pipeline-remove-confirm .modal-footer>.btn{flex:1}}

.pipeline-upload-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;margin-bottom:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.pipeline-upload-summary>div{display:grid;gap:4px;min-width:0}.pipeline-upload-summary strong{font-size:13px}.pipeline-upload-summary span{font-size:12px;color:var(--muted);overflow-wrap:anywhere}.pipeline-upload-summary .btn{flex-shrink:0}
@media(max-width:540px){.pipeline-upload-summary{align-items:flex-start;flex-direction:column;gap:10px}}

.pipeline-shared-links{margin-bottom:24px}.pipeline-shared-links .pipeline-deliverable{gap:16px}.pipeline-shared-links .pipeline-deliverable>div{min-width:0;overflow-wrap:anywhere}.pipeline-shared-links .btn{flex-shrink:0}

/* Recognizable uploaded-video posters, with native playback kept in place. */
.pipeline-file-preview:has(video){position:relative;min-height:150px;background:#171a16}
.pipeline-file-preview video{width:100%;height:210px;object-fit:contain}
.pipeline-video-status{position:absolute;left:12px;right:12px;top:12px;pointer-events:none;color:#fff;font-size:12px;text-align:center;text-shadow:0 1px 4px #000}
.pipeline-video-status span{display:none}
video[data-poster-state="loading"]+.pipeline-video-status .poster-loading,video[data-poster-state="unavailable"]+.pipeline-video-status .poster-unavailable{display:inline-block;background:#20251cbb;border-radius:8px;padding:6px 10px}

/* Keep content reachable without enlarging compact cards into media galleries. */
.shell .pipeline-content-shortcut{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;margin-top:8px;padding:7px 0 0;border:0;border-top:1px solid var(--hm-line,#ddd);background:transparent;color:var(--ink,#30382f);text-align:left;cursor:pointer;font:inherit;font-size:12px;min-height:32px}
.pipeline-content-shortcut>span{font-weight:700;white-space:nowrap}.pipeline-content-shortcut small{font-size:10px;color:var(--muted,#62685e);text-align:right;overflow-wrap:anywhere}
.pipeline-content-shortcut:focus-visible{outline:2px solid currentColor;outline-offset:3px}.pipeline-content-shortcut:hover>span{text-decoration:underline}
#modal .pipeline-content-overview>section{padding-block:18px;border-bottom:1px solid var(--line,#deded8)}
#modal .pipeline-content-overview>header p{margin-bottom:0}.pipeline-saved-script-body,.pipeline-overview-brief>p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}.pipeline-saved-script-body{max-height:320px;overflow:auto;padding:16px;background:var(--surface,#f6f6f3);border:1px solid var(--line,#ddd);border-radius:12px}
.pipeline-content-format{padding:35px 15px;font-weight:700}.pipeline-file small{overflow-wrap:anywhere}
#modal .pipeline-section-tabs{flex-wrap:wrap;max-width:100%}
#modal .pipeline-section-tabs button{min-height:40px}
@media(max-width:600px){#modal .pipeline-file-grid{grid-template-columns:1fr}.shell .pipeline-content-shortcut{min-height:44px}#modal .pipeline-content-overview .section-heading{flex-wrap:wrap;gap:10px}}
