/* The Collection page (board 1d) and its dialogs. */
.coll-page { display: flex; flex-direction: column; gap: 28px; }
.coll-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 10px; border-radius: var(--radius); background: var(--tone-1); color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; }
.coll-back:hover { background: var(--tone-2); }
.coll-back svg { stroke: currentColor; }
.coll-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.coll-cover { display: grid; width: 340px; height: 188px; gap: 2px; background: var(--page); }
.coll-cover img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--media-bg); }
.coll-cover--0 { background: var(--tone-1); }
.coll-cover--1 { grid-template-columns: 1fr; }
.coll-cover--2 { grid-template-columns: 2fr 1fr; }
.coll-cover--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.coll-cover--3 img:first-child { grid-row: 1 / span 2; }
.coll-head__body { display: flex; flex-direction: column; gap: 10px; min-width: 0; align-self: center; }
.coll-head__desc { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-2); max-width: 560px; }
.coll-head__meta { margin: 0; font-size: 14px; color: var(--text-quiet); }
.coll-head__acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.coll-head__acts button { height: 44px; padding: 0 18px; border: 0; border-radius: var(--radius); font: inherit; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.coll-head__acts .tone { background: var(--tone-1); color: var(--text); }
.coll-head__acts .tone:hover { background: var(--tone-2); }
.coll-head__acts .red { background: var(--red); color: var(--on-red); }
.coll-head__acts .red:hover { background: var(--red-hover); }
.coll-head__acts svg { stroke: currentColor; }
.coll-end { margin: 8px 0 0; text-align: center; font-size: 14px; color: var(--text-quiet); }
@media (max-width: 1024px) { .coll-head { grid-template-columns: auto minmax(0, 1fr); } .coll-head__acts { grid-column: 1 / -1; justify-content: flex-start; } }
@media (max-width: 640px) { .coll-head { grid-template-columns: minmax(0, 1fr); } .coll-cover { width: 100%; height: auto; aspect-ratio: 16 / 9; } }

/* Add assets dialog. */
.addlg { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.addlg__search { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.addlg__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; overflow: auto; min-height: 120px; padding: 4px; margin: 0 -4px; }
.addlg__tile { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: transparent; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.addlg__tile:disabled { opacity: .45; cursor: default; }
.addlg__frame { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--media-bg); overflow: hidden; }
.addlg__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.addlg__doc { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: var(--text-quiet); background: var(--tone-solid); }
.addlg__tick { position: absolute; left: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .35); }
.addlg__tile.is-on .addlg__tick { background: var(--red); border-color: var(--red); }
.addlg__tile.is-on .addlg__frame { box-shadow: inset 0 0 0 3px var(--red); }
.addlg__title { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addlg__note { font-size: 12px; color: var(--text-quiet); min-height: 1.2em; }
.addlg__empty { grid-column: 1 / -1; margin: 0; padding: 24px 0; text-align: center; color: var(--text-quiet); }
.addlg__more { display: flex; justify-content: center; padding: 8px 0 0; }
.addlg__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; margin-top: 16px; }
.addlg__foot .cfm-acts { margin-left: auto; }
.addlg__count { font-size: 14px; color: var(--text-2); }
