*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #1a1a2e;
    --bg-surface: #16213e;
    --bg-hover: #1f3056;
    --border: #2a3a5c;
    --text: #e0e0e0;
    --text-muted: #8899aa;
    --accent: #4fc3f7;
    --accent-hover: #81d4fa;
    --tag-active: #0a3d62;
    --thumb-bg: #0f1626;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    gap: 16px;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
}

.search-box {
    position: relative;
    max-width: 360px;
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--accent);
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.suggestions-dropdown.active {
    display: block;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.85rem;
}

.suggestion-item:hover {
    background: var(--bg-hover);
}

.suggestion-item .path {
    color: var(--text-muted);
    font-size: 0.8rem;
}

#share-btn {
    padding: 8px 16px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

#share-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

/* Re-index — tucked into sidebar bottom */
.sidebar-bottom {
    padding: 8px 8px 4px;
}

.reindex-btn {
    padding: 5px 10px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.reindex-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.reindex-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Filter bar — chips only */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    min-height: 0;
}

.filter-bar:empty,
.filter-bar[hidden] {
    display: none;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--tag-active);
    color: var(--accent);
    border-radius: 12px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.filter-chip.locked {
    background: rgba(79, 195, 247, 0.12);
    border: 1px solid rgba(79, 195, 247, 0.3);
    cursor: default;
}

.filter-chip .lock-icon {
    font-size: 0.7rem;
    opacity: 0.7;
}

.chip-remove {
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.chip-remove:hover {
    opacity: 1;
}

.clear-filters-btn {
    padding: 4px 10px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.78rem;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.clear-filters-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

/* Sidebar sections */
.sidebar-section {
    border-bottom: 1px solid var(--border);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    user-select: none;
    transition: color 0.15s;
}

.sidebar-section-header:hover {
    color: var(--text);
}

.section-arrow {
    font-size: 0.6rem;
    transition: transform 0.2s;
    display: inline-block;
}

.sidebar-section-header:not(.expanded) .section-arrow {
    transform: rotate(-90deg);
}

.sidebar-section-body {
    display: none;
    padding: 0 4px 8px;
    max-height: 300px;
    overflow-y: auto;
}

.sidebar-section-body.expanded {
    display: block;
}

/* Sidebar date filter rows */
.sidebar-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 4px;
    font-size: 0.82rem;
}

.sidebar-filter-row label {
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 64px;
    font-size: 0.8rem;
}

.sidebar-filter-row select {
    flex: 1;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.8rem;
    outline: none;
}

.sidebar-filter-row select:focus {
    border-color: var(--accent);
}

/* On This Day — header button */
#on-this-day-btn {
    padding: 8px 16px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
}

#on-this-day-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

#on-this-day-btn.active {
    background: var(--tag-active);
    color: var(--accent);
    border-color: var(--accent);
}

/* Sidebar filter lists (folders, cameras, lenses) */
.sidebar-filter-list .filter-list-item {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    gap: 4px;
    transition: background 0.15s;
}

.sidebar-filter-list .filter-list-item:hover {
    background: var(--bg-hover);
}

.sidebar-filter-list .filter-list-item.active {
    background: var(--tag-active);
    color: var(--accent);
}

.sidebar-filter-list .filter-list-item.locked {
    opacity: 0.6;
    cursor: default;
}

.sidebar-filter-list .filter-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-filter-list .filter-item-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Main layout */
.main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

aside {
    width: 280px;
    min-width: 220px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 12px;
    flex-shrink: 0;
}

aside h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    padding: 0 8px;
}

/* Tag tree */
.tag-node {
    user-select: none;
}

.tag-label {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    gap: 4px;
    transition: background 0.15s;
}

.tag-label:hover {
    background: var(--bg-hover);
}

.tag-label.active {
    background: var(--tag-active);
    color: var(--accent);
}

.tag-toggle {
    width: 16px;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.tag-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.tag-children {
    margin-left: 16px;
    display: none;
}

.tag-children.expanded {
    display: block;
}

/* Gallery */
#gallery-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

#gallery-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 20px;
}

