/* One photo workspace for viewing and tagging. */
.albums-tag-people-modal.albums-lightbox-modal { width: min(1120px, calc(100vw - 32px)); height: min(840px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
.albums-tag-people-modal .photo-people-body { grid-template-columns: 320px minmax(0, 1fr); padding: 0; }
.albums-tag-people-modal .photo-people-sidebar { min-height: 0; min-width: 0; overflow-y: auto; overflow-x: hidden; padding: var(--space-3); }
.albums-tag-people-modal.is-searching .photo-people-sidebar { display: flex; flex-direction: column; }
.albums-tag-people-modal.is-searching .photo-people-results-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.albums-tag-people-modal.is-searching .photo-people-results { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
.albums-tag-people-modal .photo-people-results { border: 0; background: transparent; border-radius: 0; scrollbar-gutter: auto; }
.albums-tag-people-modal .photo-people-workspace { min-height: 0; min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: auto; padding: 0; }
.albums-tag-people-modal .photo-people-region-panel { grid-row: 1; }
.albums-tag-people-modal .albums-unified-preview-stage { grid-row: 2; min-height: 0; display: grid; place-items: center; padding: var(--space-3); overflow: hidden; container-type: size; }
.albums-tag-people-modal .photo-image-viewport { position: relative; width: 100%; height: 100%; min-height: 200px; overflow: hidden; touch-action: none; background: var(--gg-background); }
.albums-tag-people-modal .photo-image-viewport.is-panning { cursor: grab; }
.albums-tag-people-modal .photo-image-viewport.is-panning:active { cursor: grabbing; }
.albums-tag-people-modal .photo-image-viewport.is-drawing,
.albums-tag-people-modal .photo-image-viewport.is-drawing [data-face-region-selector] { cursor: crosshair; }
.albums-tag-people-modal .photo-image-viewport.is-panning [data-face-region-selector],
.albums-tag-people-modal .photo-image-viewport.is-panning .albums-lightbox-image-wrap { cursor: grab; }
.albums-tag-people-modal .photo-image-surface { position: absolute; left: 50%; top: 50%; transform-origin: center; will-change: transform; }
.albums-tag-people-modal .photo-image-surface .face-region-selector,
.albums-tag-people-modal .photo-image-surface .albums-lightbox-image-wrap { width: 100% !important; height: 100%; max-width: none; max-height: none !important; aspect-ratio: auto !important; border: 0; }
.albums-tag-people-modal .photo-image-surface img.albums-lightbox-image,
.albums-tag-people-modal .photo-image-surface .face-region-selector > img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: fill; }
.albums-tag-people-modal .photo-image-regions { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.albums-tag-people-modal .photo-image-regions > [data-image-region] { position: absolute; box-sizing: border-box; pointer-events: auto; }
.albums-tag-people-modal .photo-image-regions .face-region-box { box-shadow: 0 0 0 1px color-mix(in srgb, var(--gg-scrim) 70%, transparent); }
.albums-tag-people-modal .photo-image-regions .face-region-name,
.albums-tag-people-modal .photo-image-regions .albums-lightbox-face-name { font-size: 13px; line-height: 1.3; max-width: min(260px, 70vw); }
.albums-tag-people-modal .photo-image-regions .face-region-handle { right: auto; bottom: auto; width: 28px; height: 28px; border: 0; border-radius: 0; background: transparent; transform: none; touch-action: none; }
.albums-tag-people-modal .photo-image-regions .face-region-handle::after { content: ''; position: absolute; width: 12px; height: 12px; left: 8px; top: 8px; border: 2px solid white; border-radius: 50%; background: var(--brand-green-500); }
.albums-tag-people-modal .photo-image-tools { position: absolute; z-index: 8; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--border-default); border-radius: 6px; background: var(--surface-card); box-shadow: 0 6px 18px color-mix(in srgb, var(--gg-scrim) 30%, transparent); }
.albums-tag-people-modal .photo-image-tools button { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; padding: 4px 7px; border: 0; border-radius: 4px; background: transparent; color: var(--text-primary); cursor: pointer; }
.albums-tag-people-modal .photo-image-tools button:hover,
.albums-tag-people-modal .photo-image-tools button[aria-pressed="true"] { background: var(--surface-card-hover); }
.albums-tag-people-modal .photo-image-tools button:focus-visible { outline: 2px solid var(--brand-green-400); }
.albums-tag-people-modal .photo-image-tools button svg { width: 18px; height: 18px; }
.albums-tag-people-modal .photo-image-tools output { min-width: 42px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.albums-tag-people-modal .albums-lightbox-caption { grid-row: 3; }
.albums-tag-people-modal .albums-unified-preview-stage .face-region-selector { width: min(100%, calc((100cqh - 24px) * var(--photo-aspect))) !important; max-height: calc(100cqh - 24px); }
.albums-tag-people-modal .albums-lightbox-image-wrap { width: fit-content; max-width: 100%; }
.albums-tag-people-modal .albums-lightbox-image { max-height: calc(100cqh - 24px); }
.albums-tag-people-modal .albums-lightbox-face.is-active { border-width: 3px; border-color: var(--brand-green-400); background: color-mix(in srgb, var(--gg-primary) 12%, transparent); z-index: 1; }
.albums-tag-people-modal .albums-lightbox-face { pointer-events: auto; cursor: pointer; }
.albums-tag-people-modal .albums-lightbox-face.is-concealed { border-color: transparent; box-shadow: none; background: transparent; }
.albums-tag-people-modal .albums-lightbox-face:focus-visible { outline: 2px solid var(--brand-green-400); outline-offset: 2px; }
.albums-tag-people-modal .albums-lightbox-face-name { display: none; }
.albums-tag-people-modal .albums-lightbox-face.is-active .albums-lightbox-face-name { display: block; }
.albums-tag-people-modal .albums-unified-group { display: grid; gap: 2px; padding: var(--space-2) 0; }
.albums-tag-people-modal .albums-unified-group > strong { padding: var(--space-2); color: var(--text-secondary); font-size: 12px; }
.albums-tag-people-modal .albums-lightbox-people-list { display: block; padding: 0; overflow: visible; }
.albums-tag-people-modal .albums-lightbox-person { min-width: 0; max-width: none; }
.albums-tag-people-modal .albums-preview-footer-tools { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.albums-tag-people-modal .albums-marked-toggle { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: var(--space-2); }
.albums-tag-people-modal.is-preview .photo-people-search-head,
.albums-tag-people-modal.is-preview .photo-people-search-field,
.albums-tag-people-modal.is-preview .photo-people-results-panel,
.albums-tag-people-modal.is-tagging .photo-people-region-panel,
.albums-tag-people-modal.is-preview .albums-search-people { display: none; }
.albums-tag-people-modal.is-preview .albums-search-cancel,
.albums-tag-people-modal.is-tagging .albums-preview-footer-tools,
.albums-tag-people-modal.is-tagging .albums-preview-done { display: none; }
.albums-tag-people-modal.is-searching .albums-unified-preview { display: none; }
.albums-tag-people-modal .albums-lightbox-tag { margin: 0; }
.albums-tag-people-modal .photo-people-search-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.albums-tag-people-modal .photo-people-search-head h3 { margin: 0; font-size: 16px; }
.albums-tag-people-modal.is-tagging .photo-people-footer { justify-content: flex-end; }
.albums-tag-people-modal .albums-search-people { width: 100%; margin-bottom: var(--space-3); }
.albums-tag-people-modal .albums-unified-person-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: stretch; width: 100%; max-width: 100%; min-width: 0; border: 1px solid var(--border-default); border-radius: 6px; }
.albums-tag-people-modal .albums-unified-person-row + .albums-unified-person-row { margin-top: 4px; }
.albums-tag-people-modal .albums-unified-person-row.is-active { border-color: var(--brand-green-400); background: var(--surface-card-hover); }
.albums-tag-people-modal .albums-unified-person-row.is-hovered { border-color: var(--brand-green-400); background: var(--surface-card-hover); }
.albums-tag-people-modal .albums-unified-person-main { display: flex; align-items: center; gap: var(--space-2); width: 100%; min-width: 0; min-height: 52px; padding: var(--space-2); text-align: left; background: transparent; border: 0; color: var(--text-primary); cursor: pointer; }
.albums-tag-people-modal .albums-unified-person-copy { display: flex; flex: 1 1 0; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; }
.albums-tag-people-modal .albums-unified-person-copy strong,
.albums-tag-people-modal .albums-unified-person-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.albums-tag-people-modal .albums-unified-person-copy small { color: var(--text-secondary); }
.albums-tag-people-modal .albums-unified-person-action { width: 40px; min-width: 0; border: 0; background: transparent; color: var(--text-secondary); cursor: pointer; }
.albums-tag-people-modal .albums-unified-person-action svg { width: 18px; height: 18px; }
.albums-tag-people-modal .albums-unified-person-action:hover { color: var(--text-primary); }
.albums-tag-people-modal .albums-unified-person-main:focus-visible,
.albums-tag-people-modal .albums-unified-person-action:focus-visible { outline: 2px solid var(--brand-green-400); outline-offset: -2px; }
.albums-tag-people-modal .photo-people-footer { flex-wrap: wrap; gap: var(--space-2); }
.albums-tag-people-modal .photo-people-region-panel { display: block; }
.albums-tag-people-modal .photo-people-region-panel[hidden] { display: none; }
.albums-tag-people-modal .photo-people-region-heading { flex-wrap: wrap; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-default); }
.albums-tag-people-modal .photo-people-region-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.albums-tag-people-modal .photo-people-region-title strong { font-size: 15px; }
.albums-tag-people-modal .photo-people-region-title span { color: var(--text-secondary); overflow-wrap: anywhere; }
.albums-tag-people-modal .photo-people-region-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3); flex-wrap: wrap; margin-left: auto; }
.albums-tag-people-modal .photo-people-region-actions .button { min-height: 40px; }
.albums-tag-people-modal .photo-people-primary-choice { min-height: 40px; white-space: normal; }
.albums-tag-people-modal .face-region-other[data-person-id] { pointer-events: auto; cursor: pointer; }
.albums-tag-people-modal .face-region-other.is-concealed { border-color: transparent; background: transparent; }
.albums-tag-people-modal .face-region-other.is-hovered,
.albums-tag-people-modal .face-region-box.is-hovered { border-color: var(--brand-green-400); border-width: 3px; background: color-mix(in srgb, var(--gg-primary) 12%, transparent); z-index: 2; }
.albums-tag-people-modal .face-region-other:focus-visible { outline: 2px solid var(--brand-green-400); outline-offset: 2px; }
.albums-tag-people-modal .face-region-name { display: none; position: absolute; top: 100%; left: -2px; max-width: min(260px, 70vw); padding: 4px 8px; background: var(--surface-card); border: 1px solid var(--brand-green-300); border-radius: 0 0 4px 4px; color: var(--text-primary); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; z-index: 4; }
.albums-tag-people-modal .label-above > .face-region-name { top: auto; bottom: 100%; border-radius: 4px 4px 0 0; }
.albums-tag-people-modal .face-region-other.is-hovered > .face-region-name,
.albums-tag-people-modal .face-region-box.is-hovered > .face-region-name,
.albums-tag-people-modal .face-region-other:focus > .face-region-name,
.albums-tag-people-modal .face-region-box:focus > .face-region-name { display: block; }
.archive-unified-image-modal .photo-people-image-error { align-self: center; padding: var(--space-4); color: var(--text-secondary); text-align: center; }
.archive-unified-image-modal .modal-header > div { min-width: 0; }
.archive-unified-image-modal .modal-header h2 { overflow-wrap: anywhere; }

