/* The owned collection shares the gallery's paper, typography and masthead. */
.collection-page .site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0; }
.collection-page .wordmark { grid-column: 2; grid-row: 1; justify-self: center; }
.collection-page .wordmark-image { display: block; height: auto; }
.collection-page .gallery-back { grid-column: 1; grid-row: 1; justify-self: start; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 9px 13px; border: 1px solid rgba(111, 117, 103, .28); border-radius: 24px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.collection-page .gallery-back svg { width: 18px; height: 18px; }
.collection-page .gallery-back:hover { color: var(--ink); border-color: var(--ink); }
.collection-page .intro .collection-totals { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.collection-totals > span + span::before { content: '·'; padding-right: 8px; }
.collection-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.collection-views { display: flex; gap: 8px; }
.collection-view, .collection-clear, .collection-page .filter-btn { min-height: 44px; padding: 10px 22px; border: 1px solid var(--line); border-radius: 26px; background: transparent; color: var(--ink); font: 500 13px / 1.3 var(--sans); cursor: pointer; }
.collection-view[aria-pressed="true"] { background: #542c36; border-color: #542c36; color: var(--paper); }
.collection-view:not([aria-pressed="true"]):hover { background: rgba(84, 44, 54, .05); }
.collection-search-wrap { display: flex; align-items: center; gap: 10px; width: min(390px, 45%); min-width: 0; min-height: 46px; padding: 0 5px 0 14px; border: 1px solid var(--line); border-radius: 26px; background: rgba(255, 255, 255, .24); }
.collection-search-wrap:focus-within { border-color: var(--accent); outline: 1px solid var(--accent); }
.collection-search-icon { flex-shrink: 0; width: 18px; height: 18px; color: var(--muted); }
.collection-search { flex: 1; width: 100%; min-width: 0; min-height: 44px; padding: 8px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 14px / 1.3 var(--sans); appearance: none; }
.collection-search::placeholder { color: var(--muted); opacity: 1; }
.collection-search::-webkit-search-cancel-button { appearance: none; }
.collection-search-reset { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.collection-search-reset svg { width: 18px; height: 18px; }
.collection-result-count { margin: 16px 0 20px; color: var(--muted); font-size: 12px; min-height: 16px; }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 24px; }
.collection-page .collection-painting-open { display: block; padding: 7px; aspect-ratio: 5 / 4; border: 1px solid #b59b71; border-radius: 0; background: #ebe1cb; box-shadow: 0 4px 14px rgba(63, 48, 30, .1); overflow: hidden; }
.collection-art-frame { position: absolute; inset: 7px; display: grid; place-items: center; padding: 10px; border: 1px solid rgba(126, 112, 86, .27); background: #f9f4e8; }
.collection-page .collection-painting-open img { display: block; width: 100%; height: 100%; max-height: none; min-height: 0; object-fit: contain; filter: none; transform: none; }
.collection-painting-open:hover { border-color: var(--accent); }
.collection-page .collection-caption { padding: 14px 2px 0; }
.collection-caption::before { display: none; }
.collection-painting-author { display: inline-block; margin-bottom: 5px; color: var(--accent); font: 400 12px / 1.5 var(--sans); }
.collection-painting-author:hover { text-decoration: underline; text-underline-offset: 3px; }
.collection-page .collection-caption h3 { margin: 0; color: var(--ink); font: 400 clamp(23px, 2vw, 29px) / 1.15 var(--serif); letter-spacing: -.4px; overflow-wrap: anywhere; }
.collection-painting-specs { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.collection-image-missing { padding: 18px; color: var(--muted); font: 400 13px / 1.5 var(--sans); text-align: center; }
.collection-grid.collection-artists-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.collection-author { display: flex; flex-direction: column; min-width: 0; padding: 5px; background: #173c35; color: var(--paper); border: 1px solid #b59b71; box-shadow: 0 4px 14px rgba(63, 48, 30, .1); opacity: 1; }
.collection-author:nth-child(even) { background: #542c36; }
.collection-author-portrait { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; min-width: 0; overflow: hidden; background: #e9dfc9; }
.collection-author-portrait img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.collection-author-initials { color: #8c735a; font: 400 clamp(44px, 5vw, 80px) / 1 var(--serif); }
.collection-author-info { display: flex; flex-direction: column; flex: 1; gap: 14px; padding: 14px 12px 12px; border: 1px solid rgba(220, 195, 154, .45); border-top: 0; }
.collection-author h3 { margin: 0; font: 400 clamp(23px, 2.3vw, 31px) / 1.05 var(--serif); letter-spacing: -.5px; overflow-wrap: anywhere; }
.collection-author-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; font-size: 11px; }
.collection-author-arrow { color: var(--gold); font-size: 24px; }
.collection-page .empty-state { grid-column: 1 / -1; padding: 44px 16px; border: 1px solid var(--line); text-align: center; }
.collection-page .empty-state-icon { display: none; }
.collection-page .empty-state-text { font: 400 28px / 1.15 var(--serif); }
.collection-page .empty-state-subtext { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.collection-page .empty-state button { margin-top: 20px; }
.collection-page .skeleton { opacity: 1; background: transparent; border: 0; }
.collection-page .skeleton-img { aspect-ratio: 5 / 4; border: 1px solid var(--line); background: #e8e0d1; }
.collection-page .skeleton-text { margin-top: 14px; width: 65%; height: 16px; background: #e8e0d1; }
.collection-page .skeleton-text.subtitle { width: 40%; height: 10px; }
.collection-page .developer { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.collection-page .site-footer { margin-top: 30px; border-top: 1px solid var(--line); }
.collection-page .hidden, .collection-page [hidden] { display: none !important; }
@media (max-width: 1100px) {
    .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .collection-grid.collection-artists-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 700px) {
    .collection-controls { flex-direction: column; align-items: stretch; gap: 12px; padding: 13px 0; }
    .collection-views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .collection-view { min-height: 46px; padding: 10px 14px; }
    .collection-search-wrap { width: 100%; }
    .collection-search { font-size: 16px; }
    .collection-result-count { margin: 13px 0 16px; font-size: 11px; }
    .collection-grid { grid-template-columns: minmax(0,1fr); gap: 28px; }
    .collection-grid.collection-artists-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .collection-page .collection-caption h3 { font-size: 27px; }
    .collection-page .collection-painting-open { padding: 5px; }
    .collection-art-frame { inset: 5px; padding: 8px; }
    .collection-author-info { padding: 11px 7px 9px; gap: 9px; }
    .collection-author h3 { font-size: 23px; }
    .collection-page .site-footer { gap: 12px; flex-wrap: nowrap; }
    .collection-page .intro .collection-totals { margin-top: 10px; font-size: 11px; }
    .collection-page .painting-open-hint { opacity: .85; }
}
@media (max-width: 350px) {
    .collection-page .gallery-back { width: 44px; padding: 0; justify-content: center; }
    .collection-page .gallery-back-label { display: none; }
    .collection-author h3 { font-size: 21px; }
}

.collection-page .painting-dialog { border: 0; }

/* Existing professional distinctions, with readable labels and the original metals. */
.collection-author-titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.collection-honor { display: flex; align-items: flex-start; gap: 7px; padding: 8px; border: 1px solid rgba(220, 195, 154, .26); border-radius: 3px; background: rgba(220, 195, 154, .06); color: #dcc39a; font: 400 11px / 1.45 var(--sans); }
.collection-honor[data-type="народный"] { color: #e5c66d; border-color: rgba(229, 198, 109, .38); background: rgba(229, 198, 109, .07); }
.collection-honor[data-type="заслуженный"] { color: #d4dadc; border-color: rgba(212, 218, 220, .34); background: rgba(212, 218, 220, .07); }
.collection-honor[data-type="академик"] { color: #f1ece1; border-color: rgba(241, 236, 225, .36); background: rgba(241, 236, 225, .07); }
.collection-honor-icon { display: block; flex: 0 0 18px; width: 18px; height: 18px; }
.collection-honor-icon svg { display: block; width: 100%; height: 100%; }
.collection-honor-label { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 700px) {
    .collection-honor { gap: 5px; padding: 7px 5px; font-size: 10px; line-height: 1.4; }
    .collection-honor-icon { flex-basis: 16px; width: 16px; height: 16px; }
}