#sort-select {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
}

#sort-select:focus {
    border-color: var(--accent);
}

.thumb-size-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.thumb-size-control label {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

#thumb-size {
    width: 80px;
    accent-color: var(--accent);
    cursor: pointer;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size, 200px), 1fr));
    gap: 8px;
    align-content: start;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    background: var(--thumb-bg);
    position: relative;
    transition: transform 0.15s;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Pagination */
#pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px;
    flex-wrap: wrap;
}

#pagination button {
    padding: 6px 12px;
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

#pagination button:hover {
    background: var(--bg-hover);
}

#pagination button.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

#pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#pagination .page-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.lightbox-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.lightbox-close {
    position: fixed;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 4px 8px;
}

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--text);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 4px;
    z-index: 10;
    line-height: 1;
}

.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-image-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 0;
    width: 100%;
    padding: 12px 60px;
}

.lightbox-image-wrap img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    transition: max-height 0.3s ease;
}

/* Meta panel — overlays bottom of lightbox */
.lightbox-meta-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.meta-toggle {
    pointer-events: auto;
    padding: 5px 16px;
    background: rgba(22, 33, 62, 0.85);
    border: 1px solid rgba(79, 195, 247, 0.15);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s, background 0.2s;
    backdrop-filter: blur(12px);
}

.meta-toggle:hover {
    color: var(--text);
    background: rgba(22, 33, 62, 0.95);
}

.meta-toggle-icon {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
}

.lightbox-meta-panel.collapsed .meta-toggle-icon {
    transform: rotate(180deg);
}

.lightbox-meta {
    pointer-events: auto;
    padding: 14px 20px;
    background: rgba(22, 33, 62, 0.9);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(79, 195, 247, 0.1);
    font-size: 0.82rem;
    color: var(--text-muted);
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px 16px;
    max-height: 40vh;
    overflow-y: auto;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.lightbox-meta-panel.collapsed .lightbox-meta {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
    border-top-color: transparent;
}

.lightbox-meta .meta-item {
    display: flex;
    gap: 6px;
}

.lightbox-meta .meta-label {
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
}

.lightbox-meta .meta-value a {
    color: var(--accent);
    text-decoration: none;
}

.lightbox-meta .meta-value a:hover {
    text-decoration: underline;
}

.lightbox-meta .meta-tags {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.lightbox-meta .tag-badge {
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.78rem;
    cursor: pointer;
}

.lightbox-meta .tag-badge:hover {
    background: var(--tag-active);
    color: var(--accent);
}

.lightbox-meta .meta-fullsize {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.lightbox-meta .meta-fullsize a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.82rem;
}

.lightbox-meta .meta-fullsize a:hover {
    text-decoration: underline;
}

/* Index status toast */
.index-status {
    position: fixed;
    bottom: 16px;
    right: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.85rem;
    z-index: 2000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Login page */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at 30% 20%, #1a2744 0%, var(--bg) 60%),
                radial-gradient(ellipse at 70% 80%, #1e2a4a 0%, transparent 50%);
    background-color: var(--bg);
}

.login-card {
    background: linear-gradient(165deg, rgba(22, 33, 62, 0.95) 0%, rgba(15, 22, 38, 0.98) 100%);
    border: 1px solid rgba(79, 195, 247, 0.12);
    border-radius: 16px;
    padding: 48px 40px 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4),
                0 0 80px rgba(79, 195, 247, 0.04);
    backdrop-filter: blur(10px);
}

.login-icon {
    color: var(--accent);
    margin-bottom: 16px;
    opacity: 0.8;
}

.login-card h1 {
    font-size: 1.5rem;
    margin-bottom: 6px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.login-field {
    margin-bottom: 20px;
    text-align: left;
}

.login-field label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.login-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.6);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-field input::placeholder {
    color: rgba(136, 153, 170, 0.5);
}

.login-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.1);
}