@media (max-width: 760px) {
    .albums-tag-people-modal .photo-people-body { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
    .albums-tag-people-modal .photo-people-workspace { order: -1; display: flex; flex-direction: column; flex: none; overflow: visible; border-bottom: 1px solid var(--border-default); }
    .albums-tag-people-modal .photo-people-sidebar { flex: none; overflow: visible; border: 0; padding: var(--space-3); }
    .albums-tag-people-modal .albums-unified-preview-stage { min-height: 250px; height: 42dvh; container-type: normal; }
    .albums-tag-people-modal .albums-lightbox-image { max-height: 42dvh; }
    .albums-tag-people-modal .photo-people-region-panel { padding: var(--space-3); }
    .albums-tag-people-modal .photo-people-region-heading { padding: var(--space-2) 0; }
    .albums-tag-people-modal .photo-people-region-actions { width: 100%; justify-content: space-between; margin-left: 0; }
    .albums-tag-people-modal .albums-unified-preview-stage .photo-image-surface .face-region-selector { width: 100% !important; max-height: none; }
    .albums-tag-people-modal .photo-image-tools { right: 8px; bottom: 8px; }
    .albums-tag-people-modal .photo-image-tools button { min-width: 34px; }
    .albums-tag-people-modal.is-tagging .person-photo-crop-hint { display: none; }
    .albums-tag-people-modal .photo-people-results,
    .albums-tag-people-modal .photo-people-selected-list { max-height: none; overflow: visible; }
    .albums-tag-people-modal.is-searching .photo-people-results { overflow: visible; }
    .albums-tag-people-modal .photo-people-footer { flex: 0 0 auto; }
}

@media (max-width: 540px) {
    #modalBackdrop:has(.albums-tag-people-modal) { padding: 0; }
    .albums-tag-people-modal.albums-lightbox-modal { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
    .albums-tag-people-modal.is-preview .photo-people-footer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .albums-tag-people-modal.is-preview .albums-preview-footer-tools { display: contents; }
    .albums-tag-people-modal.is-preview .albums-marked-toggle { grid-column: 1 / -1; grid-row: 1; min-width: 0; }
    .albums-tag-people-modal.is-preview .albums-lightbox-tag { grid-column: 1; grid-row: 2; width: 100%; }
    .albums-tag-people-modal.is-preview .photo-people-footer-actions { grid-column: 2; grid-row: 2; min-width: 0; }
    .albums-tag-people-modal.is-preview .albums-preview-done { width: 100%; }
    .albums-tag-people-modal.is-tagging .photo-people-footer-actions { width: 100%; justify-content: flex-end; }
    .archive-unified-image-modal.is-preview .photo-people-footer-actions { display: contents; }
    .archive-unified-image-modal.is-preview .albums-preview-done { grid-column: 2; grid-row: 2; }
}

@media (max-width: 700px) {
    .albums-lightbox-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(148px, 32%); }
    .albums-lightbox-main { grid-row: 1; }
    .albums-lightbox-people { grid-row: 2; border-right: 0; border-top: 1px solid var(--border-default); }
    .albums-lightbox-people-header { padding: var(--space-2) var(--space-3); }
    .albums-lightbox-people-list { display: flex; gap: var(--space-2); overflow: auto; }
    .albums-lightbox-person { min-width: 150px; max-width: 220px; }
    .albums-lightbox-tag { margin: var(--space-2); }
}

@media (max-width: 1380px) {
    .geneo-toolbar-button[data-geneo-templates] {
        display: none;
    }
}

@media (max-width: 1080px) {
    .geneo-editor-main {
        grid-template-columns: 1fr;
    }

    .geneo-inspector {
        position: absolute;
        z-index: 50;
        display: block;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(var(--inspector-width), 90vw);
        min-width: 0;
        box-shadow: -14px 0 36px color-mix(in srgb, var(--gg-scrim) 35%, transparent);
    }

    .geneo-inspector.collapsed {
        width: var(--inspector-collapsed-width);
        min-width: var(--inspector-collapsed-width);
    }

}

@media (max-width: 980px) {

    .albums-shell,
    .albums-shell.detail-collapsed {
        grid-template-columns: minmax(0, 1fr);
    }

    .albums-detail {
        display: none;
    }

    body.mobile-details-open .albums-shell .albums-detail {
        padding-top: 0 !important;
    }

    body.mobile-details-open .albums-detail-toolbar {
        padding-right: 68px;
    }

    body.mobile-details-open:has(.albums-detail) #mobileDetailsClose {
        top: 9px;
        right: 16px;
        width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        justify-content: center;
    }

    body.mobile-details-open:has(.albums-detail) #mobileDetailsClose span {
        display: none;
    }
}

