.school-photos { margin-top: 1rem; }
.school-photos-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.school-photos-title { font-size: 1rem; font-weight: 600; color: #334155; margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.school-photos-count { font-size: 0.75rem; font-weight: 600; color: #64748b; background: #f1f5f9; border-radius: 9999px; padding: 0.1rem 0.5rem; }
.school-photos-folders { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.school-photos-empty { color: #64748b; font-size: 0.875rem; margin: 0; }

.school-photos-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
.school-photos-tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #f1f5f9; }
.school-photos-thumb { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.school-photos-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.school-photos-thumb:hover img { transform: scale(1.03); }
.school-photos-thumb:focus-visible { outline: 2px solid #1e293b; outline-offset: -2px; }
.school-photos-badge { position: absolute; left: 8px; top: 8px; font-size: 0.7rem; font-weight: 600; color: #fff; background: rgba(15, 23, 42, 0.75); border-radius: 9999px; padding: 0.15rem 0.5rem; }
.school-photos-menu { position: absolute; right: 4px; top: 4px; background: rgba(255, 255, 255, 0.9); border-radius: 8px; }

.school-photos-viewer-backdrop { background: rgba(2, 6, 23, 0.85); }
.school-photos-viewer { position: fixed; inset: 0; z-index: 101; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 4rem 5rem; outline: none; pointer-events: none; }
.school-photos-viewer > * { pointer-events: auto; }
.school-photos-viewer-image { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4); }
.school-photos-viewer-close, .school-photos-viewer-nav { all: unset; position: absolute; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9999px; color: #fff; background: rgba(255, 255, 255, 0.12); cursor: pointer; }
.school-photos-viewer-close:hover, .school-photos-viewer-nav:hover { background: rgba(255, 255, 255, 0.24); }
.school-photos-viewer-close { top: 1rem; right: 1rem; }
.school-photos-viewer-nav.prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.school-photos-viewer-nav.next { right: 1rem; top: 50%; transform: translateY(-50%); }
.school-photos-viewer-footer { position: absolute; bottom: 1rem; left: 1rem; right: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: #e2e8f0; font-size: 0.875rem; }
.school-photos-viewer-actions { display: flex; gap: 0.5rem; }
.school-photos-confirm-backdrop, .school-photos-confirm { z-index: 110; }

@media (max-width: 600px) {
    .school-photos-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .school-photos-viewer { padding: 3.5rem 0.5rem 6rem; }
    .school-photos-viewer-footer { flex-direction: column; align-items: flex-start; }
}

.school-photos-pills { flex-wrap: wrap; border-radius: 12px; }
.school-photos-folders.is-dragging .school-photos-pill * { pointer-events: none; }
.school-photos-pill.is-droppable { outline: 1px dashed #94a3b8; outline-offset: -1px; }
.school-photos-pill.is-drop-target { background: #dbeafe; color: #1d4ed8; outline: 2px solid #1d4ed8; }
.school-photos-tile[draggable="true"] { cursor: grab; }

.school-photos-dropzone { position: relative; min-height: 4rem; }
.school-photos-drop-input { display: none; }
.school-photos-drop-input.is-active { display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; z-index: 3; cursor: copy; }
.school-photos-dropzone.is-file-dragging .school-photos-dropzone-content { opacity: 0.35; }
.school-photos-dropzone.is-file-dragging { outline: 2px dashed #64748b; outline-offset: 4px; border-radius: 12px; }
.school-photos-drop-hint { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; font-weight: 600; color: #0f172a; }

.school-photos-more { position: relative; display: inline-flex; }
.school-photos-more-btn { gap: 0.25rem; }
.school-photos-more-backdrop { position: fixed; inset: 0; z-index: 20; }
.school-photos-more-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 21; width: 18rem; max-width: calc(100vw - 2rem); background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12); padding: 0.5rem; }
.school-photos-more-search { width: 100%; box-sizing: border-box; border: 1px solid #cbd5e1; border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 0.875rem; margin-bottom: 0.375rem; }
.school-photos-more-list { list-style: none; margin: 0; padding: 0; max-height: 16rem; overflow-y: auto; }
.school-photos-more-list button { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.4rem 0.5rem; border-radius: 8px; font-size: 0.875rem; color: #334155; cursor: pointer; }
.school-photos-more-list button:hover, .school-photos-more-list button:focus-visible { background: #f1f5f9; }
.school-photos-more-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.school-photos-more-empty { margin: 0.25rem 0.5rem; font-size: 0.8125rem; color: #64748b; }
.school-photos-pill { max-width: 12rem; }
.school-photos-pill-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.school-photos-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.school-photos-pill-group { display: inline-flex; align-items: center; border-radius: 9999px; }
.school-photos-pill-group.active { background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
.school-photos-pill-group.active .school-photos-pill.active { background: transparent; box-shadow: none; }
.school-photos-pill-group.has-menu.active .school-photos-pill { padding-right: 0.25rem; }
.school-photos-pill-menu { display: none; margin-right: 0.25rem; }
.school-photos-pill-menu .mud-icon-button { padding: 2px; }
.school-photos-pill-menu.is-visible { display: inline-flex; }