.login-error {
    color: #ef5350;
    font-size: 0.82rem;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(239, 83, 80, 0.08);
    border: 1px solid rgba(239, 83, 80, 0.2);
    border-radius: 6px;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent), #29b6f6);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.15s, box-shadow 0.2s;
    margin-top: 4px;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(79, 195, 247, 0.25);
}

.login-btn:active {
    transform: translateY(0);
}

/* (locked chip styles moved to .filter-chip.locked above) */

/* User info in header */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.user-info .username {
    white-space: nowrap;
}

#logout-btn {
    padding: 6px 12px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

#logout-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

/* Disabled/locked filter controls */
.sidebar-filter-row select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Filter modal / mobile-only — hidden on desktop */
.filter-toggle-btn { display: none; }
.filter-modal-header { display: none; }
.sidebar-user-info { display: none; }
.filter-modal-footer { display: none; }
.filter-backdrop { display: none; }

/* Responsive */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }

    /* Sidebar as full-screen modal */
    aside {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1500;
        width: 100%;
        max-height: none;
        border-right: none;
        flex-direction: column;
        overflow-y: auto;
        padding: 0;
        padding-bottom: 64px;
    }

    aside.sidebar-open {
        display: flex;
    }

    /* Sidebar sections need padding when inside modal */
    aside .sidebar-section {
        padding: 0 8px;
    }

    /* Hide user info from header on mobile */
    .user-info {
        display: none;
    }

    /* Show user info in sidebar bottom on mobile */
    .sidebar-user-info {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.82rem;
        color: var(--text-muted);
        padding: 4px 0;
    }

    .logout-btn-sidebar {
        padding: 6px 12px;
        background: transparent;
        color: var(--text-muted);
        border: 1px solid var(--border);
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.8rem;
        white-space: nowrap;
        transition: color 0.2s, border-color 0.2s;
    }

    .logout-btn-sidebar:hover {
        color: var(--text);
        border-color: var(--text-muted);
    }

    /* Filter toggle button in header */
    .filter-toggle-btn {
        display: inline-flex;
        padding: 8px 14px;
        background: transparent;
        color: var(--text-muted);
        border: 1px solid var(--border);
        border-radius: 6px;
        cursor: pointer;
        font-weight: 500;
        font-size: 0.85rem;
        white-space: nowrap;
        transition: color 0.2s, border-color 0.2s;
    }

    .filter-toggle-btn:hover {
        color: var(--text);
        border-color: var(--text-muted);
    }

    /* Modal header */
    .filter-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border);
        font-weight: 600;
        font-size: 1rem;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .filter-modal-close {
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 4px 8px;
        line-height: 1;
    }

    .filter-modal-close:hover {
        color: var(--text);
    }

    /* Modal footer */
    .filter-modal-footer {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 16px;
        background: var(--bg-surface);
        border-top: 1px solid var(--border);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 10;
    }

    .filter-modal-clear-btn {
        padding: 10px 18px;
        background: transparent;
        color: var(--text-muted);
        border: 1px solid var(--border);
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .filter-modal-clear-btn:hover {
        color: var(--text);
        border-color: var(--text-muted);
    }

    .filter-modal-done-btn {
        flex: 1;
        padding: 10px 18px;
        background: var(--accent);
        color: #000;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-weight: 600;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .filter-modal-done-btn:hover {
        background: var(--accent-hover);
    }

    /* Backdrop */
    .filter-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1400;
        background: rgba(0, 0, 0, 0.5);
    }

    .filter-backdrop.active {
        display: block;
    }

    /* Larger touch targets */
    .sidebar-filter-list .filter-list-item {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .sidebar-section-header {
        padding: 14px 12px;
        font-size: 0.9rem;
    }

    .sidebar-filter-row {
        padding: 8px 12px;
    }

    .sidebar-filter-row select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .tag-label {
        padding: 10px 8px;
        font-size: 0.95rem;
    }

    /* Remove max-height constraint in full-screen modal */
    .sidebar-section-body {
        max-height: none;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size, 140px), 1fr));
    }

    .filter-bar {
        padding: 6px 12px;
        gap: 6px;
    }
}