@media (max-width: 900px) {
    .geneo-board-list .geneo-board-card {
        grid-template-columns:
            1fr;
    }

    .geneo-board-list .geneo-thumb {
        width:
            100%;

        height:
            92px;

        min-height:
            92px;

        border-right:
            0;

        border-bottom:
            1px solid var(--border-default);
    }

    .geneo-board-list .geneo-board-footer {
        min-width:
            0;

        padding:
            0 var(--space-3) var(--space-3);
    }

    .geneo-board-list .geneo-board-action-tile {
        grid-template-columns:
            44px minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .geneo-board-grid {
        grid-template-columns: 1fr;
    }

    .albums-main {
        padding: var(--space-4);
    }

    .albums-header {
        align-items: stretch;
        flex-direction: column;
    }

    .albums-header-actions {
        justify-content: flex-start;
    }

    .albums-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .albums-toolbar-left,
    .albums-toolbar-right {
        width: 100%;
    }

    .albums-toolbar-right {
        margin-left: 0;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .albums-sort-field {
        width: min(100%, 190px);
        min-width: 0;
    }

    .albums-selection-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .albums-selection-actions {
        justify-content: flex-start;
    }

    .albums-justified-grid,
    .albums-justified-grid.is-measuring {
        display: grid;
        grid-template-columns:
            repeat(auto-fill,
                minmax(150px, 1fr));
    }

    .albums-justified-row,
    .albums-justified-grid.is-measuring .albums-justified-row {
        display: contents;
    }

    .albums-justified-row .album-photo-card,
    .albums-justified-grid.is-measuring .album-photo-card {
        width: 100%;
        min-width: 0;
        flex: none;
        grid-template-rows: auto 116px;
    }

    .albums-justified-row .albums-thumb {
        height: auto;
        min-height: 150px;
        aspect-ratio: 4 / 3;
    }

    .albums-detail-read-row,
    .archive-file-read-row {
        grid-template-columns:
            1fr;

        gap:
            4px;
    }
}

@media (max-width: 420px) {
    .albums-justified-grid,
    .albums-justified-grid.is-measuring {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1180px) and (max-width: 1449px) {
    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-toolbar {
        gap: 8px;
    }

    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-toolbar-left {
        min-width: 160px;
    }

    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-toolbar-right {
        gap: 8px;
    }

    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-filter-button,
    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-toolbar .app-sort-field,
    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-toolbar .app-sort-trigger {
        width: 44px;
        min-width: 44px;
        max-width: 44px;
    }

    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-filter-button,
    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-toolbar .app-sort-trigger {
        padding-inline: 0;
        justify-content: center;
    }

    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-filter-button > span:not(.albums-filter-icon):not(.albums-filter-count),
    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-toolbar .app-sort-current,
    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-toolbar .app-sort-chevron {
        display: none;
    }

    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-header-actions .button.primary {
        width: 44px;
        min-width: 44px;
        padding-inline: 0;
        justify-content: center;
    }

    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-header-actions .button.primary span {
        display: none;
    }

    .albums-shell:not(.detail-collapsed):not(.no-detail) .albums-view-button {
        width: 44px;
        min-width: 44px;
        padding-inline: 0;
        justify-content: center;
    }
}

@media (max-width: 900px) {
    #modalBackdrop:has(.album-picker-modal) {
        padding: 8px;
    }

    .album-picker-modal {
        width: min(100%, calc(100vw - 16px));
        height: min(760px, calc(100dvh - 16px));
        max-height: calc(100dvh - 16px);
    }

    .album-picker-modal .album-picker-body {
        min-height: 0;
        padding: var(--space-4);
    }

    .album-picker-modal .album-picker-browse,
    .album-picker-modal .album-picker-results-panel {
        min-height: 0;
    }

    .album-picker-modal .album-picker-results {
        min-height: 0;
        height: 100%;
        max-height: none;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .album-picker-modal .album-picker-copy .album-picker-membership,
    .album-picker-modal .album-picker-copy .album-picker-description {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .album-picker-modal .album-picker-create {
        min-height: 0;
        overflow-y: auto;
    }

    body.mobile-surface-open:has(.albums-shell) #modalBackdrop .modal:not(.photo-people-modal):not(.notes-related-modal):not(.albums-lightbox-modal) {
        max-height: calc(100dvh - 16px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    body.mobile-surface-open:has(.albums-shell) #modalBackdrop .modal:not(.photo-people-modal):not(.notes-related-modal):not(.albums-lightbox-modal) > form {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    body.mobile-surface-open:has(.albums-shell) #modalBackdrop .modal:not(.photo-people-modal):not(.notes-related-modal):not(.albums-lightbox-modal) .modal-body {
        min-height: 0;
        overflow-y: auto;
    }

    body.mobile-surface-open:has(.albums-shell) #modalBackdrop .modal:not(.photo-people-modal):not(.notes-related-modal):not(.albums-lightbox-modal) .modal-footer {
        flex: 0 0 auto;
        flex-wrap: wrap;
    }

    .album-picker-modal.photo-people-modal .album-picker-results {
        max-height: none;
    }

    .albums-shell {
        height: calc(100dvh - var(--topbar-h));
    }

    .albums-main {
        overflow-y: auto;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .albums-header-actions {
        display: none;
    }

    .albums-content {
        flex: 0 0 auto;
        overflow: visible;
        scrollbar-gutter: auto;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .albums-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-2);
    }

    .albums-toolbar-left,
    .albums-toolbar-right,
    .albums-toolbar-left .app-search-field {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .albums-toolbar-left .app-search-field {
        flex: 1 1 auto;
    }

    .albums-toolbar-left {
        gap: var(--space-2);
    }

    .albums-mobile-add-photos {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: var(--space-2);
        flex: 0 0 auto;
        height: 44px;
        white-space: nowrap;
    }

    .albums-toolbar-right {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: var(--space-2);
        margin-left: 0;
    }

    .albums-filter-button,
    .albums-toolbar .app-sort-field,
    .albums-toolbar .app-sort-trigger,
    .albums-view-switch,
    .albums-view-button {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .albums-view-switch {
        grid-column: span 2;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-2);
    }

    .albums-view-button {
        justify-content: center;
    }

    .albums-card-footer:has(.mobile-item-details) {
        grid-template-columns: minmax(0, 1fr) 36px 32px;
    }

    .albums-card-footer .mobile-item-details {
        margin-left: auto;
        grid-column: 2;
        width: 36px;
        min-width: 36px;
        padding: 0;
    }

    .albums-card-footer .mobile-item-details span {
        display: none;
    }

    .albums-card-footer .albums-card-more {
        grid-column: 3;
    }

    .albums-list {
        min-width: 0;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
        gap: var(--space-2);
        border: 0;
        overflow: visible;
    }

    .albums-list-row.header {
        grid-column: 1 / -1;
        min-height: 44px;
        display: flex;
        gap: var(--space-3);
        padding: var(--space-2) var(--space-3);
        border: 1px solid var(--border-default);
        border-radius: var(--radius-sm);
    }

    .albums-list-row.header > :not(.albums-select-checkbox):not(.albums-mobile-select-all) {
        display: none;
    }

    .albums-mobile-select-all {
        display: inline;
        color: var(--text-secondary);
        font-size: 13px;
        font-weight: 700;
        text-transform: none;
    }

    .albums-list-row:not(.header) {
        min-width: 0;
        display: grid;
        grid-template-columns: 26px 56px minmax(0, 1fr) 36px;
        grid-template-rows: auto auto auto auto;
        gap: 5px var(--space-2);
        align-content: start;
        padding: var(--space-3);
        border: 1px solid var(--border-default);
        border-radius: var(--radius-sm);
    }

    .albums-list-row:not(.header) .albums-select-checkbox { grid-column: 1; grid-row: 1; width: 20px; height: 20px; }
    .albums-list-thumb { grid-column: 2; grid-row: 1 / 3; width: 56px; height: 56px; }
    .albums-list-title { grid-column: 3; grid-row: 1; }
    .albums-list-people { grid-column: 3 / -1; grid-row: 2; }
    .albums-list-date { grid-column: 2 / 4; grid-row: 3; }
    .albums-list-place { grid-column: 2 / -1; grid-row: 4; }
    .albums-list-favourite { grid-column: 4; grid-row: 3; }
    .albums-row-more { grid-column: 4; grid-row: 1; }

    .albums-list-people,
    .albums-list-date,
    .albums-list-place {
        min-width: 0;
        display: flex;
        gap: var(--space-2);
        align-items: baseline;
        white-space: normal;
    }

    .albums-list-row .albums-list-date,
    .albums-list-row .albums-list-place,
    .albums-list-row .albums-list-people {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .albums-mobile-cell-label {
        display: inline;
        flex: 0 0 auto;
        color: var(--text-tertiary);
        font-size: 11px;
        font-weight: 800;
    }

    .albums-list-people .albums-mobile-cell-label {
        display: none;
    }

    .albums-list-people > span:last-child,
    .albums-list-date > span:last-child,
    .albums-list-place > span:last-child {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 540px) {
    .albums-mobile-add-photos {
        min-width: 92px;
        padding-inline: 12px;
    }

    .albums-mobile-add-photos .albums-add-label-full {
        display: none;
    }

    .albums-mobile-add-photos .albums-add-label-short {
        display: inline;
    }

    .albums-filter-button {
        position: relative;
        padding-inline: 0;
    }

    .albums-filter-button > span:not(.albums-filter-icon):not(.albums-filter-count),
    .albums-toolbar .app-sort-current,
    .albums-toolbar .app-sort-chevron {
        display: none;
    }

    .albums-filter-count {
        position: absolute;
        top: 2px;
        right: 2px;
    }

    .albums-toolbar .app-sort-trigger {
        justify-content: center;
        padding-inline: 0;
    }
}
