/* Albums: Tag people modal */
.photo-people-modal {
    width:
        min(1080px,
            calc(100vw - 32px));

    height:
        min(760px,
            calc(100vh - 48px));

    max-height:
        calc(100vh - 48px);

    overflow: hidden;

    display: grid;
    grid-template-rows:
        auto minmax(0, 1fr) auto;
}

.photo-people-body {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    overflow: hidden;
}

.photo-people-sidebar {
    min-width: 0;
    min-height: 0;
    padding: var(--space-4);
    border-right: 1px solid var(--border-default);
    display: grid;
    grid-template-rows: auto minmax(0, max-content) auto;
    gap: var(--space-3);
    overflow: hidden;
}

@media (min-width: 761px) {
    .albums-tag-people-modal .photo-people-sidebar {
        grid-template-rows: max-content max-content max-content;
        align-content: start;
        overflow-y: auto;
    }

    .albums-tag-people-modal .photo-people-selected-panel {
        max-height: min(40vh, 260px);
    }
}

.photo-people-workspace {
    min-width: 0;
    min-height: 0;
    padding: var(--space-4);
    display: grid;
    overflow: auto;
}

.photo-people-region-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: var(--space-3);
    min-width: 0;
    min-height: 0;
}

.photo-people-region-panel[hidden] { display: none; }

.photo-people-region-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.photo-people-photo-stage {
    min-height: 0;
    display: grid;
    place-items: center;
}

.photo-people-region-panel .face-region-selector {
    justify-self: center;
    max-height: 100%;
}

.photo-people-region-panel.is-inactive .face-region-selector { cursor: default; }

.photo-people-region-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.photo-people-region-controls .person-photo-crop-hint { margin: 0; }

.face-region-other {
    position: absolute;
    border: 2px solid color-mix(in srgb, var(--gg-text) 70%, transparent);
    background: color-mix(in srgb, var(--gg-text) 6%, transparent);
    pointer-events: none;
}

.photo-people-modal .face-region-box { box-shadow: 0 0 0 999px color-mix(in srgb, var(--gg-scrim) 13%, transparent); }

.photo-people-primary-choice { display: flex; align-items: center; gap: var(--space-2); }

.photo-people-region-error { color: var(--text-danger, var(--gg-accent-rose-sepia-accent)); }

.photo-people-search-field,
.photo-people-selected-panel,
.photo-people-results-panel {
    min-width: 0;
}

.photo-people-search-field .search-input input {
    padding: 0;
    text-align: left;
}

.albums-tag-people-modal .photo-people-search-field .app-search-field {
    width: 100%;
    background: var(--surface-input);
}

.photo-people-selected-panel,
.photo-people-results-panel {
    display: grid;
    gap: var(--space-2);
}

.photo-people-selected-panel[hidden] {
    display: none;
}

.photo-people-selected-panel {
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
}

.photo-people-results-panel {
    min-height: 0;
    align-self: start;

    grid-template-rows:
        auto minmax(0, auto);
}

