html.collection-picker-open { overflow: hidden; }
.collection-membership-dialog { box-sizing: border-box; width: min(580px, calc(100vw - 32px)); max-width: none; max-height: min(760px, calc(100dvh - 40px)); margin: auto; padding: 28px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); box-shadow: 0 24px 80px #17251f33; font-family: inherit; }
.collection-membership-dialog[open] { display: flex; flex-direction: column; gap: 18px; animation: collection-picker-enter 140ms ease-out; }
.collection-membership-dialog [hidden] { display: none !important; }
.collection-membership-dialog::backdrop { background: #17251f66; }
.collection-picker-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.collection-picker-heading .eyebrow { margin: 0 0 6px; font-size: 10px; }
.collection-picker-heading h2 { margin: 0; font-size: clamp(28px, 4vw, 36px); line-height: 1.15; }
.collection-picker-protocol { margin: -6px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.collection-picker-toolbar { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.collection-picker-toolbar > div { flex: 1 1 230px; }
.collection-membership-dialog label { display: block; margin-bottom: 7px; font-size: 12px; }
.collection-membership-dialog input { width: 100%; min-height: 44px; font: inherit; font-size: 14px; }
.collection-picker-new { flex-shrink: 0; min-height: 44px; padding: 0; border: 0; border-bottom: 1px solid var(--accent); border-radius: 0; background: transparent; color: var(--brand-ink); font: inherit; font-size: 13px; cursor: pointer; }
.collection-picker-create { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: color-mix(in srgb, var(--brand) 3%, var(--surface)); }
.collection-picker-create .button-row { margin-top: 12px; }
.collection-picker-list { overflow-y: auto; scrollbar-gutter: stable; padding-right: 6px; overscroll-behavior: contain; min-height: 48px; border-top: 1px solid var(--line); }
.collection-membership-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 78px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.collection-picker-copy { min-width: 0; }
.collection-picker-copy strong { display: block; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.collection-picker-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.collection-picker-add { width: 44px; height: 44px; flex-shrink: 0; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--brand); font: inherit; font-size: 25px; cursor: pointer; }
.collection-picker-add:hover { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); border-color: var(--brand); }
.collection-picker-add[aria-disabled="true"] { cursor: wait; }
.collection-picker-add[aria-busy="true"] { opacity: .5; }
.collection-picker-included { flex-shrink: 0; color: var(--brand); font-size: 12px; }
.collection-picker-membership { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.collection-picker-remove:hover { color: #963d30; border-color: #963d30; background: #963d3008; }
.collection-picker-empty { color: var(--muted); font-size: 14px; padding: 14px 0; }
.collection-picker-error { color: #963d30; background: #963d300b; padding: 12px; border-radius: 5px; font-size: 13px; }
/* Announce saves without inserting a status row and resizing the dialog. */
.collection-picker-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.collection-picker-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.collection-picker-footer p { margin: 0; font-size: 12px; color: var(--muted); max-width: 280px; }
@keyframes collection-picker-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 480px) { .collection-membership-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 20px; } .collection-membership-dialog[open] { gap: 16px; } .collection-picker-footer { gap: 14px; } }
@media (prefers-reduced-motion: reduce) { .collection-membership-dialog[open] { animation: none; } }
