.asset-manager-browser {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0;
    min-height: 72px;
}

.asset-manager-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 0;
    background: #f0f0f0;
    cursor: pointer;
    overflow: hidden;
}

.asset-manager-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.asset-manager-thumb.is-selected {
    border-color: var(--button-color, #888);
    box-shadow: 0 0 0 1px var(--button-color, #888);
}

.asset-manager-thumb--add {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    line-height: 1;
    color: #666;
    background: #fafafa;
    border: 2px dashed #ccc;
}

.asset-manager-thumb--add:hover {
    border-color: var(--button-color, #888);
    color: var(--button-color, #888);
}

.asset-manager-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}

.asset-manager-modal.is-hidden {
    display: none;
}

.asset-manager-modal-content {
    background: #fff;
    border-radius: 10px;
    max-width: min(920px, 94vw);
    max-height: 88vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.asset-manager-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.asset-manager-modal-header h3 {
    margin: 0;
    font-size: 1rem;
}

.asset-manager-modal-toolbar {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
}

.asset-manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(256px, 1fr));
    gap: 12px;
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.asset-manager-tile {
    position: relative;
    width: 256px;
    max-width: 100%;
    height: 256px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
    justify-self: center;
}

.asset-manager-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.asset-manager-tile.is-selected {
    border-color: var(--button-color, #888);
}

.asset-manager-tile-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.asset-manager-empty {
    padding: 24px;
    text-align: center;
    color: #888;
    grid-column: 1 / -1;
}