.photo-people-selected-head,
.photo-people-results-head {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.photo-people-selected-head strong,
.photo-people-results-head strong {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 850;
}

.photo-people-selected-head span,
.photo-people-results-head span {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.photo-people-selected-list {
    min-width: 0;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 4px;
    overflow-y: auto;
}

.photo-people-selected-chip {
    min-width: 0;
    width: 100%;
    min-height: 52px;
    padding: 3px 6px;

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

    border-radius:
        var(--radius-sm);

    background: var(--surface-card);

    color: var(--text-primary);

    display: flex;
    align-items: center;
    gap: 4px;

    font: inherit;
}

.photo-people-region-action,
.photo-people-selected-remove {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.photo-people-region-action {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 7px;
    min-width: 0;
}

.photo-people-region-action .photo-people-chip-avatar { grid-row: 1 / 3; }
.photo-people-selected-name,
.photo-people-area-status { grid-column: 2; }

.photo-people-region-action:focus-visible,
.photo-people-selected-remove:focus-visible { outline: 2px solid var(--brand-green-400); }

.photo-people-selected-chip:hover {
    background: var(--surface-card-hover);
}

.photo-people-selected-chip.is-active,
.photo-people-selected-chip.is-active:hover {
    border-color:
        color-mix(in srgb, var(--gg-primary) 48%, transparent);

    background:
        color-mix(in srgb, var(--gg-primary) 50%, transparent);
}

.photo-people-selected-chip:focus-visible {
    outline:
        2px solid var(--brand-green-400);

    outline-offset: 2px;
}

.photo-people-chip-avatar {
    --person-avatar-width: 28px;
    --person-avatar-radius: 7px;
    --person-avatar-font-size: 10px;
}

.photo-people-selected-name {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 12px;
    font-weight: 800;
}

.photo-people-area-status {
    color: var(--text-tertiary);
    font-size: 11px;
    white-space: nowrap;
}

.photo-people-empty-selection {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 12px;
}

.photo-people-region-action { flex: 1; justify-content: flex-start; }

.photo-people-selected-remove {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;

    display: grid;
    place-items: center;

    color: var(--text-tertiary);
}

.photo-people-selected-remove svg {
    width: 14px;
    height: 14px;
    display: block;
}

.photo-people-results {
    min-width: 0;
    min-height: 0;
    max-height: 164px;

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

    border-radius:
        var(--radius-sm);

    background:
        color-mix(in srgb, var(--gg-scrim) 8%, transparent);

    overflow-x: hidden;
    overflow-y: auto;

    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.photo-people-result {
    width: 100%;
    min-height: 78px;

    padding:
        var(--space-3) var(--space-4);

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

    color: var(--text-secondary);

    display: grid;
    grid-template-columns:
        44px minmax(0, 1fr) auto;
    gap: var(--space-3);
    align-items: center;

    cursor: pointer;
}

.photo-people-result:last-child {
    border-bottom: 0;
}

.photo-people-result:hover,
.photo-people-result:focus-within {
    background:
        var(--surface-card-hover);
}

.photo-people-result:focus-within {
    outline:
        2px solid var(--brand-green-400);

    outline-offset: -2px;
}

.photo-people-result.is-already-linked {
    cursor:
        default;

    opacity:
        .68;
}

.photo-people-result.is-already-linked:hover {
    background:
        transparent;
}

.photo-people-result.is-already-linked input {
    cursor:
        default;
}

.photo-people-result-avatar {
    --person-avatar-width: 44px;
    --person-avatar-radius: 9px;
    --person-avatar-font-size: 12px;
}

.photo-people-result-copy {
    min-width: 0;

    display: grid;
    gap: 2px;
}

.photo-people-result-copy strong,
.photo-people-result-copy span {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-people-result-copy strong {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.25;
}

.photo-people-result-copy span {
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.25;
}

.photo-people-result input {
    width: 18px;
    height: 18px;
    margin: 0;

    accent-color:
        var(--brand-green-500);

    cursor: pointer;
}

.photo-people-modal .photo-people-result {
    min-height: 54px;
    padding: 5px 8px;
    grid-template-columns: 32px minmax(0, 1fr) 20px;
    gap: 8px;
    background: transparent;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    text-align: left;
    font: inherit;
}

.photo-people-modal .photo-people-result:focus-visible {
    outline: 2px solid var(--brand-green-400);
    outline-offset: -2px;
}

.photo-people-modal .photo-people-result-avatar {
    --person-avatar-width: 32px;
    --person-avatar-radius: 6px;
    --person-avatar-font-size: 10px;
}

.photo-people-result-add svg { width: 16px; height: 16px; }

.photo-people-modal .photo-people-result-copy span {
    display: block;
}

.photo-people-empty {
    min-height: 100%;

    padding: var(--space-5);

    color: var(--text-tertiary);

    display: grid;
    place-items: center;

    text-align: center;
    line-height: 1.45;
}

.photo-people-footer {
    align-items: center;
    justify-content: space-between;
}

.photo-people-footer-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
}

.photo-people-primary-copy {
    margin: 0;

    color: var(--text-secondary);
    line-height: 1.5;
}

.photo-people-primary-list {
    margin: 0;
    padding-left: var(--space-5);

    color: var(--text-primary);

    display: grid;
    gap: var(--space-2);
}

.notes-place-search-toolbar {
    min-width: 0;

    display: grid;
    grid-template-columns:
        minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-3);
}

.notes-place-search-toolbar .search-input {
    min-width: 0;
}

.notes-place-search-toolbar>.button {
    min-height: var(--control-height);
    white-space: nowrap;
}

.notes-place-result-icon {
    width: 44px;
    height: 44px;

    border:
        1px solid color-mix(in srgb, var(--gg-accent-map-cyan-accent) 25%, transparent);

    border-radius: 9px;

    background:
        color-mix(in srgb, var(--gg-primary) 10%, transparent);

    color: var(--gg-accent-map-cyan-accent);

    display: grid;
    place-items: center;
}

.notes-place-result-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.notes-place-result input {
    accent-color: var(--gg-accent-map-cyan-accent);
}

.notes-place-result:focus-within {
    outline-color: var(--gg-accent-map-cyan-accent);
}

.notes-place-result-meta {
    color: var(--text-tertiary);
}

.notes-place-selected-chip-list {
    align-items: center;
}

.notes-place-selected-chip {
    border-color:
        color-mix(in srgb, var(--gg-accent-map-cyan-accent) 28%, transparent);

    background:
        color-mix(in srgb, var(--gg-primary) 8%, transparent);
}

.notes-place-selected-chip:hover,
.notes-place-selected-chip:focus-within {
    border-color:
        color-mix(in srgb, var(--gg-accent-map-cyan-accent) 52%, transparent);

    background:
        color-mix(in srgb, var(--gg-primary) 13%, transparent);
}

.notes-place-selected-chip .relation-action-button:hover,
.notes-place-selected-chip .relation-action-button:focus-visible {
    color: var(--gg-accent-map-cyan-accent);
}

.notes-place-remove:hover,
.notes-place-remove:focus-visible {
    border-color:
        color-mix(in srgb, var(--gg-accent-rose-sepia-accent) 35%, transparent);

    background:
        color-mix(in srgb, var(--gg-accent-rose-sepia-accent) 10%, transparent);

    color: var(--red);
}

.notes-place-remove:focus-visible {
    outline:
        2px solid var(--red);
    outline-offset: 2px;
}

.notes-place-remove svg {
    width: 16px;
    height: 16px;
    display: block;
}

.notes-place-empty-actions {
    margin-top:
        var(--space-4);

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
}

@media (max-width: 620px) {
    .photo-people-modal {
        width:
            min(100%,
                calc(100vw - 24px));

        height:
            min(760px,
                calc(100vh - 24px));

        max-height:
            calc(100vh - 24px);
    }

    .photo-people-body {
        padding: var(--space-4);
    }

    .photo-people-result {
        padding-inline:
            var(--space-3);
    }

    .photo-people-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .photo-people-footer-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 760px) {
    .photo-people-modal .modal-header { padding: 12px 16px; }

    .photo-people-body {
        padding: 0;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        overflow-y: auto;
    }

    .photo-people-sidebar {
        min-height: 300px;
        padding: 10px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--border-default);
        grid-template-rows: auto auto auto;
        overflow: visible;
    }

    .photo-people-selected-list { max-height: 86px; }
    .photo-people-results { max-height: 68px; }
    .photo-people-workspace { min-height: 280px; overflow: visible; }
    .photo-people-region-panel { grid-template-rows: auto auto auto auto; }
    .photo-people-photo-stage { min-height: 180px; }

    #modalBackdrop:has(.albums-tag-people-modal) {
        padding: 8px;
    }

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

    .albums-tag-people-modal .photo-people-body {
        display: block;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }

    .albums-tag-people-modal .photo-people-sidebar {
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .albums-tag-people-modal .photo-people-selected-panel,
    .albums-tag-people-modal .photo-people-results-panel {
        display: flex;
        flex-direction: column;
        flex: none;
    }

    .albums-tag-people-modal .photo-people-selected-list,
    .albums-tag-people-modal .photo-people-results {
        max-height: none;
        overflow: visible;
    }

    .albums-tag-people-modal .photo-people-workspace {
        min-height: 0;
        overflow: visible;
    }

    .albums-tag-people-modal .photo-people-photo-stage {
        min-height: 220px;
    }
}

/* Notes: person-first Add Events modal */
.notes-events-modal {
    width:
        min(980px,
            calc(100vw - 48px));

    height:
        min(800px,
            calc(100dvh - 48px));

    max-height:
        calc(100dvh - 48px);

    overflow: hidden;

    display: grid;

    grid-template-rows:
        auto minmax(0, 1fr) auto;
}

.notes-event-picker-body {
    min-width: 0;
    min-height: 0;

    padding: var(--space-5);

    display: grid;

    grid-template-rows:
        minmax(0, 1fr) auto;

    gap: var(--space-4);

    overflow: hidden;
}

.notes-event-picker-grid {
    min-width: 0;
    min-height: 0;

    display: grid;

    grid-template-columns:
        320px minmax(0, 1fr);

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

    border-radius:
        var(--radius-md);

    background:
        color-mix(in srgb, var(--gg-scrim) 8%, transparent);

    overflow: hidden;
}

.notes-event-person-pane {
    min-width: 0;
    min-height: 0;

    padding: var(--space-4);

    display: grid;

    grid-template-rows:
        auto auto minmax(0, 1fr);

    gap: var(--space-3);

    border-right:
        1px solid var(--border-default);

    background:
        color-mix(in srgb, var(--gg-text) 1.8%, transparent);
}

.notes-event-search-field {
    min-width: 0;
}

.notes-event-search-field .search-input input {
    padding: 0;
    text-align: left;
}

.notes-event-person-results-head {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content:
        space-between;
    gap: var(--space-3);
}

.notes-event-person-results-head strong {
    color:
        var(--text-secondary);

    font-size: 13px;
    font-weight: 850;
}

.notes-event-person-results-head span {
    color:
        var(--text-tertiary);

    font-size: 12px;
    font-weight: 750;

    white-space: nowrap;
}

.notes-event-person-results {
    min-width: 0;
    min-height: 0;

    display: grid;
    align-content: start;

    overflow-x: hidden;
    overflow-y: auto;

    overscroll-behavior:
        contain;

    scrollbar-gutter:
        stable;
}

.notes-event-person-results:has(> .notes-event-empty) {
    grid-template-rows: minmax(0, 1fr);
}

.notes-event-person-result {
    width: 100%;
    min-width: 0;
    min-height: 68px;

    padding:
        9px 8px;

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

    background:
        transparent;

    color:
        var(--text-secondary);

    display: grid;

    grid-template-columns:
        40px minmax(0, 1fr) 18px;

    align-items: center;
    gap: 10px;

    text-align: left;
}

.notes-event-person-result:hover,
.notes-event-person-result:focus-visible {
    background:
        var(--surface-card-hover);
}

.notes-event-person-result.active {
    background:
        var(--surface-selected);

    box-shadow:
        inset 3px 0 0 var(--brand-green-400);
}

.notes-event-person-result:focus-visible {
    outline:
        2px solid var(--brand-green-400);

    outline-offset: -2px;
}

.notes-event-person-avatar {
    --person-avatar-width: 40px;
    --person-avatar-radius: 9px;
    --person-avatar-font-size: 11px;
}

.notes-event-person-copy {
    min-width: 0;

    display: grid;
    gap: 1px;
}

.notes-event-person-copy strong,
.notes-event-person-copy span {
    min-width: 0;

    overflow: hidden;
    text-overflow:
        ellipsis;
    white-space: nowrap;
}

.notes-event-person-copy strong {
    color:
        var(--text-primary);

    font-size: 13px;
    line-height: 1.3;
}

.notes-event-person-copy span {
    color:
        var(--text-tertiary);

    font-size: 11px;
    line-height: 1.3;
}

.notes-event-person-copy .notes-event-person-count {
    color:
        var(--text-secondary);

    font-weight: 750;
}

.notes-event-person-chevron {
    width: 18px;
    height: 18px;

    color:
        var(--text-tertiary);

    display: grid;
    place-items: center;
}

.notes-event-person-chevron svg {
    width: 16px;
    height: 16px;
}

.notes-event-timeline-pane {
    min-width: 0;
    min-height: 0;

    display: grid;

    grid-template-rows:
        auto minmax(0, 1fr);

    overflow: hidden;
}

.notes-event-timeline-pane:has(> .notes-event-timeline-empty) {
    grid-template-rows: minmax(0, 1fr);
}

.notes-event-person-header {
    min-width: 0;
    min-height: 80px;

    padding:
        var(--space-4) var(--space-5);

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

    background:
        color-mix(in srgb, var(--gg-text) 1.8%, transparent);

    display: grid;

    grid-template-columns:
        48px minmax(0, 1fr);

    align-items: center;
    gap: var(--space-3);
}

.notes-event-back {
    display: none;
}

.notes-event-active-avatar {
    --person-avatar-width: 48px;
    --person-avatar-radius: 10px;
    --person-avatar-font-size: 13px;
}

.notes-event-active-copy {
    min-width: 0;

    display: grid;
    gap: 2px;
}

.notes-event-active-copy strong,
.notes-event-active-copy span {
    min-width: 0;

    overflow: hidden;
    text-overflow:
        ellipsis;
    white-space: nowrap;
}

.notes-event-active-copy strong {
    color:
        var(--text-primary);

    font-size: 16px;
    line-height: 1.25;
}

.notes-event-active-copy span {
    color:
        var(--text-tertiary);

    font-size: 12px;
    line-height: 1.25;
}

.notes-event-results {
    min-width: 0;
    min-height: 0;

    overflow-x: hidden;
    overflow-y: auto;

    overscroll-behavior:
        contain;

    scrollbar-gutter:
        stable;
}

.notes-event-result {
    width: 100%;
    min-width: 0;
    min-height: 84px;

    padding:
        var(--space-3) var(--space-4);

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

    color:
        var(--text-secondary);

    display: grid;

    grid-template-columns:
        38px minmax(0, 1fr) auto;

    align-items: center;
    gap: var(--space-3);

    cursor: pointer;
}

.notes-event-result:hover,
.notes-event-result:focus-within {
    background:
        var(--surface-card-hover);
}

.notes-event-result:focus-within {
    outline:
        2px solid var(--blue);

    outline-offset: -2px;
}

.notes-event-result.is-selected {
    background:
        color-mix(in srgb, var(--gg-primary) 9%, transparent);
}

.notes-event-result.is-complete {
    cursor: default;
}

.notes-event-result-icon {
    width: 38px;
    height: 38px;

    border:
        1px solid color-mix(in srgb, var(--gg-accent-map-cyan-accent) 28%, transparent);

    border-radius: 9px;

    background:
        color-mix(in srgb, var(--gg-primary) 11%, transparent);

    color: var(--gg-status-info-accent);

    display: grid;
    place-items: center;
}

.notes-event-result-icon svg {
    width: 19px;
    height: 19px;
    display: block;
}

.notes-event-result-copy {
    min-width: 0;

    display: grid;
    gap: 2px;
}

.notes-event-result-copy strong,
.notes-event-result-copy span {
    min-width: 0;

    overflow: hidden;
    text-overflow:
        ellipsis;
    white-space: nowrap;
}

.notes-event-result-copy strong {
    color:
        var(--text-primary);

    font-size: 14px;
    line-height: 1.3;
}

.notes-event-result-copy span {
    color:
        var(--text-tertiary);

    font-size: 12px;
    line-height: 1.3;
}

.notes-event-result-copy .notes-event-result-date {
    color:
        var(--text-secondary);

    font-weight: 750;
}

.notes-event-result-copy .notes-event-result-relationship {
    color: var(--gg-status-info-accent);
}

.notes-event-result-end {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
}

.notes-event-result-end input {
    width: 18px;
    height: 18px;
    margin: 0;

    accent-color:
        var(--blue);

    cursor: pointer;
}

.notes-event-result-end input:disabled {
    cursor: default;
}

.notes-event-already-added {
    color:
        var(--brand-green-300);

    font-size: 11px;
    font-weight: 800;

    white-space: nowrap;
}

.notes-event-timeline-empty,
.notes-event-empty {
    min-width: 0;
    min-height: 100%;

    padding: var(--space-5);

    color:
        var(--text-tertiary);

    display: grid;
    place-items: center;
    align-content: center;
    gap: var(--space-3);

    text-align: center;
    line-height: 1.45;
}

.notes-event-empty strong,
.notes-event-timeline-empty strong {
    color:
        var(--text-primary);
}

.notes-event-empty span,
.notes-event-timeline-empty span {
    max-width: 360px;
}

.notes-event-timeline-empty-icon {
    width: 48px;
    height: 48px;

    border:
        1px solid color-mix(in srgb, var(--gg-accent-map-cyan-accent) 24%, transparent);

    border-radius:
        var(--radius-md);

    background:
        color-mix(in srgb, var(--gg-primary) 9%, transparent);

    color: var(--gg-status-info-accent);

    display: grid;
    place-items: center;
}

.notes-event-timeline-empty-icon svg {
    width: 24px;
    height: 24px;
}

.notes-event-picker-footer {
    align-items: center;
    justify-content:
        space-between;
}

.notes-event-selection-count {
    color:
        var(--text-tertiary);

    font-size: 13px;
    font-weight: 750;
}

.notes-event-footer-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
}

.notes-event-picker-footer [data-notes-event-save]:disabled,
.notes-event-picker-footer [data-notes-event-save]:disabled:hover {
    opacity: .48;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

@media (max-width: 720px) {
    .notes-events-modal {
        width:
            min(100%,
                calc(100vw - 24px));

        height:
            min(780px,
                calc(100vh - 24px));

        max-height:
            calc(100vh - 24px);
    }

    .notes-event-picker-body {
        padding: var(--space-4);
    }

    .notes-event-picker-grid {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .notes-event-person-pane {
        border-right: 0;
    }

    .notes-events-modal.is-showing-people .notes-event-timeline-pane {
        display: none;
    }

    .notes-events-modal.is-showing-events .notes-event-person-pane {
        display: none;
    }

    .notes-event-back {
        display: inline-flex;

        grid-column:
            1 / -1;

        justify-self: start;
    }

    .notes-event-person-header {
        grid-template-columns:
            48px minmax(0, 1fr);
    }

    .notes-event-picker-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .notes-event-footer-actions {
        justify-content:
            flex-end;
    }
}

.albums-delete-copy {
    padding: var(--space-4);
    border: 1px solid color-mix(in srgb, var(--gg-accent-rose-sepia-accent) 24%, transparent);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--gg-accent-rose-sepia-accent) 8%, transparent);
    color: var(--gg-accent-rose-sepia-accent);
}

.albums-lightbox-photo {
    width: 100%;
    height: min(64vh, 720px);

    border-radius:
        var(--radius-sm);
}

.albums-lightbox-photo .thumb-img {
    object-fit: contain;
}

.albums-lightbox-modal {
    width: min(1120px, calc(100vw - 32px));
    height: min(840px, calc(100vh - 32px));
    max-height: calc(100vh - 32px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.albums-lightbox-body {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
}

.albums-lightbox-people {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-right: 1px solid var(--border-default);
}

.albums-lightbox-people-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-default);
}

.albums-lightbox-people-header h3 { margin: 0; font-size: 16px; }
.albums-lightbox-people-header span { color: var(--text-secondary); }
.albums-lightbox-people-list { min-height: 0; overflow: auto; padding: var(--space-3); }
.albums-lightbox-empty { margin: var(--space-3); color: var(--text-secondary); }
.albums-lightbox-person {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}
.albums-lightbox-person:hover,
.albums-lightbox-person[aria-pressed="true"] { background: var(--surface-card-hover); border-color: var(--border-default); }
.albums-lightbox-person:focus-visible { outline: 2px solid var(--brand-green-400); outline-offset: -2px; }
.albums-lightbox-person span:last-child { min-width: 0; overflow-wrap: anywhere; }
.albums-lightbox-tag { margin: var(--space-3); justify-content: center; }
.albums-lightbox-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.albums-lightbox-stage { min-width: 0; min-height: 0; display: grid; place-items: center; padding: var(--space-4); container-type: size; }
.albums-lightbox-image-wrap { position: relative; max-width: 100%; max-height: 100%; }
.albums-lightbox-image { display: block; max-width: 100%; max-height: calc(100cqh - 32px); object-fit: contain; }
.albums-lightbox-face {
    position: absolute;
    border: 2px solid var(--brand-green-300);
    border-radius: 4px;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--gg-scrim) 70%, transparent);
    pointer-events: none;
}
.albums-lightbox-face[hidden] { display: none; }
.albums-lightbox-face-name {
    position: absolute;
    top: 100%;
    left: 0;
    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;
}
.albums-lightbox-face.label-above .albums-lightbox-face-name { top: auto; bottom: 100%; border-radius: 4px 4px 0 0; }
.albums-lightbox-caption { margin: 0; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border-default); color: var(--text-secondary); }

